Export (0) Print
Expand All

DsDeregisterDnsHostRecords function

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.

Syntax


DWORD DsDeregisterDnsHostRecords(
  _In_opt_  LPTSTR ServerName,
  _In_opt_  LPTSTR DnsDomainName,
  _In_opt_  GUID *DomainGuid,
  _In_opt_  GUID *DsaGuid,
  _In_      LPTSTR DnsHostName
);

Parameters

ServerName [in, optional]

The null-terminated string that specifies the name of the remote domain controller. Can be set to NULL if the calling application is running on the domain controller being updated.

DnsDomainName [in, optional]

The null-terminated string that specifies the DNS domain name of the domain occupied by the domain controller. It is unnecessary for this to be a domain hosted by this domain controller. If NULL, the DnsHostName with the leftmost label removed is specified.

DomainGuid [in, optional]

Pointer to the Domain GUID of the domain. If NULL, GUID specific names are not removed.

DsaGuid [in, optional]

Pointer to the GUID of the NTDS-DSA object to be deleted. If NULL, NTDS-DSA specific names are not removed.

DnsHostName [in]

Pointer to the null-terminated string that specifies the DNS host name of the domain controller whose DNS records are being deleted.

Return value

Return codeDescription
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.

 

Remarks

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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Dsgetdc.h

Library

Netapi32.lib

DLL

Netapi32.dll

Unicode and ANSI names

DsDeregisterDnsHostRecordsW (Unicode) and DsDeregisterDnsHostRecordsA (ANSI)

See also

DsGetDcSiteCoverage
DsGetSiteName

 

 

Show:
© 2014 Microsoft