Index   Commented   Search   About

SafeArrayRedim

psa, psaboundNew)
SAFEARRAY FAR* psa
SAFEARRAYBOUND FAR* psaboundNew

Changes the least significant (rightmost) bound of a safe array.

Parameters

psa

Pointer to an array descriptor.

psaboundNew

Pointer to a new safe array bound structure containing the new array bound. Only the least significant dimension of an array may be changed.

Return Value

The SCODE obtained from the returned HRESULT is one of the following:

SCODE
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.

Comments

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

Related Links

Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder

More Online Helps

Win32 Programmer's Reference (win32.hlp)
Win32 Multimedia Programmer's Reference (mmedia.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp)
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008 Free Tect Secrets ;) greatis just4fun network just4fun