SafeArrayCopy Function

Creates a copy of an existing safe array.

HRESULT SafeArrayCopy(  
  SAFEARRAY *psa,
  SAFEARRAY **ppsaOut
);
psa

Pointer to an array descriptor created by SafeArrayCreate.

ppsaOut

Pointer to a location in which to return the new array descriptor.

The return value obtained from the returned HRESULT is one of the following.

Return value

Meaning

S_OK

Success.

E_INVALIDARG

The argument ppsaOut was not a valid safe array descriptor.

E_OUTOFMEMORY

Insufficient memory to create the copy.

SafeArrayCopy calls the string or variant manipulation functions if the array to copy contains either of these data types. If the array being copied contains object references, the reference counts for the objects are incremented.

Show:
© 2014 Microsoft. All rights reserved.