This topic has not yet been rated - Rate this topic

SafeArrayCopy function

Applies to: desktop apps | Metro style apps

Creates a copy of an existing safe array.

Syntax

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

Parameters

psa [in]

A safe array descriptor created by SafeArrayCreate.

ppsaOut [out]

The safe array descriptor.

Return value

This function can return one of these values.

Return codeDescription
S_OK

Success.

E_INVALIDARG

The argument psa was not valid.

E_OUTOFMEMORY

Insufficient memory to complete the operation.

 

Remarks

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.

Requirements

Header

OleAuto.h

Library

OleAut32.lib

DLL

OleAut32.dll

See also

SysAllocStringLen
VariantCopy
VariantCopyInd

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ