Name
TVarArray Type
Syntax
type
TVarArray = packed record
DimCount: Word;
Flags: Word;
ElementSize: Integer;
LockCount: Integer;
Data: Pointer;
Bounds: array[0..255] of TVarArrayBound;
end;Description
The TVarArray record stores the information used
to implement a Variant array.
TVarData stores a pointer to a
TVarArray record when the
Variant type includes the
varArray
bit.
- DimCount
Stores the number of dimensions, which is always in the range 1..64.
- Flags
Feature flags that Windows uses to keep track of the array’s memory and how to manage it.
- ElementSize
The size in bytes of each element of the array. The element size depends on the element type, as stored in the
VTypefield ofTVarData.
- LockCount
The lock count is usually zero. It is incremented when you call
VarArrayLockand decremented when you callVarArrayUnlock. The only time you can resize an array is when itsLockCountis zero.
- Data
A pointer to the array’s data. The actual contents of the array are stored in a single dimensional array, where the leftmost subscript varies fastest (row-major order).
- Bounds
An array of
TVarArrayBoundrecords to keep track of the bounds for each array dimension. TheBoundsmember is allocated dynamically, so it actually containsDimCountrecords.
See TVarData to see how a
Variant stores the pointer to the
TVarArray record.
See Also
| PVarData Type, TVarArrayBound Type, TVarData Type, VarArrayCreate Function, VarArrayDimCount Function, VarArrayHighBound Function, VarArrayLock Function, VarArrayLowBound Function, ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access