SafeArrayRedim (Windows CE 5.0)

Send Feedback

This function changes the right-most or least significant bound of a safearray.

HRESULT SafeArrayRedim(SAFEARRAY FAR* psa,SAFEARRAYBOUND FAR* psaboundNew );

Parameters

  • psa
    [in] Pointer to an array descriptor.

  • psaboundNew
    [out] Pointer to a new safearray bound structure that contains the new array boundary.

    Only the least significant dimension of an array can be changed.

Return Values

Returns the HRESULT values shown in the following table.

Value Description
S_OK Success.
DISP_E_ARRAYISLOCKED The array is locked.
E_INVALIDARG The item pointed to by psa is not a safearray descriptor.

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 the old and new array.

Passing invalid (and under some circumstances NULL) pointers to this function causes an unexpected termination of the application.

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Oleauto.h.
Link Library: Oleaut32.lib.

See Also

Automation Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.