HRESULT SafeArrayRedim(
SAFEARRAY FAR* psa,
SAFEARRAYBOUND FAR* psaboundNew
);
Changes the right-most (least significant) bound of a safe array.
The return value obtained from the returned HRESULT is one of the following.
Return value | Meaning |
---|---|
S_OK | Success. |
DISP_E_ARRAYISLOCKED | The array is currently locked. |
E_INVALIDARG | The item pointed to by psa is not a safe array descriptor. |
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.
Windows NT: Use version 3.1 and later.
Windows: Use Windows 95 and later.
Header: Declared in oleauto.h.
Import Library: Link with oleaut32.lib.