HostAliases Property  
 

Return the number of aliases for the specified host name.

Syntax

object.HostAliases

Remarks

The HostAliases property returns the number of aliases for the host specified by the HostName property. If the specified host name cannot be resolved, this property will return a value of zero.

Data Type

Integer (Int32)

Example

The following example places the all of the aliases for a specific host into a listbox:

Dim nIndex As Integer

List1.Clear
DnsClient1.HostName = Trim(Text1.Text)

For nIndex = 0 To DnsClient1.HostAliases - 1
     List1.AddItem DnsClient1.HostAlias(nIndex)
     nIndex = nIndex + 1
Loop

See Also

HostAddress Property, HostAlias Property, HostName Property