Hi, I'm developing a application that takes a host-name and converts that address to IP-address. Does anybody know how I can do this. Thanks.
Printable View
Hi, I'm developing a application that takes a host-name and converts that address to IP-address. Does anybody know how I can do this. Thanks.
If you know name of PC then you must modify GetIPHostName() function from
http://www.vbsquare.com/howto/getip.htm
Public Function GetIPHostName(sHostName$) As String
If Not SocketsInitialize() Then
GetIPHostName = ""
Exit Function
End If
GetIPHostName = Left$(sHostName, InStr(sHostName, Chr(0)) - 1)
SocketsCleanup
End Function
And call:
MsgBox "IP is " & GetIPHostName(Name_your_other_PC)
[email protected]
http://smalig.tripod.com
Thanks, by the way, good looking site...