Directory Services |
The DsDeregisterDnsHostRecords function deletes DNS entries, except for type A records registered by a domain controller. Only an administrator, account operator, or server operator may call this function.
DWORD DsDeregisterDnsHostRecords( LPTSTR ServerName, LPTSTR DnsDomainName, GUID* DomainGuid, GUID* DsaGuid, LPTSTR DnsHostName );
Return Code | Description |
---|---|
NO_ERROR | Success |
ERROR_ACCESS_DENIED | The user is not authorized to perform this operation. |
ERROR_NOT_SUPPORTED | The specified server is not a DC. |
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.
Client: Included in Windows XP and
Windows 2000 Professional.
Server: Included in Windows Server 2003 and
Windows 2000 Server.
Unicode: Implemented as Unicode and ANSI versions.
Header: Declared in Dsgetdc.h.
Library: Use Netapi32.lib.