Board index » delphi » How to get info about the network cards connected to a machine and their IPs

How to get info about the network cards connected to a machine and their IPs

HI,
How can I find out the network cards installed on a machine and the IP
Addresses that they are configured on.

Rgds
Amit

 

Re:How to get info about the network cards connected to a machine and their IPs


Quote
"NSPL" <i...@novatechsoftware.com> wrote in message news:3cec7476_2@dnews...
> How can I find out the network cards installed on a machine and the IP
> Addresses that they are configured on.

Winsock has the functionality to do it using GetHostByName and playing with
the PInAddr pointers in the h_address_list member of PHostEnt.  Socket
components make the task a little easier.

For instance, using Indy 9, you can get the number and  value of IP
addresses for your computer using properties in a global IP stack instance:

  GStack.LocalAddresses.Count
  GStack.LocalAddresses[0]
  GStack.LocalAddresses[1]
  ...
  GStack.LocalAddresses[n]

hth...
--
Don

Posted by ELKNews 1.0.4-B
Empower your News Reader! http://www.atozedsoftware.com

Other Threads