SafeArrayCopyData

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

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

Parameters

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

Return Values

One of the values obtained from the returned HRESULT and described in the following table is returned.

Value Description
S_OK Success.
E_INVALIDARG The psa parameter was not a valid safearray descriptor.
E_OUTOFMEMORY Insufficient memory to create the copy.

Remarks

Visual Basic for Applications and Automation use the same set of rules with cases in which the size or types of source and destination arrays do not match. The rules of Visual Basic are described in the following comments. Passing into this function any invalid and, under some circumstances, NULL pointers will result in unexpected termination of the application.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Oleauto.h   Oleaut32.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.