IP address from domain name
I need to resolve the ip address from a domain name using visual basic 6.0. I am not very familiar with the using of visual basic library, the ping function in vbInternet class of the activeX library and GetIpFromHostName function of vbInternet in the activeX DLL in visual basic. Can someone guide me with a step-by-step using of the above functions?(eg. what library to load because i cannot find the function anywhere, how to load it out and the source of the library as i do not know whether it is a built-in library or one which had been written by someone else) Thanks.
Re: IP address from domain name
Goto http://www.mvps.org/vbnet and search for "How to Obtain the Host Name from an IP Address"
Re: IP address from domain name
Sorry wrong way round. the article is "How to Resolve a Hostname Into an IP Address"
Re: IP address from domain name
...the same: the forward address is:
http://www.mvps.org/vbnet/code/network/iplookup.htm
(I tested: it is great)
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, Bruno Paris and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus.
Re: IP address from domain name
there is two zip files, one vbLib.zip contains the source code for the library. second vbLibB.zip contains the build version. for your case, I think the best is to unzip all the source files in vbLib.zip and find the functions in vbInternet.cls
or if you want to add the library to vb program, then unzip all the files in vbLibB.zip to your system directory, for instance, c:\windows\system.
registr it by typing
regsvr32 c:\windows\system\vbdll.lib.
in vb program, in the menu Project\References, click on the vbLib, then in your program
dim vbInternet as new vbInternet
your should be able to call
vbInternet.Ping(Ip,timeout)
and so on
HTH
cksiow
http://vblib.virtualave.net - share our codes