SafeArray.3w

Langue: en

Version: Jun 2009 (debian - 07/07/09)

Section: 3 (Bibliothèques de fonctions)

NAME

SafeArray

NOTES

The SafeArray data type provides the underlying interface for Ole Automations arrays, used for example to represent array types in Visual Basic(tm) 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.

DATATYPES

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.

FUNCTIONS

BstrFromVector() VectorFromBstr() SafeArrayAllocDescriptor().

SafeArrayAllocDescriptorEx().

SafeArrayAllocData().

SafeArrayCreate().

SafeArrayCreateEx().

SafeArrayCreateVector().

SafeArrayCreateVectorEx().

SafeArrayDestroyDescriptor().

SafeArrayLock().

SafeArrayUnlock().

SafeArrayPutElement().

SafeArrayGetElement().

SafeArrayGetUBound().

SafeArrayGetLBound().

SafeArrayGetDim().

SafeArrayGetElemsize().

SafeArrayAccessData().

SafeArrayUnaccessData().

SafeArrayPtrOfIndex().

SafeArrayDestroyData().

SafeArrayCopyData().

SafeArrayDestroy().

SafeArrayCopy().

SafeArrayRedim().

SafeArrayGetVartype().

SafeArraySetRecordInfo().

SafeArrayGetRecordInfo().

SafeArraySetIID().

SafeArrayGetIID().