Connecting Tech Pros Worldwide Forums | Help | Site Map

Enumerating Network Cards and IP Addresses in VB.NET

Mark Hollander
Guest
 
Posts: n/a
#1: Nov 21 '05
Hi,

Is there a way to enumerate the Network cards that have been installed
on the system and get their IP Addresses using the .Net framework
without making any API calls.

If I have to make some API calls, does anyone have example code that I
can follow?

Thank You
Mark Hollander


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Imran Koradia
Guest
 
Posts: n/a
#2: Nov 21 '05

re: Enumerating Network Cards and IP Addresses in VB.NET


Take a look at the Win32_NetworkAdapterConfiguration class in WMI.
http://msdn.microsoft.com/library/de...figuration.asp

There's a property IPAddresses that returns an array of IP addresses
associated with the network adapter. MSDN also has some examples on querying
in WMI:
http://msdn.microsoft.com/library/de...management.asp

Another link on querying WMI:
http://www.freevbcode.com/ShowCode.asp?ID=4571


hope that helps..
Imran.

"Mark Hollander" <mark@atcom.co.za> wrote in message
news:%23L5MuYdtEHA.820@TK2MSFTNGP12.phx.gbl...[color=blue]
> Hi,
>
> Is there a way to enumerate the Network cards that have been installed
> on the system and get their IP Addresses using the .Net framework
> without making any API calls.
>
> If I have to make some API calls, does anyone have example code that I
> can follow?
>
> Thank You
> Mark Hollander
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it![/color]


Closed Thread