IADsContainer::Delete

Deletes the specified Active Directory object from this container object.

HRESULT IADsContainer::Delete(
  BSTR bstrClass,        //Name of the schema class of this object
  BSTR bstrRelativeName  //Relative name of the object to create
);
 

Parameter

bstrClass
[in] Name of the schema class object to delete, as it is found through the IADs::get_Schema method.
bstrRelativeName
[in] Name of the object as it is known in the underlying directory and identical to the one retrieved through the IADs::get_Name method.

Return Values

This method supports the standard return values E_FAIL and E_UNEXPECTED, as well as the following:

S_OK
The specified object has been successfully deleted from this container object.

Remarks

When you delete an object, make sure you delete the interface pointers to that object. Deleting an object removes it from the underlying file system immediately. Any interface pointers held by the application for the deleted object are still valid because the interface pointers refer to Active Directory objects in memory. SetInfo and GetInfo calls using interface pointers for a deleted object return an error.

QuickInfo

  Windows NT: Use version 4.0 and later.
  Windows CE: Unsupported.
  Header: Declared in iads.h.

See Also

IADsContainer::Create