IADsContainer::CopyHere method (iads.h)

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

Syntax

HRESULT CopyHere(
  [in]  BSTR      SourceName,
  [in]  BSTR      NewName,
  [out] IDispatch **ppObject
);

Parameters

[in] SourceName

The ADsPath of the object to copy.

[in] NewName

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.

[out] ppObject

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

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header iads.h
DLL Activeds.dll

See also

IADs

IADsContainer

IADsContainer::MoveHere