Internet Direct (Indy)
Home
PreviousUpNext
TIdDNSResolver.CreateQuery@string

Builds the DNS query packet format transmitted to the DNS server.

Parameters 
Description 
ADomain 
Domain name to resolve in the query. 

CreateQuery is a method used to build the DNS query packet in the form transmitted to the DNS server. 

ADomain indicates the domain name to be resolved in the DNS query, and contains values in the form required for the indicated QueryType values. 

CreateQuery updates values in the internal DNSHeader used for the query based on propery values specified for the client. This includes generating the identifier for the DNS query, and setting values in TIDNSHeader properties to match the values indicated in QueryTypes and ADomain. 

When QueryType contains the value qtAXFR, the value in ADomain is adjusted to ensure the proper use of Domain names, or IP Addresses in both IPv4 and IPv6 formats. This includes removing any 'IP-ADDR' or 'IP6.INT' prefixes, and removing leading '.' characters occurring in the value specified in ADomain. 

When QueryType does not contain the value qtAXFR, CreatQuery creates a DNS question for each of the values in QueryType using the domain name specified in ADomain. If QuerytType includes the value qtPTR, the value in ADomain is adjusted to ensure the proper use of Domain names, or IP Addresses in both IPv4 and IPv6 formats. This includes removing any 'IP-ADDR' or 'IP6.INT' prefixes, and removing leading '.' characters occurring in the value specified in ADomain. 

CreateQuery stores the generated DNS Query values in the InternalQuery property. 

CreateQuery is used in the Resolve method when the internal DNS header has not been initialized for the DNS resolver client. Applications do not normally call CreateQuery directly.

TDNSHeader Resolve QueryType InternalQuery

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.