LookupNS object
The ExLookupNS COM object is a DNS (Domain Name Service) component that can be used for network diagnosing, troubleshooting, and monitoring. The ExLookpNS allows developers to integrate the DNS protocol message sending capability into their applications. The ExLookupNS's object model is rich, flexible and very intuitive. The ExLookupNS component automatically detects configured DNS servers.

The following sample displays the IP address(es) of the host:

Dim n As New LookupNS
MsgBox n.Query("yahoo.com").Address

The LookupNS object supports the following properties and methods:

NameDescription
DebugRetrieves a string for debug purpose.
DefaultServerRetrieves the default DNS server.
LastErrorRetrieves a value that indicates the last error occurred.
LastErrorCodeRetrieves the code of the last error.
PortRetrieves or sets a value that indicates the port to send query on. By default is 53.
QueryRetrieves a Message object that contains information about the Host.
QueryClassRetrieves or sets the class of the query.
SeparatorRetrieves or sets a value that indicates the string expression used to separate multiple values.
ServerRetrieves or sets a value that indicates the default server.
TimeOutSpecifies the amount of time (in seconds) the control will wait for the server response.