I’m using ManagedWifi in my C# application. The application will take control and connect to a designated SSID. Right now I’m trying to handle all possible errors, especially this. At the moment the program can’t tell if a wireless adapter is turned on / or even exists at all. The ManagedWifi code goes on as per normal, and did not throw any exception at all. Any help would be appreciated, thanks.
I’m using ManagedWifi in my C# application. The application will take control and connect
Share
The WLAN API is your friend. In particular, see the example in the WlanQueryInterface documentation. Note that many laptops have an on/off switch for the wifi adapter, and in many of these the adapter will not be visible to windows at all when this switch is off.
I know that WMI can also be used to do some WIFI stuff, but I’m not sure if it can enumerate adapters and discover their properties the way that the WLAN api can.
Edited to add: Be aware of the existence of the Windows 7 Virtual Adapter, it tripped me up writing my wifi control application when I first encountered it.