Wednesday, April 13, 2011

Connection manager in windows mobile

I try to use the cell core connection manager with c# in order to force my application to browse through the WAP gateway (using its GUID) although the default connection is internet. I see that the WAP connection opens but then all actual requests go through the internet and I end up with 2 open connections. Any hint?

From stackoverflow
  • You can do that by using Connection Manager. There is a .NET wrapper in OpenNetCF Smart Device Framework. Documentation here. You need to use the Connect method that connects to a specific network, using its GUid.

    Zamel : But that's exactly what I'm doing, using the connection manager to connect to a specific network using its GUID
    kgiannakakis : Could you post the code that you are using to make the requests?
    Zamel : IntPtr connHandle = IntPtr.Zero; ConnMgrStatus stat; Guid wapguid = new Guid("{bla-bla}"); ConnMgrConnectionInfo info = new ConnMgrConnectionInfo(wapguid, ConnMgrPriority.UserInteractive, ConnMgrProxy.Http); ConnectionManager.ConnMgrEstablishConnectionSync(info, ref connHandle, 20000, ref stat);

0 comments:

Post a Comment