Detecting Network

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

Guest

hi there,

I am looking for some sample code that will show me how to poll for a
network/ipaddress on a seperate thread. I would like to write a simple class
that will accept an ipAddress and will raise an event when the the address
is/isn't available. I would like this class to be adapter independant (i dont
care how the destination is accessed, WiFi, cradle ect). I found an article
on ms which was written in 2004 and the thread stuff seems a bit cumbersome.
I assume the support for threads would be better in CF2.

Any help would be appreciated.

Using: Windows Mobile 5.0. Compact Framework 2
 
Hi,

If you use WM 5.0, you can use the new State and Notifications Broker
API to retrieve system state information, there are lot of network
functionnalities :
using Microsoft.WindowsMobile.Status

BR


Fabien Decret
Windows Embedded Consultant

ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/





Devron Blatchford a écrit :
 
First of all, you can not "poll" for the network/ipaddress unless there's
any kind of listener (web server, time server etc..) is running on this
address. Second of all, you don't ask somebody to write something for you...
Show us your code you have difficulties with and may be someone will be able
to help.
 
Sorry, thread stuff might be slightly improved, but you still have to start
a thread, make sure that it will exit when you want to exit your program,
use Control.Invoke to call-back into the user interface thread, if you're
changing the UI, etc. Jump in and ask about what you have problems with...

Paul T.
 
Hi all, thanks for your replies. With your suggestions and some other samples
I found I have been able to acheive what I wanted.

Thanks
 
Back
Top