SocketTools .NET Edition

DnsClient.Resolve Method 

Resolve a hostname to an Internet address.

[Visual Basic]
Public Function Resolve( _
   ByVal hostName As String, _
   ByRef hostAddress As String _
) As Boolean
[C#]
public bool Resolve(
   string hostName,
   ref string hostAddress
);

Parameters

hostName
A string which specifies the hostname to resolve.
hostAddress
A string which will contain the Internet address for the specified hostname when the method returns. If the hostname cannot be resolved, this parameter will be set to an empty string.

Return Value

A boolean value which specifies if the method was successful or not. A return value of True indicates that the method call completed successfully. A return value of False indicates that the method failed and the application should check the value of the LastError property.

Remarks

The Resolve method is used to convert a host name into an Internet address. Note that unlike the Query method, this method will use the local host file when resolving the host name.

See Also

DnsClient Class | SocketTools Namespace