Resolves the IP address for a specified hostname.

ResolveHostToIp(cHostname [, cArrayName])

Parameters

cHostname

The hostname e.g "www.google.com" or a server on your network

cArrayname (optional)

If you pass an arrayname the function returns the number of IP addresses and stores the IPs into the array.

Return Value

If no array name was passed as the second parameter the IP (string) or an empty string if the host could not be resolved.
If an array name was passed the number of IP addresses for the host or 0 if the host could not be resolved.

See Also

Reference

AbortUrlDownloadToFileEx
AIpAddresses
ANetFiles
ANetServers
GetServerTime
IcmpPing
Ip2MacAddress
SyncToSNTPServer
UrlDownloadToFileEx

Used WinApi functions

gethostbyname
inet_ntoa