Share via


SafeArrayCopyData (Compact 2013)

3/26/2014

This function copies the source array to the target array after releasing resources in the target array.

This function is similar to SafeArrayCopy, except that the target array must be set up by the caller. The target is not allocated or reallocated.

Syntax

HRESULT SafeArrayCopyData(
  SAFEARRAY FAR* psaSource, 
  SAFEARRAY FAR* FAR* psaTarget 
);

Parameters

  • psaSource
    [in] Pointer to the safearray to be copied.
  • psaTarget
    [out] On exit, a pointer to the array referred to by psaTarget that contains a copy of the data in psaSource.

Return Value

Returns the HRESULT values shown in the following table.

Value

Description

S_OK

Success.

E_INVALIDARG

The psa parameter was not a valid safearray descriptor.

E_OUTOFMEMORY

Insufficient memory to create the copy.

Requirements

Header

oleauto.h

Library

oleaut32.lib

See Also

Reference

Automation Functions
SafeArrayCopy