IADsContainer::CopyHere method

The IADsContainer::CopyHere method creates a copy of the specified directory object in this container.

Syntax


HRESULT CopyHere(
  [in]  BSTR      bstrSourceObject,
  [in]  BSTR      bstrNewName,
  [out] IDispatch **ppNewObject
);

Parameters

bstrSourceObject [in]

The ADsPath of the object to copy.

bstrNewName [in]

Optional name of the new object within the container. If a new name is not specified for the object, set to NULL; the new object will have the same name as the source object.

ppNewObject [out]

Indirect pointer to the IADs interface on the copied object.

Return value

This method supports the standard return values, including S_OK for a successful operation. For more information and error code information, see ADSI Error Codes.

Remarks

The destination container must be in the same directory service as the source container. An object cannot be copied across a directory service implementation.

The providers supplied with ADSI return the E_NOTIMPL error message.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Iads.h

DLL

Activeds.dll

IID

IID_IADsContainer is defined as 001677D0-FD16-11CE-ABC4-02608C9E7553

See also

IADsContainer
IADsContainer::MoveHere
IADs

 

 

Show: