DsRemoveDsDomainA function

The DsRemoveDsDomain function removes all traces of a domain naming context from the global area of the directory service.

Syntax

NTDSAPI DWORD DsRemoveDsDomainA(
  HANDLE hDs,
  LPSTR  DomainDN
);

Parameters

hDs

Contains a directory service handle obtained from either the DSBind or DSBindWithCred function.

DomainDN

Pointer to a null-terminated string that specifies the distinguished name of the naming context to remove from the directory service.

Return Value

Returns ERROR_SUCCESS if successful or a Win32 or RPC error code if unsuccessful. Possible error codes include the following.

Requirements

   
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header ntdsapi.h
Library Ntdsapi.lib
DLL Ntdsapi.dll

See Also

Domain Controller and Replication Management Functions

DsBind

DsBindWithCred

DsRemoveDsServer