 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Dieter_Soergel Guest
|
Posted: Thu Sep 28, 2006 2:08 pm Post subject: GetAdaptersInfo - AdapterName - shows GUID instead of real n |
|
|
Hello,
I use IPHlpAPI to enumerate my NIC Settings.
AdapterName shows something like this:
{3CF3184D-D440-433B-B4F0-652EC6946DED}
but I expect that it look like
"Local Area Connection"
So the Question ist, how can I get the name of the connection of the
Adapter?
I have D6 Prof and Win XP. |
|
| Back to top |
|
 |
Dirk Claessens Guest
|
Posted: Fri Sep 29, 2006 7:42 pm Post subject: Re: GetAdaptersInfo - AdapterName - shows GUID instead of re |
|
|
On 2006-09-28, Dieter_Soergel (212.59.199.49) wrote in
message <1159434504.639574.246930 (AT) i42g2000cwa (DOT) googlegroups.com>
| Quote: | Hello,
I use IPHlpAPI to enumerate my NIC Settings.
AdapterName shows something like this:
{3CF3184D-D440-433B-B4F0-652EC6946DED}
but I expect that it look like
"Local Area Connection"
|
Try the Description field instead of the AdapterName field.
--
Dirk.
No trees were killed in the creation of this message;
however, many electrons were terribly inconvenienced.
http://users.pandora.be/dirk.claessens2 |
|
| Back to top |
|
 |
Dieter_Soergel Guest
|
Posted: Mon Oct 02, 2006 5:24 pm Post subject: Re: GetAdaptersInfo - AdapterName - shows GUID instead of re |
|
|
Thank you.
Description shows me the name of the Aapter:
"Intel(R) PRO/Wireless 2200BG N...."
But I need something like that:
"Local Area Connection"
which is also displayed in Network Settings:
(of course Wireless is not a Local Area Connection ....)
Any other Ideas?
Dirk Claessens schrieb:
| Quote: | On 2006-09-28, Dieter_Soergel (212.59.199.49) wrote in
message <1159434504.639574.246930 (AT) i42g2000cwa (DOT) googlegroups.com
Hello,
I use IPHlpAPI to enumerate my NIC Settings.
AdapterName shows something like this:
{3CF3184D-D440-433B-B4F0-652EC6946DED}
but I expect that it look like
"Local Area Connection"
Try the Description field instead of the AdapterName field.
--
Dirk.
No trees were killed in the creation of this message;
however, many electrons were terribly inconvenienced.
http://users.pandora.be/dirk.claessens2 |
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Tue Oct 03, 2006 2:03 am Post subject: Re: GetAdaptersInfo - AdapterName - shows GUID instead of re |
|
|
"Dieter_Soergel" <google (AT) dscs (DOT) de> wrote in message
news:1159791856.349810.7240 (AT) b28g2000cwb (DOT) googlegroups.com...
| Quote: | Description shows me the name of the Aapter:
"Intel(R) PRO/Wireless 2200BG N...."
|
As it should be. You are enumerating the physical network adapters, so you
are getting the friendly names of the hardware.
| Quote: | But I need something like that:
"Local Area Connection"
which is also displayed in Network Settings:
|
You are looking in the wrong place to begin with. GetAdaptersInfo() returns
the physical adapters that manage the networks that the machine is
physically connected to. To loop through the logical connections that use
those adapters internally, try using WNetOpenEnum() and WNetEnumResource()
instead.
If that doesn't work, then you will have to do the same thing that Windos
Explorer itself does:
1) Use SHGetDesktopFolder() to get the IShellFolder interface for the
top-level Shell namespace.
2) Use SHGetSpecialFolderLocation(), specifying CSIDL_CONNECTIONS, to get
the ITEMIDLIST of the "Network Connections" folder.
3) Pass the ITEMIDLIST to the BindToObject() method of the desktop's
IShellFolder interface to get the IShellFolder interface for the "Network
Connections" folder.
4) Use the EnumObjects() method of the "Network Connections" IShellFolder
interface to get an IEnumIDList interface for the enumerator that will loop
through the individual items in the folder.
5) Use the GetDisplayNameOf() method of the "Network Connections"
IShellFolder interface to get the friendly name of each item that the
enumerator returns.
Gambit |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|