VarUtils.SafeArrayRedim

From RAD Studio VCL Reference
Jump to: navigation, search

Contents

Delphi Information

From VarUtils.pas

	function SafeArrayRedim(VarArray: PVarArray; const NewBound: TVarArrayBound): HRESULT;


Unit: VarUtils

Type: function

Visibility: public

C++ Information

From VarUtils.hpp

	long __fastcall SafeArrayRedim(System::TVarArray * VarArray, const System::TVarArrayBound & NewBound);


Unit: VarUtils

Type: function

Description

Changes the bound information for the last dimension of a safe array.


SafeArrayRedim resizes the safe array given through the VarArray parameter, by changing the bound information for the last dimension of the array, according to the NewBound parameter. VarArray is a pointer to the safe array.

The possible return values of SafeArrayRedim are listed in the following table, together with their meaning.



Value Meaning

VAR_OK

The operation was completed successfully.

VAR_INVALIDARG

The given argument is nil.

VAR_ARRAYISLOCKED

The array given through VarArray is locked.

VAR_EXCEPTION

The application raised an exception.

VAR_OUTOFMEMORY

There is not enough memory to complete the operation.



After the resizing operation took place, the existing elements of the array are preserved and the new elements are set to zero or empty.

Note:  A safe array cannot be resized while it is locked.

See Also

Personal tools
Translations
Newest Version