Platforms to show: All Mac Windows Linux Cross-Platform

Back to DNSServiceQueryRecordMBS class.

DNSServiceQueryRecordMBS.QueryRecord(InterfaceIndex as Integer, FullName as string, rrType as Integer, rrClass as Integer, Flags as Integer = 0) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DNS MBS Network Plugin 16.1 ✅ Yes ✅ Yes ❌ No ✅ Yes All
Query for an arbitrary DNS record.

Flags: kFlagsForceMulticast or kFlagsLongLivedQuery. Pass kFlagsLongLivedQuery to create a "long-lived" unicast query to a unicast DNS server that implements the protocol. This flag has no effect on link-local multicast queries.
interfaceIndex: If non-zero, specifies the interface on which to issue the query (the index for a given interface is determined via the if_nametoindex() family of calls.) Passing 0 causes the name to be queried for on all interfaces. See "Constants for specifying an interface index" for more details.
fullname: The full domain name of the resource record to be queried for.
rrtype: The numerical type of the resource record to be queried for (e.g. kType_PTR, kType_SRV, etc)
rrclass: The class of the resource record (usually kClass_IN).

Lasterror is set: Returns kErr_NoError on success (any subsequent, asynchronous errors are delivered to the event), otherwise returns an error code indicating the error that occurred.
Returns false in case of error or true in case of success.

You can use DNSServiceBaseMBS.ConstructFullName to build the full name.

Some examples using this method:

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


The biggest plugin in space...