Returns the aliases for a given host name.
The HostAlias array returns the aliases assigned to the host specified by the HostAddress or HostName properties. If the host address or name can be resolved, the first element in the HostAlias array always refers to the host's fully qualified domain name.
The end of the alias list is indicated when the property returns an empty string. The array is zero based, meaning that the first index value is zero.
[Visual Basic]
Dim nIndex As Integer
ListBox1.Items.Clear()
dnsClient.HostName = strHostName
For nIndex = 0 To dnsClient.HostAliases - 1
ListBox1.Items.Add(dnsClient.HostAlias(nIndex))
Next
DnsClient Class | SocketTools Namespace | HostAliasArray Class | HostAliases Property