DsRemoveDsDomain function
The DsRemoveDsDomain function removes all traces of a domain naming context from the global area of the directory service.
Syntax
DWORD DsRemoveDsDomain( _In_ HANDLE hDs, _In_ LPTSTR DomainDN );
Parameters
- hDs [in]
-
Contains a directory service handle obtained from either the DSBind or DSBindWithCred function.
- DomainDN [in]
-
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.
- ERROR_DS_CANT_DELETE
-
The domain object cannot be deleted because there are still domain controllers that host that domain.
- ERROR_DS_ILLEGAL_MOD_OPERATION
-
The domain object being deleted is bound to by hDs.
- ERROR_DS_NC_STILL_HAS_DSAS
-
The domain object cannot be deleted because there are still domain controllers that host that domain.
- ERROR_DS_NO_CROSSREF_FOR_NC
-
A cross reference for the naming context cannot be found.
- ERROR_INVALID_PARAMETER
-
A parameter is invalid.
- RPC_S_CANNOT_SUPPORT
-
The DsRemoveDsDomain function is not supported.
- RPC_S_INVALID_VERS_OPTION
-
A versioning error occurred.
Requirements
|
Minimum supported client |
Windows Vista |
|---|---|
|
Minimum supported server |
Windows Server 2008 |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
DsRemoveDsDomainW (Unicode) and DsRemoveDsDomainA (ANSI) |
See also