LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NetBIOS name/IP address retrieval

Could I programmatically retrieve the NetBIOS name and IPaddress of the local
machine in LabVIEW 6 under Windows NT?
0 Kudos
Message 1 of 4
(2,779 Views)
Peter Vijn wrote in message
news:39f6b583@newsgroups.ni.com...
>
> Could I programmatically retrieve the NetBIOS name and IPaddress of the
local
> machine in LabVIEW 6 under Windows NT?

In the registry, look at the keys under the following;

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveCompu
terName
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerNam
e
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
0 Kudos
Message 2 of 4
(2,779 Views)
I've found that that simplest way to get the local IP address is wire the
output of the String to IP function to the input of the IP to String. Both
of these can be found in the Communications/TCP pallette. Leaving the input
of String to IP blank will retreive the local machine. On my computer and
with my company's network, the registry doesn't store the IP address since
it is assigned dynamically. You can also use these functions to return the
computer name but it can be slow while it does the name resolution. The G
Toolbox from George Zou (http://george-zou.sinacity.com/) has a function
that returns the computer name.

"Craig Graham" wrote:
>>Peter Vijn wrote in message>news:39f6b583@newsg
roups.ni.com...>>>>
Could I programmatically retrieve the NetBIOS name and IPaddress of the>local>>
machine in LabVIEW 6 under Windows NT?>>In the registry, look at the keys
under the following;>>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveCompu>terName>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerNam>e>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters>>
0 Kudos
Message 3 of 4
(2,779 Views)
That was very useful, Craig and thanks for your speedy reply! The (Active)ComputerName
key works on my machine, can't find the IPaddress however. It's actually
the first time that I used the registry functions in LabVIEW 6.
This LabVIEW support newsgroup really seems to work well, I'll keep an eye
open for it from now on.

Regards, Peter
0 Kudos
Message 4 of 4
(2,779 Views)