If you have multiple network cards, you can get their IP addresses from the registry.  
This is a two step process:

1. Enumerate the network card keys by reading the subkeys at this location:

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards

For each of this subkey, read its 'ServiceName' value.


2. Append the 'ServiceName' values to the following key and read the 'IPAddress' value:

HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces

If you're using DHCP, you'll instead read values for 'DhcpIPAddress.'  

Hope this helps.  

Khalid Ansari 


> Does anyone know of a way to get a list of the 
> IP addresses associated with network 
> interfaces on a Windows PC running LabVIEW? I 
> could call IPCONFIG with a System Exec node 
> and parse the output but that's a dirty hack, 
> so I'd rather not.
>
> Simon Whitaker <[EMAIL PROTECTED]>

          
          


Reply via email to