Resolves a host name to a host IP address.
Syntax
object.Resolve( HostName, IpAddress )
Parameters
- HostName
- A string value that specifies the host name to resolve.
- IpAddress
- A string that will contain the IP address of the specified host
when the method returns. This parameter must be passed by reference.
The value that is returned may be either a dotted-quad IPv4 address
or an IPv6 address, depending on the configuration of the local
system and what addresses are assigned to the host name.
Return Value
A value of zero is returned if the host name could be resolved
into an IP address. Otherwise, a non-zero error code is returned
which indicates the cause of the failure.
Remarks
The Resolve method is used to resolve a host name into an IP
address. If the host name has both an IPv4 and IPv6 address associated
with it, this method will return the IPv4 address by default. If the
host name only has an IPv6 address, that value will be returned if the
local system has an IPv6 TCP/IP stack installed; otherwise, the method
will fail with an error indicating that the host name could not be
resolved.
See Also
AutoResolve Property,
HostAddress Property,
HostFile Property,
HostName Property
|