01-27-2009 09:11 AM
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
01-27-2009 11:30 AM
I don't remember version 8, but in CVI 9 you can use the function InetResolveHostname from the Internet library.
Wolfgang
01-27-2009 01:03 PM
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
01-28-2009 01:14 AM
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