Skip to content

Latest commit

 

History

History
68 lines (56 loc) · 2.03 KB

nf-windns-dnsserviceregister.md

File metadata and controls

68 lines (56 loc) · 2.03 KB
UID title description tech.root helpviewer_keywords ms.date ms.keywords targetos req.assembly req.construct-type req.ddi-compliance req.dll req.header req.idl req.include-header req.irql req.kmdf-ver req.lib req.max-support req.namespace req.redist req.target-min-winverclnt req.target-min-winversvr req.target-type req.type-library req.umdf-ver req.unicode-ansi ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:windns.DnsServiceRegister
DnsServiceRegister function
Used to register a discoverable service on this device. (DnsServiceRegister)
dns
DnsServiceRegister
02/14/2019
DnsServiceRegister
Windows
function
dnsapi.dll
windns.h
dnsapi.lib
Windows 10 [desktop apps only]
Windows
19H1
DnsServiceRegister
windns/DnsServiceRegister
c++
apiref
windns.h
DnsServiceRegister

-description

Used to register a discoverable service on this device.

-parameters

-param pRequest

A pointer to a DNS_SERVICE_REGISTER_REQUEST structure that contains information about the service to be registered.

-param pCancel

An optional (it can be nullptr) pointer to a DNS_SERVICE_CANCEL structure that can be used to cancel a pending asynchronous registration operation. If not nullptr, then this handle must remain valid until the registration is canceled.

-returns

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. The registration callback will be called once the registration succeeds. To deregister the service, call DnsServiceDeRegister.   The registration is tied to the lifetime of the calling process. If the process goes away, the service will be automatically deregistered.

-see-also