DnsServiceDeRegister function (windns.h)
Used to remove a registered service.
Syntax
DWORD DnsServiceDeRegister(
PDNS_SERVICE_REGISTER_REQUEST pRequest,
PDNS_SERVICE_CANCEL pCancel
);
Parameters
pRequest
A pointer to the DNS_SERVICE_REGISTER_REQUEST structure that was used to register the service.
pCancel
Must be nullptr
.
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. The callback will be invoked when the deregistration is completed, with a copy of the DNS_SERVICE_INSTANCE structure that was passed to DnsServiceRegister when the service was registered.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10 [desktop apps only] |
Target Platform | Windows |
Header | windns.h |
Library | dnsapi.lib |
DLL | dnsapi.dll |