- UID
- 1821
- 精华
- 积分
- 3247
- 威望
- 点
- 宅币
- 个
- 贡献
- 次
- 宅之契约
- 份
- 最后登录
- 1970-1-1
- 在线时间
- 小时
|
楼主 |
发表于 2022-5-24 22:30:15
|
显示全部楼层
本帖最后由 Ayala 于 2022-5-24 23:20 编辑
https://docs.microsoft.com/en-us ... dl/ns-oaidl-variant
找到微软官方的了
- typedef struct tagVARIANT {
- union {
- struct {
- VARTYPE vt;
- WORD wReserved1;
- WORD wReserved2;
- WORD wReserved3;
- union {
- LONGLONG llVal;
- LONG lVal;
- BYTE bVal;
- SHORT iVal;
- FLOAT fltVal;
- DOUBLE dblVal;
- VARIANT_BOOL boolVal;
- VARIANT_BOOL __OBSOLETE__VARIANT_BOOL;
- SCODE scode;
- CY cyVal;
- DATE date;
- BSTR bstrVal;
- IUnknown *punkVal;
- IDispatch *pdispVal;
- SAFEARRAY *parray;
- BYTE *pbVal;
- SHORT *piVal;
- LONG *plVal;
- LONGLONG *pllVal;
- FLOAT *pfltVal;
- DOUBLE *pdblVal;
- VARIANT_BOOL *pboolVal;
- VARIANT_BOOL *__OBSOLETE__VARIANT_PBOOL;
- SCODE *pscode;
- CY *pcyVal;
- DATE *pdate;
- BSTR *pbstrVal;
- IUnknown **ppunkVal;
- IDispatch **ppdispVal;
- SAFEARRAY **pparray;
- VARIANT *pvarVal;
- PVOID byref;
- CHAR cVal;
- USHORT uiVal;
- ULONG ulVal;
- ULONGLONG ullVal;
- INT intVal;
- UINT uintVal;
- DECIMAL *pdecVal;
- CHAR *pcVal;
- USHORT *puiVal;
- ULONG *pulVal;
- ULONGLONG *pullVal;
- INT *pintVal;
- UINT *puintVal;
- struct {
- PVOID pvRecord;
- IRecordInfo *pRecInfo;
- } __VARIANT_NAME_4;
- } __VARIANT_NAME_3;
- } __VARIANT_NAME_2;
- DECIMAL decVal;
- } __VARIANT_NAME_1;
- } VARIANT;
复制代码
https://docs.microsoft.com/en-us ... 4-9d14-5425d3f5461f
- typedef enum tagVARENUM
- {
- VT_EMPTY = 0x0000,
- VT_NULL = 0x0001,
- VT_I2 = 0x0002,
- VT_I4 = 0x0003,
- VT_R4 = 0x0004,
- VT_R8 = 0x0005,
- VT_CY = 0x0006,
- VT_DATE = 0x0007,
- VT_BSTR = 0x0008,
- VT_DISPATCH = 0x0009,
- VT_ERROR = 0x000A,
- VT_BOOL = 0x000B,
- VT_VARIANT = 0x000C,
- VT_UNKNOWN = 0x000D,
- VT_DECIMAL = 0x000E,
- VT_I1 = 0x0010,
- VT_UI1 = 0x0011,
- VT_UI2 = 0x0012,
- VT_UI4 = 0x0013,
- VT_I8 = 0x0014,
- VT_UI8 = 0x0015,
- VT_INT = 0x0016,
- VT_UINT = 0x0017,
- VT_VOID = 0x0018,
- VT_HRESULT = 0x0019,
- VT_PTR = 0x001A,
- VT_SAFEARRAY = 0x001B,
- VT_CARRAY = 0x001C,
- VT_USERDEFINED = 0x001D,
- VT_LPSTR = 0x001E,
- VT_LPWSTR = 0x001F,
- VT_RECORD = 0x0024,
- VT_INT_PTR = 0x0025,
- VT_UINT_PTR = 0x0026,
- VT_ARRAY = 0x2000,
- VT_BYREF = 0x4000
- } VARENUM;
复制代码
https://docs.microsoft.com/en-us ... d/vartype-constants
- Constant Value Description
- vbEmpty 0 Uninitialized (default)
- vbNull 1 Contains no valid data
- vbInteger 2 Integer
- vbLong 3 Long integer
- vbSingle 4 Single-precision floating-point number
- vbDouble 5 Double-precision floating-point number
- vbCurrency 6 Currency
- vbDate 7 Date
- vbString 8 String
- vbObject 9 Object
- vbError 10 Error
- vbBoolean 11 Boolean
- vbVariant 12 Variant (used only for arrays of variants)
- vbDataObject 13 Data access object
- vbDecimal 14 Decimal
- vbByte 17 Byte
- vbLongLong 20 LongLong integer (valid on 64-bit platforms only)
- vbUserDefinedType 36 Variants that contain user-defined types
- vbArray 8192 Array
复制代码 |
|