DNS_QUERY_RESULT structure (windns.h)

A DNS_QUERY_RESULT structure contains the DNS query results returned from a call to DnsQueryEx.

Syntax

typedef struct _DNS_QUERY_RESULT {
  ULONG       Version;
  DNS_STATUS  QueryStatus;
  ULONG64     QueryOptions;
  PDNS_RECORD pQueryRecords;
  PVOID       Reserved;
} DNS_QUERY_RESULT, *PDNS_QUERY_RESULT;

Members

Version

The structure version must be one of the following:

DNS_QUERY_REQUEST_VERSION1 (1)

QueryStatus

The return status of the call to DnsQueryEx.

If the query was completed asynchronously and this structure was returned directly from DnsQueryEx, QueryStatus contains DNS_REQUEST_PENDING.

If the query was completed synchronously or if this structure was returned by the DNS_QUERY_COMPLETION_ROUTINE DNS callback, QueryStatus contains ERROR_SUCCESS if successful or the appropriate DNS-specific error code as defined in Winerror.h.

QueryOptions

A value that contains a bitmap of DNS Query Options that were used in the DNS query. Options can be combined and all options override DNS_QUERY_STANDARD

pQueryRecords

A pointer to a DNS_RECORD structure.

If the query was completed asynchronously and this structure was returned directly from DnsQueryEx, pQueryRecords is NULL.

If the query was completed synchronously or if this structure was returned by the DNS_QUERY_COMPLETION_ROUTINE DNS callback, pQueryRecords contains a list of Resource Records (RR) that comprise the response.

Note  Applications must free returned RR sets with the DnsRecordListFree function.
 

Reserved

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Header windns.h

See also

DNS_QUERY_CANCEL

DNS_QUERY_COMPLETION_ROUTINE

DNS_QUERY_REQUEST