Is Wifi on

  • Thread starter Thread starter Mex
  • Start date Start date
I guess you could enumerate the active drivers in HKLM/Drivers/Active
looking for one that you like for WiFi. WiFi is not a global thing. You
could have two dozen WiFi adapters on some device, so there's no
IsWiFiActive() call. Why do you care? Generally, applications should
ignore the transport mechanism and just make a connection to the network and
use it, ignoring the media being used to do that...

Paul T.
 
Or use something like OpenNETCF Smart Device Framework to enumerate all of
the network adapters, checking each one for WiFi-ness.

Paul T.

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:eNX%[email protected]...
 
Hi,

I have a not very clean solution ;-( but it works if you don't have
others network connections :
You can use SNAPI with the SystemProperty ConnectionsNetworkCount.

Check the state of this value and if it is > 0, you have a network
connection.
(int)SystemState.GetValue(SystemProperty.ConnectionsNetworkCount)

Fabien Decret (Device Application Development MVP)
Windows Embedded Consultant

ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/ | http://fabdecret.blogspot.com/
 
Back
Top