Platform SDK: Active Directory, ADSI, and Directory Services |
The DsDeregisterDnsHostRecords function deletes domain name service (DNS) entries, except for type A records, that were registered by a domain controller. It can be executed on a domain controller other than the domain controller whose DNS entries are being removed. Only an administrator, account operator, or server operator may call this function.
This function deregisters SRV and CNAME records only. It leaves type A records intact. Deletion of site specific records (for example, _ldap._tcp._<SiteName>._sites.dc._msdcs.<DnsDomainName>) is attempted for every site (<SiteName> in this example) in the enterprise of the domain controller on which the function is executed. Therefore, this function call could create a time-consuming run and may generate significant network traffic for enterprises with many sites.
DWORD DsDeregisterDnsHostRecords( LPSTR ServerName, LPSTR DnsDomainName, GUID *DomainGuid, GUID *DsaGuid, LPSTR **DnsHostName );
Value | Meaning |
---|---|
NO_ERROR | Success |
ERROR_ACCESS_DENIED | The caller is not allowed to perform this operation. |
ERROR_NOT_SUPPORTED | The server specified is not a DC. |
Windows NT/2000: Requires Windows 2000.
Header: Declared in Dsgetdc.h.
Library: Included as a resource in Ntdsapi.dll.
Unicode: Implemented as Unicode and ANSI versions on Windows 2000.