IADsContainer::CopyHere

Creates a new copy of the specified Active Directory object in this container. Copies can only be made within containers in one Active Directory provider's implementation, not across directory systems.

HRESULT IADsContainer::CopyHere(
  BSTR bstrSourceObject,  //Name of the object to copy
  BSTR bstrNewName,       //Optional name for the new object
  IADs ** ppNewObject     //Interface on the new object
);
 

Parameter

bstrSourceObject
[in] The object to be copied.
bstrNewName
[in] Optional name of the new object within the container.
ppNewObject
[out] Indirect pointer to the IADs interface on the copied 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 copied to this container.

Remarks

The destination container must be in the same directory service as the source container. Copying objects across directory service implementations is not permitted.

QuickInfo

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

See Also

IADsContainer::MoveHere