DnsServiceBrowseCancel function (windns.h)

Used to cancel a running DNS-SD discovery query.

Syntax

DNS_STATUS DnsServiceBrowseCancel(
  PDNS_SERVICE_CANCEL pCancelHandle
);

Parameters

pCancelHandle

A pointer to the DNS_SERVICE_CANCEL structure that was passed to the DnsServiceBrowse call that is to be cancelled.

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

Canceling the query causes one further invocation of the browse callback, with status ERROR_CANCELLED.

Requirements

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