zoukankan      html  css  js  c++  java
  • 常用的tagVARIANT结构【整理】

       VARIANT数据结构包含两个域(如果不考虑保留的域)。vt域描述了第二个域的数据类型。为了使多种类型能够在第二个域中出现,我们定义了一个联合结构。所以,第二个域的名称随着vt域中输入值的不同而改变。用于指定vt域值情况的常量在联合的定义中以每一行的注释形式给出。

     C++ Code 
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
     
    typedef struct tagVARIANT VARIANT;
    typedef struct tagVARIANT VARIANTARG;
    struct tagVARIANT {  
        
    union {  
            
    struct __tagVARIANT {  
                VARTYPE vt;  
                WORD    wReserved1;  
                WORD    wReserved2;  
                WORD    wReserved3;  
                
    union {  
                    ULONGLONG     ullVal;       
    /* VT_UI8               */  
                    LONGLONG      llVal;        
    /* VT_I8                */  
                    LONG          lVal;         
    /* VT_I4                */  
                    BYTE          bVal;         
    /* VT_UI1               */  
                    SHORT         iVal;         
    /* VT_I2                */  
                    FLOAT         fltVal;       
    /* VT_R4                */  
                    DOUBLE        dblVal;       
    /* VT_R8                */  
                    VARIANT_BOOL  boolVal;      
    /* VT_BOOL              */  
                    _VARIANT_BOOL 
    bool;         /* (obsolete)           */  
                    SCODE         scode;        
    /* VT_ERROR             */  
                    CY            cyVal;        
    /* VT_CY                */  
                    DATE          date;         
    /* VT_DATE              */  
                    BSTR          bstrVal;      
    /* VT_BSTR              */  
                    IUnknown *    punkVal;      
    /* VT_UNKNOWN           */  
                    IDispatch *   pdispVal;     
    /* VT_DISPATCH          */  
                    SAFEARRAY *   parray;       
    /* VT_ARRAY             */  
                    BYTE *        pbVal;        
    /* VT_BYREF|VT_UI1      */  
                    SHORT *       piVal;        
    /* VT_BYREF|VT_I2       */  
                    LONG *        plVal;        
    /* VT_BYREF|VT_I4       */  
                    LONGLONG *    pllVal;       
    /* VT_BYREF|VT_I8       */  
                    FLOAT *       pfltVal;      
    /* VT_BYREF|VT_R4       */  
                    DOUBLE *      pdblVal;      
    /* VT_BYREF|VT_R8       */  
                    VARIANT_BOOL *pboolVal;     
    /* VT_BYREF|VT_BOOL     */  
                    _VARIANT_BOOL *pbool;       
    /* (obsolete)           */  
                    SCODE *       pscode;       
    /* VT_BYREF|VT_ERROR    */  
                    CY *          pcyVal;       
    /* VT_BYREF|VT_CY       */  
                    DATE *        pdate;        
    /* VT_BYREF|VT_DATE     */  
                    BSTR *        pbstrVal;     
    /* VT_BYREF|VT_BSTR     */  
                    IUnknown **   ppunkVal;     
    /* VT_BYREF|VT_UNKNOWN  */  
                    IDispatch **  ppdispVal;    
    /* VT_BYREF|VT_DISPATCH */  
                    SAFEARRAY **  pparray;      
    /* VT_BYREF|VT_ARRAY    */  
                    VARIANT *     pvarVal;      
    /* VT_BYREF|VT_VARIANT  */  
                    PVOID         byref;        
    /* Generic ByRef        */  
                    CHAR          cVal;         
    /* VT_I1                */  
                    USHORT        uiVal;        
    /* VT_UI2               */  
                    ULONG         ulVal;        
    /* VT_UI4               */  
                    INT           intVal;       
    /* VT_INT               */  
                    UINT          uintVal;      
    /* VT_UINT              */  
                    DECIMAL *     pdecVal;      
    /* VT_BYREF|VT_DECIMAL  */  
                    CHAR *        pcVal;        
    /* VT_BYREF|VT_I1       */  
                    USHORT *      puiVal;       
    /* VT_BYREF|VT_UI2      */  
                    ULONG *       pulVal;       
    /* VT_BYREF|VT_UI4      */  
                    ULONGLONG *   pullVal;      
    /* VT_BYREF|VT_UI8      */  
                    INT *         pintVal;      
    /* VT_BYREF|VT_INT      */  
                    UINT *        puintVal;     
    /* VT_BYREF|VT_UINT     */  
                    
    struct __tagBRECORD {  
                        PVOID         pvRecord;  
                        IRecordInfo * pRecInfo;  
                    } __VARIANT_NAME_4;         
    /* VT_RECORD            */  
                } __VARIANT_NAME_3;  
            } __VARIANT_NAME_2;  
      
            DECIMAL decVal;  
        } __VARIANT_NAME_1;  
    };

  • 相关阅读:
    mysql
    selenium
    解决servlet响应乱码问题
    flask后端的跨域问题
    python中并发----线程的启动和停止
    react-native 自定义组件规范
    react-native 高阶组件笔记
    class-dump安装及使用
    jekyll的安装
    取巧的json转model声明代码的工具
  • 原文地址:https://www.cnblogs.com/MakeView660/p/7682973.html
Copyright © 2011-2022 走看看