|
|
|
start date: Mon, 13 Aug 2007 13:55:01 -0600,
posted on: microsoft.public.dotnet.framework
back
| Thread Index |
|
1
Sid Price
|
|
2
Henning Krause [MVP - Exchange]
|
|
3
Sid Price
|
Enumerating network adaptors
I need to enumerate all the network adaptors in a PC and their IP addresses.
I have tried with WMI but I do not seem able to figure out from the several
adaptors in the system which are active and connected to a network.
Any suggestions would be much appreciated.
I am using VS2005 (VB) and .NET 2.0.
Thank you,
Sid.
Date:Mon, 13 Aug 2007 13:55:01 -0600
Author:
|
Re: Enumerating network adaptors
Hello Sid,
take a look at the System.Net.NetworkInformation.NetworkInterface class.
It has a GetAllNetworkInterfaces static method which returns the infos you
need.
And then there is the IPGlobalProperties class.
Kind regards,
Henning Krause
"Sid Price" wrote in message
news:OICVbPe3HHA.5796@TK2MSFTNGP05.phx.gbl...
>I need to enumerate all the network adaptors in a PC and their IP
>addresses. I have tried with WMI but I do not seem able to figure out from
>the several adaptors in the system which are active and connected to a
>network.
>
> Any suggestions would be much appreciated.
>
> I am using VS2005 (VB) and .NET 2.0.
>
> Thank you,
> Sid.
>
>
Date:Mon, 13 Aug 2007 22:21:10 +0200
Author:
|
Re: Enumerating network adaptors
Hello Henning,
Many thanks for the excellent advice on the two classes to examine. After
studying the documentation of them and the classes they use I was able to
resolve the issue of finding the IP addresses of the active network
connections.
Thank you,
Sid.
"Henning Krause [MVP - Exchange]"
wrote in message news:%23SAAAee3HHA.3400@TK2MSFTNGP03.phx.gbl...
> Hello Sid,
>
> take a look at the System.Net.NetworkInformation.NetworkInterface class.
>
> It has a GetAllNetworkInterfaces static method which returns the infos you
> need.
>
> And then there is the IPGlobalProperties class.
>
> Kind regards,
> Henning Krause
>
> "Sid Price" wrote in message
> news:OICVbPe3HHA.5796@TK2MSFTNGP05.phx.gbl...
>>I need to enumerate all the network adaptors in a PC and their IP
>>addresses. I have tried with WMI but I do not seem able to figure out from
>>the several adaptors in the system which are active and connected to a
>>network.
>>
>> Any suggestions would be much appreciated.
>>
>> I am using VS2005 (VB) and .NET 2.0.
>>
>> Thank you,
>> Sid.
>>
>>
>
Date:Wed, 15 Aug 2007 14:38:56 -0600
Author:
|
|
|