Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SafeArrayRedim function

Changes the right-most (least significant) bound of the specified safe array.

Syntax


HRESULT SafeArrayRedim(
  _Inout_ SAFEARRAY      *psa,
  _In_    SAFEARRAYBOUND *psaboundNew
);

Parameters

psa [in, out]

A safe array descriptor.

psaboundNew [in]

A new safe array bound structure that contains the new array boundary. You can change only the least significant dimension of an array.

Return value

This function can return one of these values.

Return codeDescription
S_OK

Success.

E_INVALIDARG

The argument psa is not valid.

DISP_E_ARRAYISLOCKED

The array is locked.

 

Remarks

If you reduce the bound of an array, SafeArrayRedim deallocates the array elements outside the new array boundary. If the bound of an array is increased, SafeArrayRedim allocates and initializes the new array elements. The data is preserved for elements that exist in both the old and new array.

Requirements

Header

OleAuto.h

Library

OleAut32.lib

DLL

OleAut32.dll

 

 

Show:
© 2017 Microsoft