Platforms to show: All Mac Windows Linux Cross-Platform

Back to WindowsDNSRecordMBS class.

WindowsDNSRecordMBS.Query(name as string, type as Integer, options as Integer = 0) as WindowsDNSRecordMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Network MBS Win Plugin 10.4 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Performs a DNS query on Windows.

The DnsQuery function type is the generic query interface to the DNS namespace, and provides application developers with a DNS query resolution interface.

name: a string that represents the name of the owner of the record set that is queried.
type: A value that represents the RR DNS Record Type that is queried.
Options: A value that contains a combination of kDNSQuery* constants.

Returns the record chain on success.

Applications that call the DnsQuery function build a query using a fully-qualified DNS name and Resource Record (RR) type, and set query options depending on the type of service desired. When the kDNSQueryStandard option is set, DNS uses the resolver cache, queries first with UDP, then retries with TCP if the response is truncated, and requests that the server to perform recursive resolution on behalf of the client to resolve the query.

Note When calling one of the DnsQuery function types, be aware that a DNS server may return multiple records in response to a query. A computer that is multihomed, for example, will receive multiple A records for the same IP address. The caller must use as many of the returned records as necessary.

Consider the following scenario, in which multiple returned records require additional activity on behalf of the application: A Query function call is made for a multihomed computer and the application finds that the address associated with the first A record is not responding. The application should then attempt to use other IP addresses specified in the (additional) A records returned from the Query function call.

The items on this page are in the following plugins: MBS Win Plugin.


The biggest plugin in space...