comAutomation.idl
上传用户:nvosite88
上传日期:2007-01-17
资源大小:4983k
文件大小:5k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* comAutomation.idl -- VxDCOM Automation definitions */
  2. /* Copyright (c) 1999-2001, Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01e,09aug01,nel  Add table of vaild types for use in a VARIANT.
  7. 01d,02aug01,nel  correct comment for VT_ARRAY.
  8. 01c,17jul01,dbs  fix widl_marshal attributes
  9. 01b,21jun01,dbs  comment out unnecessary redefinition of types
  10. 01a,20jun01,nel  created from comCoreTypes.idl
  11. */
  12. import "comCoreTypes.idl";
  13. cpp_quote("/*")
  14. cpp_quote(" * VARENUM usage key,")
  15. cpp_quote(" *")
  16. cpp_quote(" * * [V] - may appear in a VARIANT")
  17. cpp_quote(" * * [S] - may appear in a Safe Array")
  18. cpp_quote(" *")
  19. cpp_quote(" *  VT_EMPTY            [V]     nothing")
  20. cpp_quote(" *  VT_NULL             [V]     SQL style Null")
  21. cpp_quote(" *  VT_I2               [V][S]  2 byte signed int")
  22. cpp_quote(" *  VT_I4               [V][S]  4 byte signed int")
  23. cpp_quote(" *  VT_R4               [V][S]  4 byte real")
  24. cpp_quote(" *  VT_R8               [V][S]  8 byte real")
  25. cpp_quote(" *  VT_CY               [V][S]  currency")
  26. cpp_quote(" *  VT_DATE             [V][S]  date")
  27. cpp_quote(" *  VT_BSTR             [V][S]  OLE Automation string")
  28. cpp_quote(" *  VT_ERROR            [V][S]  SCODE")
  29. cpp_quote(" *  VT_BOOL             [V][S]  True=-1, False=0")
  30. cpp_quote(" *  VT_VARIANT             [S]  VARIANT *")
  31. cpp_quote(" *  VT_UNKNOWN          [V][S]  IUnknown *")
  32. cpp_quote(" *  VT_UI1              [V][S]  unsigned char")
  33. cpp_quote(" *  VT_ARRAY            [V][S]  SAFEARRAY*")
  34. cpp_quote(" */")
  35. typedef enum tagVARENUM
  36.     {
  37.     VT_EMPTY = 0, // nothing
  38.     VT_NULL = 1, // NULL value
  39.     VT_I2 = 2, // 2-byte signed int
  40.     VT_I4 = 3, // 4-byte signed int
  41.     VT_R4 = 4, // 4-byte real
  42.     VT_R8 = 5, // 8-byte real
  43.     VT_CY = 6, // currency
  44.     VT_DATE = 7, // date
  45.     VT_BSTR = 8, // BSTR counted-string
  46.     VT_DISPATCH = 9, // IDispatch* - not supported
  47.     VT_ERROR = 10, // SCODE value
  48.     VT_BOOL = 11, // true=-1, false=0
  49.     VT_VARIANT = 12, // VARIANT*
  50.     VT_UNKNOWN = 13, // IUnknown*
  51.     VT_DECIMAL = 14, // decimal - not supported
  52.     VT_I1 = 16, // signed char
  53.     VT_UI1 = 17, // unsigned char
  54.     VT_UI2 = 18, // unsigned short
  55.     VT_UI4 = 19, // unsigned long
  56.     VT_I8 = 20, // 64-bit signed int
  57.     VT_UI8 = 21, // 64-bit unsigned int
  58.     VT_INT = 22, // signed machine int
  59.     VT_UINT = 23, // unsigned machine int
  60.     VT_VOID = 24, // C-like void
  61.     VT_HRESULT = 25, // std COM return type
  62.     VT_PTR = 26, // pointer to some type
  63.     VT_SAFEARRAY= 27, // not supported
  64.     VT_CARRAY = 28, // not supported
  65.     VT_USERDEFINED= 29, // not supported
  66.     VT_LPSTR = 30, // not supported
  67.     VT_LPWSTR = 31, // not supported
  68.     VT_FILETIME = 64, // not supported
  69.     VT_BLOB = 65, // not supported
  70.     VT_STREAM = 66, // not supported
  71.     VT_STORAGE = 67, // not supported
  72.     VT_STREAMED_OBJECT = 68, // not supported
  73.     VT_STORED_OBJECT = 69, // not supported
  74.     VT_BLOB_OBJECT = 70, // not supported
  75.     VT_CF = 71, // not supported
  76.     VT_CLSID = 72, // not supported
  77.     VT_VECTOR = 0x1000, // not supported
  78.     VT_ARRAY = 0x2000, // SAFEARRAY*
  79.     VT_BYREF = 0x4000, // pointer
  80.     VT_RESERVED = 0x8000,
  81.     VT_ILLEGAL = 0xffff,
  82.     VT_ILLEGALMASKED = 0xfff,
  83.     VT_TYPEMASK = 0xfff
  84.     } VARENUM;
  85. typedef unsigned short VARTYPE;
  86. typedef [widl_marshal(variant)] struct tagVARIANT
  87.     {
  88.     VARTYPE vt;
  89.     WORD wReserved1;
  90.     WORD wReserved2;
  91.     WORD wReserved3;
  92.     union 
  93. {
  94. LONG lVal;
  95. BYTE bVal;
  96. SHORT iVal;
  97. FLOAT fltVal;
  98. DOUBLE dblVal;
  99. VARIANT_BOOL boolVal;
  100. SCODE scode;
  101. CY cyVal;
  102. DATE date;
  103. BSTR bstrVal;
  104. IUnknown* punkVal;
  105. //IDispatch* pdispVal;
  106. struct tagSAFEARRAY* parray;    // no need to fwd declare
  107. BYTE* pbVal;
  108. SHORT* piVal;
  109. LONG* plVal;
  110. FLOAT* pfltVal;
  111. DOUBLE* pdblVal;
  112. VARIANT_BOOL* pboolVal;
  113. SCODE* pscode;
  114. CY* pcyVal;
  115. DATE* pdate;
  116. BSTR* pbstrVal;
  117. IUnknown** ppunkVal;
  118. //IDispatch** ppdispVal;
  119. //SAFEARRAY** pparray;
  120. struct tagVARIANT* pvarVal;     // no need to fwd declare
  121. void* byref;
  122. char cVal;
  123. USHORT uiVal;
  124. ULONG ulVal;
  125. INT intVal;
  126. UINT uintVal;
  127. //DECIMAL* pdecVal;
  128. char* pcVal;
  129. USHORT* puiVal;
  130. ULONG* pulVal;
  131. INT* pintVal;
  132. UINT* puintVal;
  133. };
  134.     } VARIANT;
  135. typedef VARIANT* LPVARIANT;
  136. typedef VARIANT VARIANTARG;
  137. typedef VARIANT* LPVARIANTARG;
  138. /* SafeArray Support */
  139. cpp_quote("#define SF_ERROR VT_ERROR")
  140. cpp_quote("#define SF_I1 VT_I1")
  141. cpp_quote("#define SF_I2 VT_I2")
  142. cpp_quote("#define SF_I4 VT_I4")
  143. cpp_quote("#define SF_BSTR VT_BSTR")
  144. cpp_quote("#define SF_UNKNOWN VT_UNKNOWN")
  145. cpp_quote("#define SF_VARIANT VT_VARIANT")
  146. typedef enum tagFADF_TYPE
  147.     {
  148.     FADF_AUTO           = 0x0001,
  149.     FADF_STATIC         = 0x0002,
  150.     FADF_EMBEDDED       = 0x0004,
  151.     FADF_FIXEDSIZE      = 0x0010,
  152.     FADF_RECORD         = 0x0020,
  153.     FADF_HAVEIID        = 0x0040,
  154.     FADF_HAVEVARTYPE    = 0x0080,
  155.     FADF_BSTR           = 0x0100,
  156.     FADF_UNKNOWN        = 0x0200,
  157.     FADF_DISPATCH       = 0x0400,
  158.     FADF_VARIANT        = 0x0800,
  159.     FADF_RESERVED       = 0xF008
  160.     } FADF_TYPE;
  161. typedef struct tagSAFEARRAYBOUND 
  162.     {
  163.     ULONG cElements;
  164.     LONG  lLbound;
  165.     } SAFEARRAYBOUND;
  166. typedef SAFEARRAYBOUND * LPSAFEARRAYBOUND;
  167. typedef struct tagSAFEARRAY 
  168.     {
  169.     USHORT          cDims;
  170.     USHORT          fFeatures;
  171.     ULONG           cbElements;
  172.     ULONG           cLocks;
  173.     PVOID           pvData;
  174.     [size_is(cDims)]SAFEARRAYBOUND  rgsabound[];
  175.     } SAFEARRAY;