But it *does* lie. I downloaded and ran that example code and it lies like a rug. See the attached screen shot.



Note in the screen shot that my wireless network connection is ENABLED, though it is not connected to anything at the moment. The example code that you linked presents it as DISABLED, which is wrong, as shown in the screen shot.

If I connect it to a wireless network, then the example code presents it as ENABLED. Again, this is wrong. Connected is not the same thing as Enabled. Disconnected is not the same thing as Disabled.

This Microsoft-supplied example code has the same problem as all of the other code I've found on the internet. Exactly as I stated in my original post.

However, the page you linked did say one thing which I hadn't seen yet! This is very interesting:

Quote:
More Information
The Win32_NetworkAdapter class is deprecated and use the MSFT_NetAdapter class instead. WMI class represents a network adapter: http://msdn.microsoft.com/en-us/library/windows/desktop/aa394216(v=vs.85).aspx


I will investigate this MSFT_NetAdapter class!!!!!!!!



Attachments
Capture.PNG (4479 downloads)

_________________________
Tony Fabris