Is there a reliable way to check for the existence of wireless adapters in
a system? I thought it was going to be simple using WMI's
Win32_NetworkAdapter class, but the information at MSDN does not appear to
be correct. I tried to access the AdapterTypeID property, which is supposed
to return an interger value of 9 for a wireless adapter. I'm getting a null
when I access this property. Same results with the string version of the
property AdapterType. Here is my code:
ManagementClass objMC = new ManagementClass("Win32_NetworkAdapter");
ManagementObjectCollection adapters = objMC.GetInstances();
foreach (ManagementObject adapter in adapters)
{
int type = (int)adapter["AdapterTypeID"];
if (type == 9)
//whatever...
}