Windows apps
Collapse the table of content
Expand the table of content

SafeArrayCreateVectorEx Function

Creates and returns a one-dimensional safe array of the specified VARTYPE and bounds.

SAFEARRAY* SafeArrayCreateVectorEx(  
  VARTYPE  vt,             
  long  lLbound,           
  unsigned int  cElements,  
  LPVOID  pvExtra  


The base type of the array (the VARTYPE of each element of the array). The FADF_RECORD flag can be set for VT_RECORD. The FADF_HAVEIID can be set for VT_DISPATCH or VT_UNKNOWN and FADF_HAVEVARTYPE can be set for all other types. For more information about the FADF_RECORD, FADF_HAVEIID, or FADF_HAVEVARTYPE flags see SAFEARRAY Data Type [Automation].


The lower bound for the array. Can be negative.


The number of elements in the array.


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 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.

Points to the array descriptor, or Null if the array could not be created.

© 2017 Microsoft