DSAFEARRAY.CreateVectorExmethod
Creates a one-dimensional safe array from the given VARTYPE, lower bound and number elements.
Syntax
FUNCTION CreateVectorEx (BYVAL vt AS VARTYPE, BYVAL cElements AS ULONG, BYVAL lLBound AS LONG, BYVAL pvExtra AS ANY PTR) AS HRESULT
Parameters
| Name | Description | |
|---|---|---|
vt | The base type of the array (the VARTYPE of each element of the array). The VARTYPE is restricted to a subset of the variant types. Neither the 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. The FADF_RECORD flag can be set for a variant type VT_RECORD, The FADF_HAVEIID flag can be set for VT_DISPATCH or VT_UNKNOWN, and FADF_HAVEVARTYPE can be set for all other VARTYPEs. For more information about the FADF_RECORD, FADF_HAVEIID or FADF_HAVEVARTYPE flags see SAFEARRAY Data Type. | |
cElements | The number of elements in the array. | |
lLBound | The lower bound for the array. Can be negative. | |
pvExtra | Points to the type information of the user-defined type, if you are creating a safe array of user-defined types. If the vt parameter is VT_RECORD, then pvExtra will be a pointer to an IRecordInfo interface describing the record. If the vt parameter is VT_DISPATCH or VT_UNKNOWN, then pvExtra will contain a pointer to a GUID representing the type of interface being passed to the array. |
Return value
S_OK (0) on success or an HRESULT code on failure.
Description
Creates a fixed size safe array from the given VARTYPE, lower bound and number of elements.
Reference
- Include file
DSafeArray.inc - Defined in AfxNova/DSafeArray.inc:659
- Documented in COM/DSAFEARRAY Class.md
- Topic: DSAFEARRAY Class