DnsStartMulticastQuery function (windns.h)

Used to register a discoverable service on this device.

Syntax

DNS_STATUS DnsStartMulticastQuery(
  PMDNS_QUERY_REQUEST pQueryRequest,
  PMDNS_QUERY_HANDLE  pHandle
);

Parameters

pQueryRequest

A pointer to an MDNS_QUERY_REQUEST structure that contains information about the query to be performed.

pHandle

A pointer to an MDNS_QUERY_HANDLE structure that will be populated with the necessary data. This structure is to be passed later to DnsStopMulticastQuery to stop the query.

Return value

If successful, returns ERROR_SUCCESS; otherwise, returns the appropriate DNS-specific error code as defined in Winerror.h. For extended error information, call GetLastError.

Remarks

This function is asynchronous. The query runs indefinitely, until DnsStopMulticastQuery is called. For each response from the network, the query callback will be invoked with the appropriate status and results.

Requirements

Requirement Value
Minimum supported client Windows 10 [desktop apps only]
Target Platform Windows
Header windns.h
Library dnsapi.lib
DLL dnsapi.dll