SafeArrayCreateVector (Windows CE 5.0)
This function creates a one-dimensional array for which the lower bound is always zero. Since a safe array created with SafeArrayCreateVector is a fixed size, the constant FADF_FIXEDSIZE is always set.
SAFEARRAY * SafeArrayCreateVector(VARTYPEvt,longlLbound,unsigned intcElements );
Parameters
- vt
[in] Base type of the array (the VARTYPE of each element of the array). The type is restricted to a subset of the variant types. Neither VT_ARRAY nor the VT_BYREF flag can be set. VT_EMPTY and VT_NULL are not valid base types for the array. All other types are legal. - lLbound
[in] Lower bound for the array. - cElements
[in] Number of elements in the array.
Return Values
Returns a pointer to a SAFEARRAY structure.
Remarks
SafeArrayCreateVector allocates a single block of memory that contains a SAFEARRAY structure for a one-dimensional array (24 bytes), immediately followed by the array data. All existing safe array functions work for safe arrays that are allocated with SafeArrayCreateVector.
Both the array descriptor and the array data block are allocated contiguously in one allocation, which speeds up array allocation. However, a user can allocate the descriptor and data area separately using the SafeArrayAllocDescriptor and SafeArrayAllocData functions.
Passing invalid (and under some circumstances NULL) pointers to this function causes an unexpected termination of the application.
Requirements
OS Versions: Windows CE 2.0 and later.
Header: Oleauto.h.
Link Library: Oleaut32.lib.
See Also
Automation Functions | VARTYPE | SAFEARRAY | SafeArrayAllocDescriptor | SafeArrayAllocData
Send Feedback on this topic to the authors