Topic Path: Symbol Reference > Classes > TIdDNSResolver Class > TIdDNSResolver Methods > FillResult Method
ContentsIndexHome
PreviousUpNext
TIdDNSResolver.FillResult Method

Captures and parses results returned in a DNS query response.

procedure FillResult(
    AResult: TIdBytes; 
    checkID: boolean = true; 
    ResetResult: boolean = true
);
Parameters 
Description 
AResult 
Raw byte values for the DNS query result.
 
checkID 
Indicates if the ID in the DNS query response must match the ID in the DNS query.
 
ResetResult 
Indicates QueryResult is cleared prior to parsing answers in the DNS query response. 

FillResult is a procedure used to capture and parse results returned in a DNS query response in the Resolve method. 

FillResult will raise an EIdDnsResolverError exception if the size of the DNS results in AResult is smaller than the 12 bytes (size of the DNS header in a DNS query response). 

FillResult parses values in the DNS header to get access to the identifier and result code for the DNS query response. 

When CheckID contains True, the identifier in the DNS query reponse must match the identifier from the DNS query or an EIdDnsResolverError will be raised. 

FillResult checks the result code from the internal TDNSHeader instance to determine if an error has occurred. A non-zero value in the result code causes an EIdDnsResolverError exception to be raised. 

FillResult parses each of the DNS answers included in the DNS query response. 

When ResetResult contains True, the value in QueryResult is cleared when ParseAnswer is called to parse each answer in the DNS query response. 

Use QueryResult to access the resource records returned in the DNS query response.

Exceptions 
Description 
With the message RSQueryLessThanTwelve when an invalid DNS header is present. With the message RSQueryInvalidHeaderID when the DNS query response identifier does not match the DNS query identifier. With the response code from the DNS query response. 
Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.