UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:iads.IDirectoryObject.DeleteDSObject |
IDirectoryObject::DeleteDSObject (iads.h) |
Deletes a leaf object in a directory tree. |
|
adsi\idirectoryobject_deletedsobject.htm |
adsi |
bb7bed74-1420-4b46-92a9-ebe31f2d88fd |
12/05/2018 |
DeleteDSObject, DeleteDSObject method [ADSI], DeleteDSObject method [ADSI],IDirectoryObject interface, IDirectoryObject interface [ADSI],DeleteDSObject method, IDirectoryObject.DeleteDSObject, IDirectoryObject::DeleteDSObject, _ds_idirectoryobject_deletedsobject, adsi.idirectoryobject__deletedsobject, adsi.idirectoryobject_deletedsobject, iads/IDirectoryObject::DeleteDSObject |
iads.h |
Windows |
Windows Vista |
Windows Server 2008 |
Activeds.dll |
Windows |
19H1 |
|
|
|
|
|
|
The IDirectoryObject::DeleteDSObject method deletes a leaf object in a directory tree.
The relative distinguished name (relative path) of the object to be deleted.
This method returns the standard return values, including S_OK for a successful operation. For more information and other return values, see ADSI Error Codes.
To delete a container object and its children, use the IADsDeleteOps::DeleteObject method.
The following C/C++ code example shows how to delete a user object.
HRESULT hr;
IDirectoryObject *pDirObject=NULL;
hr = ADsGetObject(L"LDAP://OU=Sales,DC=Fabrikam,DC=com",
IID_IDirectoryObject, (void**) &pDirObject );
if ( SUCCEEDED(hr) )
{
hr = pDirObject->DeleteDSObject( L"CN=Jeff Smith" );
pDirObject->Release();
}