From: santapanda on 30 Apr 2010 12:53 The C# System.Management classes were a bust. When I queried the Win32_NetworkAdapter class, both wireless and wired devices were listed as having Adapter Type = "Ethernet 802.3". I also tried using the System.Net.NetworkInformation namespace as well, with a similar result: wireless devices showed up with Interface Type = "Ethernet". So I'm back to square one. "santapanda" wrote: > I found that for network cards, I can use WMI objects available in C#. By > using the System.Management namespace, I can query Win32 classes such as > Win32_NetworkAdapter. That particular class has a property on it, > AdapterType, which differentiates between the different types of network > adapters. Pretty cool! > > "Doron Holan [MSFT]" wrote: > > > it is device interface specific how to differentiate. I am pretty sure > > there are some netcfg APIs that will help, I don't know what they are though > > > > d > > > > -- > > > > This posting is provided "AS IS" with no warranties, and confers no rights. > > > > >
From: Doron Holan [MSFT] on 30 Apr 2010 13:00 no matter what you do, there will be some wifi NICs which always say they are 802.3 to the system. just deal wit that. d -- This posting is provided "AS IS" with no warranties, and confers no rights. "santapanda" <santapanda(a)discussions.microsoft.com> wrote in message news:7F4FCC3F-EC08-4B54-9E91-AFA981DB1879(a)microsoft.com... > The C# System.Management classes were a bust. When I queried the > Win32_NetworkAdapter class, both wireless and wired devices were listed as > having Adapter Type = "Ethernet 802.3". > > I also tried using the System.Net.NetworkInformation namespace as well, > with > a similar result: wireless devices showed up with Interface Type = > "Ethernet". > > So I'm back to square one. > > "santapanda" wrote: > >> I found that for network cards, I can use WMI objects available in C#. >> By >> using the System.Management namespace, I can query Win32 classes such as >> Win32_NetworkAdapter. That particular class has a property on it, >> AdapterType, which differentiates between the different types of network >> adapters. Pretty cool! >> >> "Doron Holan [MSFT]" wrote: >> >> > it is device interface specific how to differentiate. I am pretty sure >> > there are some netcfg APIs that will help, I don't know what they are >> > though >> > >> > d >> > >> > -- >> > >> > This posting is provided "AS IS" with no warranties, and confers no >> > rights. >> > >> > >>
From: santapanda on 30 Apr 2010 14:51 Okay, fine, I'll "deal wit that.". But there must be a way to isolate the wireless devices. If it's possible, someone please let me know. If it's absolutely not possible, let me know that too! "Doron Holan [MSFT]" wrote: > no matter what you do, there will be some wifi NICs which always say they > are 802.3 to the system. just deal wit that. > > d > -- > > This posting is provided "AS IS" with no warranties, and confers no rights. > > > "santapanda" <santapanda(a)discussions.microsoft.com> wrote in message > news:7F4FCC3F-EC08-4B54-9E91-AFA981DB1879(a)microsoft.com... > > The C# System.Management classes were a bust. When I queried the > > Win32_NetworkAdapter class, both wireless and wired devices were listed as > > having Adapter Type = "Ethernet 802.3". > > > > I also tried using the System.Net.NetworkInformation namespace as well, > > with > > a similar result: wireless devices showed up with Interface Type = > > "Ethernet". > > > > So I'm back to square one. > >
From: holycow on 30 Apr 2010 15:44 A wi-fi NIC is one that indicates its physical medium type as NdisPhysicalMediumWirelessLan or NdisPhysicalMediumNative802_11, or supports OID_802_11... or OID_DOT11_... properties. Since Wi-fi NICs also emulate ethernet, they support many 802.3 properties. Your problem is that network drivers live deep in the kernel, so getting down to to ask them something may be cumbersome and not trivial. WMI is one way known to work - just query the correct properties. But, you wil need to link from the WMI object that represents the NIC to its "device instance id", IP adapter index and so on. And, as Doron noted, if a wi-fi device exposes itself as generic ethernet, there is nothing you can do about this. Regards, - pa "santapanda" <santapanda(a)discussions.microsoft.com> wrote in message news:99C542BC-90A1-4F53-A8B6-D06061FF7046(a)microsoft.com... > Okay, fine, I'll "deal wit that.". But there must be a way to isolate the > wireless devices. If it's possible, someone please let me know. If it's > absolutely not possible, let me know that too! > > "Doron Holan [MSFT]" wrote: > >> no matter what you do, there will be some wifi NICs which always say they >> are 802.3 to the system. just deal wit that. >> >> d >> -- >> >> This posting is provided "AS IS" with no warranties, and confers no >> rights. >> >> >> "santapanda" <santapanda(a)discussions.microsoft.com> wrote in message >> news:7F4FCC3F-EC08-4B54-9E91-AFA981DB1879(a)microsoft.com... >> > The C# System.Management classes were a bust. When I queried the >> > Win32_NetworkAdapter class, both wireless and wired devices were listed >> > as >> > having Adapter Type = "Ethernet 802.3". >> > >> > I also tried using the System.Net.NetworkInformation namespace as well, >> > with >> > a similar result: wireless devices showed up with Interface Type = >> > "Ethernet". >> > >> > So I'm back to square one. >> > >
From: santapanda on 30 Apr 2010 16:37 Okay, cool. So which WMI class has these properties that you list? "holycow" wrote: > A wi-fi NIC is one that indicates its physical medium type > as NdisPhysicalMediumWirelessLan or NdisPhysicalMediumNative802_11, > or supports OID_802_11... or OID_DOT11_... properties. > Since Wi-fi NICs also emulate ethernet, they support many 802.3 properties. > > Your problem is that network drivers live deep in the kernel, so getting > down to > to ask them something may be cumbersome and not trivial. > WMI is one way known to work - just query the correct properties. > But, you wil need to link from the WMI object that represents the NIC > to its "device instance id", IP adapter index and so on. > > And, as Doron noted, if a wi-fi device exposes itself as generic ethernet, > there is nothing you can do about this. > > Regards, > - pa
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: Creating a mirror driver for Vista/Win7 Next: "Convert" Driver vom XP64 to Win7 64 |