Perform a general nameserver query for a specific type of record.
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.
The Query method performs a general nameserver query for a given record based on the name and type. This method will not use a local host file when performing host name or address queries.
To resolve a hostname into an Internet address, it is recommended that you use the Resolve method.
The following example queries a nameserver for the TXT record for the specified remote host. If a record is found, its value will be displayed in a message box.
[Visual Basic]
Dim strRecord As String
If dnsClient.Query(TextBox1.Text, RecordType.dnsRecordTXT, strRecord) Then
MsgBox(strRecord, MsgBoxStyle.Information)
End If
DnsClient Class | SocketTools Namespace | HostAddress Property | HostName Property | Resolve Method