IADsContainer::Create

Sets up a request to create an Active Directory object of the specified schema class and name in this container object. The object is not actually created until IADs::SetInfo on the new object saves the properties and initiates the action. This allows for setting mandatory properties on the new object.

HRESULT IADsContainer::Create(
  BSTR bstrClass,         //Name of the schema class of this object
  BSTR bstrRelativeName,  //Relative name of the object to create
  IDispatch ** ppNewObject     //Interface on the new object
);
 

Parameter

bstrClass
[in] Name of the schema class object to create, 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.
ppNewObject
[out] Indirect pointer to the IDispatch interface on the newly created object.

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 created within this container object.

QuickInfo

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

See Also

IADsContainer::Delete