SafeArrayCopyData function (oleauto.h)

Copies the source array to the specified target array after releasing any resources in the target array. This is similar to SafeArrayCopy, except that the target array has to be set up by the caller. The target is not allocated or reallocated.

Syntax

HRESULT SafeArrayCopyData(
  [in] SAFEARRAY *psaSource,
  [in] SAFEARRAY *psaTarget
);

Parameters

[in] psaSource

The safe array to copy.

[in] psaTarget

The target safe array.

Return value

This function can return one of these values.

Return code Description
S_OK
Success.
E_INVALIDARG
The argument psa was not valid.
E_OUTOFMEMORY
Insufficient memory to complete the operation.

Requirements

Requirement Value
Target Platform Windows
Header oleauto.h
Library OleAut32.lib
DLL OleAut32.dll