LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to resolve ip address from hostname ?

 

hello,

how can I resolve ip address for the internet connected server from it's hostname ?

I'm using CVI 8.0.1.

regards,

petri

 

0 Kudos
Message 1 of 4
(3,635 Views)

I don't remember version 8, but in CVI 9 you can use the function InetResolveHostname from the Internet library.

 

Wolfgang

 

0 Kudos
Message 2 of 4
(3,625 Views)

The InetResolveHostname function was added in 8.5, so you won't have that function. Instead, you can use the Windows SDK function gethostbyname, which will populate a hostent structure for you. Then call the Windows inet_ntoa function on the address(es) returned in the h_addr_list structure member. Refer to the Windows SDK documentation for more details.

 

Hope this helps.

 

Mert A.

National Instruments

0 Kudos
Message 3 of 4
(3,617 Views)

thanks, actually I was hoping to get reply that it is included in the newer versions of cvi. I have been planning to upgrade my dev environment  to latest versions in any case, but here is one more reason why to run through that work. hopefully, cvi function is easier to use than the windows sdk.

regards,

petri

 

0 Kudos
Message 4 of 4
(3,603 Views)