DnsServiceResolve function (windns.h)
Used to obtain more information about a service advertised on the local network.
Syntax
DNS_STATUS DnsServiceResolve(
PDNS_SERVICE_RESOLVE_REQUEST pRequest,
PDNS_SERVICE_CANCEL pCancel
);
Parameters
pRequest
A pointer to a DNS_SERVICE_RESOLVE_REQUEST structure that contains the resolve request information.
pCancel
A pointer to a DNS_SERVICE_CANCEL structure that can be used to cancel a pending asynchronous resolve operation. This handle must remain valid until the query is canceled.
Return value
If successful, returns DNS_REQUEST_PENDING; otherwise, returns the appropriate DNS-specific error code as defined in Winerror.h
. For extended error information, call GetLastError.
Remarks
This function is asynchronous. Upon completion, the resolve callback will be invoked for each result. In contrast to DnsServiceBrowse—which returns the service name as a minimum—DnsServiceResolve can be used to retrieve additional information, such as hostname, IP address, and TEXT records.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10 [desktop apps only] |
Target Platform | Windows |
Header | windns.h |
Library | dnsapi.lib |
DLL | dnsapi.dll |