SafeArrayCopyData Function

Copies the source array to the 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.

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

psaSource

The source safe array to copy.

psaTarget

On exit, the array referred to by psaTarget contains a copy of the data in psaSource.

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

Return value

Meaning

S_OK

Success.

E_INVALIDARG

The dimensions or the number of dimensions don't match.

E_OUTOFMEMORY

Insufficient memory to create the copy.

Show:
© 2014 Microsoft