Re: Ipconfig /all output and Win32 network information
- From: Vishal Swarnkar <vishal.swarnkar@xxxxxxxxx>
- Date: Wed, 20 Aug 2008 00:22:57 -0700 (PDT)
On Aug 19, 2:46 pm, theredguy <thered...@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
"Edward Diener" wrote:
Vishal Swarnkar wrote:
On Jul 22, 6:55 am, Edward Diener
<eddielee_no_spam_h...@xxxxxxxxxxxxxx> wrote:
When running 'ipconfig all' I first get the "Windows IP Configuration",
taken probably from the GetNetworkParams FIXED_INFO structure, followed
by the appropriate information. Then there is a line which says
"Ethernet adapter Local Area Connection", taken probably from
GetAdaptersInfo IP_ADAPTER_INFO ( or possibly from GetAdaptersAddresses
IP_ADAPTER_ADDRESSES ) followed by the appropriate information for my
single adapter.
Where does the "Ethernet adapter Local Area Connection" string come from
? It seems to be naming my adapter but I do not find such a string in
IP_ADAPTER_INFO.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-
E325-11CE-BFC1-08002BE10318}
Then there are entries for every connection on your network.
I see a Name value under the Connection subkey of an adapter which says
"Local Area Connection". The GUID subkey of the adapter itself
corresponds to the AdapterName in IP_ADAPTER_INFO. However it seems I
must hardcode the GUID for all adapters, which you give above, into my
program just to find this friendly Name value. Is that really the only
way to do it ? How wonderfully abstruse of Microsoft.
Thanks for the information.
It may come from GetAdaptersAddresses(), which fills a IP_ADAPTER_ADDRESSES
struct. Check the field FriendlyName there for the connection name.
The type ethernet adapter may come from the fielf IfType in the same struct.
See MSDN for details.- Hide quoted text -
- Show quoted text -
Sorry I am looking at the thread a little late. "{4D36E972-
E325-11CE-BFC1-08002BE10318} " is the standard GUID for all the
Network Adapter. All the Network Adapter on your windows system will
come under this GUID and this is known as GUID_NET.
So you have to just enumerate all the entries inside this GUID and you
will see N no of entries below this GUID_NET if you have N no of
network adapters on your system. You need to match teh PnPInstanceId
of the adapter then rename it.... e.g you have two nvidia and one
broadcom adapter, then match the PnPInstanceId of each entries and
rename them like "nVIDIA Local Area Connection" or "BroadCom Local
Area Connection".
I just experimented it and it works.
.
- References:
- Re: Ipconfig /all output and Win32 network information
- From: theredguy
- Re: Ipconfig /all output and Win32 network information
- Prev by Date: Re: Timing problems with MailSlots
- Next by Date: Re: php win32 communication
- Previous by thread: Re: Ipconfig /all output and Win32 network information
- Index(es):
Relevant Pages
|
Loading