Detecting Network

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
 
F

Fabien

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 :
 
A

Alex Yakhnin

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.
 
P

Paul G. Tobey [eMVP]

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.
 
G

Guest

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
 

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