Internet Direct (Indy) Version 9.0.1 Beta
TIdDNSResolver.Resolve
Performs a DNS query to resolve a domain name, and parses the response.

procedure Resolve(ADomain: string);
Parameters
ADomain: string
Domain Name to resolve using the DNS query.

Description
Resolve is a Procedure that implements the processing required to perform a DNS query for the requested resource record types, and handle the response from the DNS server.

ADomain is the domain name to be resolved in the DNS query using the values specified in AllowRecursiveQueries and QueryRecords. Update QueryRecords and AllowRecursiveQueries prior to calling the Resolve method.

Resolve creates a DNS query packet, including the DNS header, using the value specified in ADomain. Resolve can raise an EIdDnsResolverError exception if a valid DNS query cannot be created using the values in ADomain, AllowRecursiveQueries, and QueryRecords.

Resolve send the DNS query packet to the server, and reads the DNS response. Resolve handles parsing of values in the DNS response into the DNS header and QueryResult. Resolve can raise an EIdDnsResolverError if a timeout occurs, or an incomplete data packet is received, while waiting for a DNS server response.