SafeArray
The SafeArray data type provides the underlying interface for Ole Automations arrays, used for example to represent array types in Visual Basic® and to gather user defined parameters for invocation through an IDispatch interface.
Safe arrays provide bounds checking and automatically manage the data types they contain, for example handing reference counting and copying of interface pointers. User defined types can be stored in arrays using the IRecordInfo interface.
There are two types of SafeArray, normal and vectors. Normal arrays can have multiple dimensions and the data for the array is allocated separately from the array header. This is the most flexible type of array. Vectors, on the other hand, are fixed in size and consist of a single allocated block, and a single dimension.
The following types of data can be stored within a SafeArray.
Numeric:
VT_I1, VT_UI1, VT_I2, VT_UI2, VT_I4, VT_UI4, VT_I8, VT_UI8, VT_INT, VT_UINT, VT_R4, VT_R8, VT_CY, VT_DECIMAL
Interfaces:
VT_DISPATCH, VT_UNKNOWN, VT_RECORD
Other:
VT_VARIANT, VT_INT_PTR, VT_UINT_PTR, VT_BOOL, VT_ERROR, VT_DATE, VT_BSTR.
BstrFromVector VectorFromBstr SafeArrayAllocDescriptor.
Copyright © 2005 The Wine Project. All trademarks are the property of their respective owners. Visit WineHQ for license details. Generated Aug 2005.