DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
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:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us