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.
| Return code | Description |
|---|---|
|
The domain object cannot be deleted because there are still domain controllers that host that domain. |
|
The domain object being deleted is bound to by hDs. |
|
The domain object cannot be deleted because there are still domain controllers that host that domain. |
|
A cross reference for the naming context cannot be found. |
|
A parameter is invalid. |
|
The DsRemoveDsDomain function is not supported. |
|
A versioning error occurred. |
Requirements
|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server | Windows 2000 Server [desktop apps only] |
|
Redistributable | Active Directory Client Extension on Windows NT 4.0 and Windows Me/98/95 |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names | DsRemoveDsDomainW (Unicode) and DsRemoveDsDomainA (ANSI) |
See also
Send comments about this topic to Microsoft
Build date: 10/26/2012