From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I know which IP address the GetTCPHostAddr function will return???

I am writing simulator software on a PC with Windows XP, 2 NICs and a Firewire card. Before the simulator initializes, I would like to be able to confirm that the IP address for the Firewire card is correct for the spcecific simulator. I found the GetTCPHostAddress function in LabWindows but it only returns one IP address. I am curious if anyone knows how to determine which IP address it is returning if the PC has 3 of them and will it always return the same one?
0 Kudos
Message 1 of 2
(2,540 Views)
Hi,

CVI does not have native multiple IP support, the GetTCPHostAddress function will ask the OS for a list of the IP addresses available and it will return the first one reported by the OS. I've dome some testing here and seems that CVI will report the lower numeric value address.

You may want to look in the Windows SDK for a function that would allow you to get all the IP addresses found in the computer.

You can file a request for this feature, just go to www.ni.com/contact and select product feedback. The more request the better!

Let me know if you have other questions.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 2 of 2
(2,540 Views)