Click to See Complete Forum and Search --> : Getting IP address in vb


tvorce
January 28th, 2000, 08:45 AM
I want to set up a vb program that will determine the IP address, and if it is invalid, then request a new one. I had to set up dchp for ip addressing, and sometimes the host isn't available. The DOS command is ipconfig. But rather than send the output to a file, and read it, I would prefer to use an API to determine the results. Anybody have any ideas???

Lothar Haensler
January 28th, 2000, 08:57 AM
try using the Winsock functions gethostbyaddr or gethostbyname.

czimmerman
January 28th, 2000, 05:17 PM
This should help. It is a module containing various IP utilities.

http://www.freevbcode.com/ShowCode.Asp?ID=199