VARIANT members table

C type QM type Name vt vt constant Comments
      0 VT_EMPTY [V] [P] nothing
      1 VT_NULL [V] [P] SQL style Null
short word (p)iVal 2 VT_I2 [V][T][P][S] 2 byte signed integer
int, long int (p)lVal 3 VT_I4 [V][T][P][S] 4 byte signed integer
float FLOAT (p)fltVal 4 VT_R4 [V][T][P][S] 4 byte real
double double (p)dblVal 5 VT_R8 [V][T][P][S] 8 byte real
CY CURRENCY (p)cyVal 6 VT_CY [V][T][P][S] currency
DATE DATE (p)date 7 VT_DATE [V][T][P][S] date/time
BSTR BSTR (p)bstrVal 8 VT_BSTR [V][T][P][S] OLE Automation string
IDispatch* IDispatch (p)pdispVal 9 VT_DISPATCH [V][T][P][S] interface that supports IDispatch
SCODE int (p)scode 10 VT_ERROR [V][T][P][S] error code
VARIANT_BOOL word (p)boolVal 11 VT_BOOL [V][T][P][S] boolean. True=-1 (0xffff in word), False=0.
VARIANT* VARIANT* pvarVal 12 VT_VARIANT [V][T][P][S] In VARIANT it is pointer to other VARIANT, with VT_BYREF flag. In array not pointer.
IUnknown* IUnknown (p)punkVal 13 VT_UNKNOWN [V][T] [S] interface that does not support IDispatch
DECIMAL DECIMAL (p)decVal 14 VT_DECIMAL [V][T] [S] uses whole VARIANT
char byte (p)cVal 16 VT_I1 [V][T][P][S] 1 byte signed integer
BYTE (unsigned char) byte (p)bVal 17 VT_UI1 [V][T][P][S] 1 byte unsigned integer
WORD (unsigned short) word (p)uiVal 18 VT_UI2 [V][T][P][S] 2 byte unsigned integer
DWORD (unsigned long) int (p)ulVal 19 VT_UI4 [V][T][P][S] 4 byte unsigned integer
__int64 long (p)llVal 20 VT_I8 [V][T][P][S] 8 byte signed integer
unsigned __int64 long (p)ullVal 21 VT_UI8 [V][T][P][S] 8 byte unsigned integer
int int (p)intVal 22 VT_INT [V][T][P][S] use VT_I4 instead
UINT (unsigned int) int (p)uintVal 23 VT_UINT [V][T] [S] use VT_UI4 instead
void* byte* byref 24 VT_VOID [T] C style void
      25 VT_HRESULT [T] Standard return type
      26 VT_PTR [T] pointer type
      27 VT_SAFEARRAY [T] safe array
      28 VT_CARRAY [T] C style array
      29 VT_USERDEFINED [T] user-defined type
      30 VT_LPSTR [T][P] null terminated string
      31 VT_LPWSTR [T][P] wide null terminated string
    pvRecord 36 VT_RECORD [V] [P][S] user-defined type. In QM used only in arrays.
      65 VT_BLOB [P] Length prefixed bytes
      66 VT_STREAM [P] Name of the stream follows
      67 VT_STORAGE [P] Name of the storage follows
      68 VT_STREAMED_OBJECT [P] Stream contains an object
      69 VT_STORED_OBJECT [P] Storage contains an object
      70 VT_BLOB_OBJECT [P] Blob contains an object
      71 VT_CF [P] Clipboard format
      72 VT_CLSID [P] Class ID
      0x1000 VT_VECTOR [P] simple counted array (flag)
    (p)parray 0x2000 VT_ARRAY [V] SAFEARRAY* (flag)
      0x4000 VT_BYREF [V] pointer (flag)


If SAFEARRAY* (ARRAY in QM) is stored in VARIANT, vt is element type with VT_ARRAY flag.

(p) - exists member with p prefix. It is pointer, and vt is with VT_BYREF flag.

[V] - may appear in a VARIANT.

[S] - may appear in a SAFEARRAY.

[P] - may appear in an OLE property set.

[T] - may appear in a TYPEDESC (type library).