Automatically connecting to internet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Appologies if the is the incorrect group for this question.

I want to create an app in VB that runs on my XDA that can retrieve data from a URL whenever a particular button is clicked. While the XDA is in its cradle or an active GPRS connection is available, the app works fine, without cradle or GPRS it fails stating that WSAStartup is missing or failed.

I think from what I've read that WSAStartup could be used to help initiate a TCP/IP connection if one was not available (eg get the phone to initiate the GPRS connection before continuing with the app).

The problem is that I can find no reference to how to do this in VB .NET 2003, can any one help.
 
The easiest way to initiate a default connection in CF code is to use
HttpWebRequest class to issue a request to a known host.
Internally it will use connection manager to map url to connection and then
establish it. The proxy will be taken care of as well.

You can also use reflection to get to the private class ConnMgr and invoke
its EstablishConnectionForUrl method.

--
Alex Feinman
---
Visit http://www.opennetcf.org
Talis Silis said:
Appologies if the is the incorrect group for this question.

I want to create an app in VB that runs on my XDA that can retrieve data
from a URL whenever a particular button is clicked. While the XDA is in its
cradle or an active GPRS connection is available, the app works fine,
without cradle or GPRS it fails stating that WSAStartup is missing or
failed.
I think from what I've read that WSAStartup could be used to help initiate
a TCP/IP connection if one was not available (eg get the phone to initiate
the GPRS connection before continuing with the app).
The problem is that I can find no reference to how to do this in VB .NET
2003, can any one help.
 
Back
Top