How to create a "EnsureNetwork()" method ?

S

Steve B.

Hi,

I'd like some help or good practice in order to make a "EnsureNetwork()"
method.

This method should either check there is network available (typically WIFI)
or connect GPRS connexion (the one configured as default connexion on the
device).

I made some tests, and on my device, a web service call automatically
connect the default connexion. A Sql Ce merge replication synchronize()
method does not. That's why I'd like to ensure the availability of any
network.

I'm also quite confused about networks, destinations and connexions... and I
would appreciate some explanations.

Thanks in advance.
Steve
 
P

Paul G. Tobey [eMVP]

You'll have to define what device you're running on. If it's a Windows
Mobile device, you can use the Connection Manager, for which there is a
wrapper in OpenNETCF, www.opennetcf.org, to establish a connection, etc.

If you're running on some Windows CE (generic) device, there is no OS
support for ensuring that a network connection exists. You'll have to
figure that out yourself, with knowledge of what connection types are
possible, etc.

Paul T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top