In NT I can count the keys in :
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards
I don’t see anything similar in 9x. The closest I can see is in
HKLM\Enum\PCI then enuming thru the entries and looking for a subkey of
class with a value of “NET”. Observation seems to indicate that only NIC
cards have this setting, although I have not seen this verified thru a
“reputable” doc anywhere…is there a better way to do this?
Thanks,
Adam
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
Hi,
In fact I was just looking into this thing recently for all the OS’s.
I believe you can find the cards under HKEY_LOCAL_MACHINE\System\Services\Class\Net in win98.
Ramit.
----- Original Message -----
From: Adam Peterson
To: NT Developers Interest List
Sent: Friday, January 12, 2001 3:49 AM
Subject: [ntdev] How do I count Nic cards?
In NT I can count the keys in :
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards
I don’t see anything similar in 9x. The closest I can see is in
HKLM\Enum\PCI then enuming thru the entries and looking for a subkey of
class with a value of “NET”. Observation seems to indicate that only NIC
cards have this setting, although I have not seen this verified thru a
“reputable” doc anywhere…is there a better way to do this?
Thanks,
Adam
You are currently subscribed to ntdev as: xxxxx@wipro.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You should avoid reading the registry as much as possible. There are several
ways to get this information.
- You can use INetConnectionManager interface (presuming you know COM) and
enumerate all LAN devices.
- You can use GetAdaptersInfo.
- You can use SetupDi functions and enumerate GUID_NDIS_LAN_CLASS devices
and filter out WAN devices.
I don’t know which one is compatible across all platforms. My guess would be
2).
-Eliyas
-----Original Message-----
From: Ramit Bhalla [mailto:xxxxx@wipro.com]
Sent: Friday, January 12, 2001 1:22 AM
To: NT Developers Interest List
Subject: [ntdev] Re: How do I count Nic cards?
Hi,
In fact I was just looking into this thing recently for all the OS’s.
I believe you can find the cards under
HKEY_LOCAL_MACHINE\System\Services\Class\Net in win98.
Ramit.
----- Original Message -----
From: Adam mailto:xxxxx Peterson
To: NT Developers mailto:xxxxx Interest List
Sent: Friday, January 12, 2001 3:49 AM
Subject: [ntdev] How do I count Nic cards?
In NT I can count the keys in :
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards
I don’t see anything similar in 9x. The closest I can see is in
HKLM\Enum\PCI then enuming thru the entries and looking for a subkey of
class with a value of “NET”. Observation seems to indicate that only NIC
cards have this setting, although I have not seen this verified thru a
“reputable” doc anywhere…is there a better way to do this?
Thanks,
Adam
—
You are currently subscribed to ntdev as: xxxxx@wipro.com
mailto:xxxxx
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
mailto:leave-ntdev-
—
You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
—
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</mailto:leave-ntdev-></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>
I really liked option 2, and will keep it in mind for the future.
Unfortunately it doesn’t support NT or 95. Option 3 requires a driver which
is out of the question. Option 1 has me curious, searching my MSDN I find
no hits on ‘INetConnectionManager’, so I checked the 2K and 98 DDK’s and the
msdn online and still found no hits. What/where is this thing?
Adam
-----Original Message-----
From: Eliyas Yakub [mailto:xxxxx@microsoft.com]
Sent: Friday, January 12, 2001 12:13 PM
To: NT Developers Interest List
Subject: [ntdev] Re: How do I count Nic cards?
You should avoid reading the registry as much as possible. There are several
ways to get this information.
- You can use INetConnectionManager interface (presuming you know COM) and
enumerate all LAN devices.
- You can use GetAdaptersInfo.
- You can use SetupDi functions and enumerate GUID_NDIS_LAN_CLASS devices
and filter out WAN devices.
I don’t know which one is compatible across all platforms. My guess would be
2).
-Eliyas
-----Original Message-----
From: Ramit Bhalla [mailto:xxxxx@wipro.com]
Sent: Friday, January 12, 2001 1:22 AM
To: NT Developers Interest List
Subject: [ntdev] Re: How do I count Nic cards?
Hi,
In fact I was just looking into this thing recently for all the OS’s.
I believe you can find the cards under
HKEY_LOCAL_MACHINE\System\Services\Class\Net in win98.
Ramit.
----- Original Message -----
From: Adam Peterson mailto:xxxxx
To: NT Developers mailto:xxxxx Interest List
Sent: Friday, January 12, 2001 3:49 AM
Subject: [ntdev] How do I count Nic cards?
In NT I can count the keys in :
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards
I don’t see anything similar in 9x. The closest I can see is in
HKLM\Enum\PCI then enuming thru the entries and looking for a subkey of
class with a value of “NET”. Observation seems to indicate that only NIC
cards have this setting, although I have not seen this verified thru a
“reputable” doc anywhere…is there a better way to do this?
Thanks,
Adam
—
You are currently subscribed to ntdev as: xxxxx@wipro.com
mailto:xxxxx
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
mailto:leave-ntdev-
—
You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
—
You are currently subscribed to ntdev as: xxxxx@efficient.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
—
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</mailto:leave-ntdev-></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>