home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 25 / CDROM25.iso / Share / prog / VJ11 / VJTRIAL.EXE / Wtypes.idl < prev   
Encoding:
Text File  |  1996-03-13  |  34.2 KB  |  1,200 lines

  1. //+-------------------------------------------------------------------------
  2. //
  3. //  Microsoft Windows
  4. //  Copyright (C) Microsoft Corporation, 1992 - 1996.
  5. //
  6. //  File: wtypes.idl
  7. //
  8. //  Contents: This interface definition contains typedefs for remotable
  9. //            data types.
  10. //
  11. //--------------------------------------------------------------------------
  12.  
  13. [ uuid(D3980A60-910C-1068-9341-00DD010F2F1C),
  14.   version(0.1), pointer_default(unique) ]
  15.  
  16. interface IWinTypes
  17. {
  18.  
  19. cpp_quote("//+-------------------------------------------------------------------------")
  20. cpp_quote("//")
  21. cpp_quote("//  Microsoft Windows")
  22. cpp_quote("//  Copyright (C) Microsoft Corporation, 1992 - 1996.")
  23. cpp_quote("//")
  24. cpp_quote("//--------------------------------------------------------------------------")
  25.  
  26. typedef struct tagRemHGLOBAL
  27. {
  28.         long fNullHGlobal;
  29.         unsigned long cbData;
  30.         [size_is(cbData)] byte data[];
  31. } RemHGLOBAL;
  32.  
  33. typedef struct tagRemHMETAFILEPICT
  34. {
  35.         long        mm;
  36.         long        xExt;
  37.         long        yExt;
  38.         unsigned long cbData;
  39.         [size_is(cbData)] byte data[];
  40. } RemHMETAFILEPICT;
  41.  
  42.  
  43. typedef struct tagRemHENHMETAFILE
  44. {
  45.         unsigned long cbData;
  46.         [size_is(cbData)] byte data[];
  47. } RemHENHMETAFILE;
  48.  
  49. typedef struct tagRemHBITMAP
  50. {
  51.         unsigned long cbData;
  52.         [size_is(cbData)] byte data[];
  53. } RemHBITMAP;
  54.  
  55. typedef struct tagRemHPALETTE
  56. {
  57.         unsigned long cbData;
  58.         [size_is(cbData)] byte data[];
  59. } RemHPALETTE;
  60.  
  61. typedef struct tagRemBRUSH
  62. {
  63.         unsigned long cbData;
  64.         [size_is(cbData)] byte data[];
  65. } RemHBRUSH;
  66.  
  67.  
  68. cpp_quote("#if !defined(_WIN32) && !defined(_MPPC_)" )
  69. cpp_quote("// The following code is for Win16 only")
  70.  
  71. cpp_quote("#ifndef WINAPI          // If not included with 3.1 headers... ")
  72.  
  73. cpp_quote("#define FAR             _far")
  74. cpp_quote("#define PASCAL          _pascal")
  75. cpp_quote("#define CDECL           _cdecl")
  76.  
  77. cpp_quote("#define VOID            void")
  78. cpp_quote("#define WINAPI      FAR PASCAL")
  79. cpp_quote("#define CALLBACK    FAR PASCAL")
  80.  
  81.  
  82.  
  83. cpp_quote("#ifndef FALSE")
  84. cpp_quote("#define FALSE 0")
  85. cpp_quote("#define TRUE 1")
  86. cpp_quote("#endif // !FALSE")
  87.  
  88. cpp_quote("#ifndef _BYTE_DEFINED")
  89. cpp_quote("#define _BYTE_DEFINED")
  90. typedef unsigned char BYTE;
  91. cpp_quote("#endif // !_BYTE_DEFINED")
  92.  
  93. cpp_quote("#ifndef _WORD_DEFINED")
  94. cpp_quote("#define _WORD_DEFINED")
  95. typedef unsigned short WORD;
  96. cpp_quote("#endif // !_WORD_DEFINED")
  97.  
  98. typedef unsigned int UINT;
  99. typedef int  INT;
  100. typedef long BOOL;
  101.  
  102. cpp_quote("#ifndef _LONG_DEFINED")
  103. cpp_quote("#define _LONG_DEFINED")
  104. typedef long LONG;
  105. cpp_quote("#endif // !_LONG_DEFINED")
  106.  
  107. cpp_quote("#ifndef _WPARAM_DEFINED")
  108. cpp_quote("#define _WPARAM_DEFINED")
  109. typedef UINT WPARAM;
  110. cpp_quote("#endif // _WPARAM_DEFINED")
  111.  
  112. cpp_quote("#ifndef _DWORD_DEFINED")
  113. cpp_quote("#define _DWORD_DEFINED")
  114. typedef unsigned long DWORD;
  115. cpp_quote("#endif // !_DWORD_DEFINED")
  116.  
  117. cpp_quote("#ifndef _LPARAM_DEFINED")
  118. cpp_quote("#define _LPARAM_DEFINED")
  119. typedef LONG LPARAM;//BUGBUG: this should be a discriminated union.
  120. cpp_quote("#endif // !_LPARAM_DEFINED")
  121.  
  122. cpp_quote("#ifndef _LRESULT_DEFINED")
  123. cpp_quote("#define _LRESULT_DEFINED")
  124. typedef LONG LRESULT;
  125. cpp_quote("#endif // !_LRESULT_DEFINED")
  126.  
  127. typedef void * HANDLE;
  128. #define DECLARE_WIREM_HANDLE(name)  \
  129.                              typedef [wire_marshal(wire ## name)] void * name
  130. #define DECLARE_HANDLE(name) typedef void * name
  131.  
  132. DECLARE_HANDLE(HMODULE);
  133. DECLARE_HANDLE(HINSTANCE);
  134. DECLARE_HANDLE(HICON);
  135. DECLARE_HANDLE(HFONT);
  136.  
  137. DECLARE_HANDLE(HDC);
  138. DECLARE_HANDLE(HRGN);
  139. DECLARE_HANDLE(HTASK);
  140. DECLARE_HANDLE(HKEY);
  141.  
  142. DECLARE_HANDLE(HDESK);
  143.  
  144. DECLARE_HANDLE(HMF);
  145. DECLARE_HANDLE(HEMF);
  146.  
  147. DECLARE_HANDLE(HPEN);
  148. DECLARE_HANDLE(HRSRC);
  149. DECLARE_HANDLE(HSTR);
  150. DECLARE_HANDLE(HWINSTA);
  151. DECLARE_HANDLE(HKL);
  152. DECLARE_HANDLE(HGDIOBJ);
  153.  
  154. typedef HANDLE HDWP;
  155.  
  156. cpp_quote("#ifndef _HFILE_DEFINED")
  157. cpp_quote("#define _HFILE_DEFINED")
  158. typedef INT HFILE;      /* Polymorphic with C runtime file handle type */
  159. cpp_quote("#endif // !_HFILE_DEFINED")
  160.  
  161.  
  162. cpp_quote("#ifndef _HCURSOR_DEFINED")
  163. cpp_quote("#define _HCURSOR_DEFINED")
  164. typedef HICON HCURSOR;      /* HICONs & HCURSORs are polymorphic */
  165. cpp_quote("#endif // !_HCURSOR_DEFINED")
  166.  
  167.  
  168.  
  169. cpp_quote("#ifndef _LPWORD_DEFINED")
  170. cpp_quote("#define _LPWORD_DEFINED")
  171. typedef WORD *LPWORD;
  172. cpp_quote("#endif // !_LPWORD_DEFINED")
  173.  
  174.  
  175. cpp_quote("#ifndef _LPDWORD_DEFINED")
  176. cpp_quote("#define _LPDWORD_DEFINED")
  177. typedef DWORD *LPDWORD;
  178. cpp_quote("#endif // !_LPDWORD_DEFINED")
  179.  
  180.  
  181. typedef [string] char *LPSTR;
  182.  
  183. typedef [string] const char *LPCSTR;
  184.  
  185.  
  186. cpp_quote("#ifndef _WCHAR_DEFINED")
  187. cpp_quote("#define _WCHAR_DEFINED")
  188. typedef wchar_t WCHAR;
  189. typedef WCHAR   TCHAR;
  190. cpp_quote("#endif // !_WCHAR_DEFINED")
  191.  
  192. typedef [string] WCHAR *LPWSTR;
  193.  
  194. typedef [string] TCHAR *LPTSTR;
  195.  
  196. typedef [string] const WCHAR *LPCWSTR;
  197. typedef [string] const TCHAR *LPCTSTR;
  198.  
  199.  
  200. typedef struct tagPALETTEENTRY {
  201.     BYTE        peRed;
  202.     BYTE        peGreen;
  203.     BYTE        peBlue;
  204.     BYTE        peFlags;
  205. } PALETTEENTRY, *PPALETTEENTRY, *LPPALETTEENTRY;
  206.  
  207. // Logical Palette
  208. cpp_quote("#if 0")
  209.  
  210.     typedef struct tagLOGPALETTE {
  211.         WORD        palVersion;
  212.         WORD        palNumEntries;
  213.         [size_is(palNumEntries)] PALETTEENTRY        palPalEntry[];
  214.     } LOGPALETTE, *PLOGPALETTE, *LPLOGPALETTE;
  215.  
  216. cpp_quote("#else")
  217. cpp_quote("typedef struct tagLOGPALETTE {")
  218. cpp_quote("    WORD        palVersion;")
  219. cpp_quote("    WORD        palNumEntries;")
  220. cpp_quote("    PALETTEENTRY        palPalEntry[1];")
  221. cpp_quote("} LOGPALETTE, *PLOGPALETTE, *LPLOGPALETTE;")
  222. cpp_quote("#endif")
  223.  
  224. cpp_quote("#ifndef _COLORREF_DEFINED")
  225. cpp_quote("#define _COLORREF_DEFINED")
  226. typedef DWORD COLORREF;
  227. cpp_quote("#endif // !_COLORREF_DEFINED")
  228.  
  229. cpp_quote("#ifndef _LPCOLORREF_DEFINED")
  230. cpp_quote("#define _LPCOLORREF_DEFINED")
  231. typedef DWORD *LPCOLORREF;
  232. cpp_quote("#endif // !_LPCOLORREF_DEFINED")
  233.  
  234.  
  235. typedef HANDLE *LPHANDLE;
  236.  
  237. //typedefs for remotable types from wingdi.h
  238.  
  239. typedef struct _RECTL
  240. {
  241.     LONG    left;
  242.     LONG    top;
  243.     LONG    right;
  244.     LONG    bottom;
  245. } RECTL, *PRECTL, *LPRECTL;
  246.  
  247.  
  248. typedef struct tagPOINT
  249. {
  250.     LONG  x;
  251.     LONG  y;
  252. } POINT, *PPOINT, *LPPOINT;
  253.  
  254. typedef struct _POINTL
  255. {
  256.     LONG  x;
  257.     LONG  y;
  258. } POINTL, *PPOINTL;
  259.  
  260.  
  261.  
  262. cpp_quote("#ifndef WIN16")
  263. typedef struct tagSIZE
  264. {
  265.     LONG        cx;
  266.     LONG        cy;
  267. } SIZE, *PSIZE, *LPSIZE;
  268. cpp_quote("#else // WIN16")
  269. cpp_quote("typedef struct tagSIZE")
  270. cpp_quote("{")
  271. cpp_quote("    INT cx;")
  272. cpp_quote("    INT cy;")
  273. cpp_quote("} SIZE, *PSIZE, *LPSIZE;")
  274. cpp_quote("#endif // WIN16")
  275.  
  276.  
  277. typedef struct tagSIZEL
  278. {
  279.     LONG cx;
  280.     LONG cy;
  281. } SIZEL, *PSIZEL, *LPSIZEL;
  282.  
  283.  
  284. cpp_quote("#endif  //WINAPI")
  285. cpp_quote("#endif  //!WIN32 && !MPPC")
  286.  
  287. cpp_quote("#if defined(_WIN32) && !defined(OLE2ANSI)")
  288.  
  289. typedef WCHAR                   OLECHAR;
  290. typedef [string] OLECHAR       *LPOLESTR;
  291. typedef [string] const OLECHAR *LPCOLESTR;
  292. cpp_quote("#define OLESTR(str) L##str")
  293.  
  294. cpp_quote("")
  295. cpp_quote("#else")
  296. cpp_quote("")
  297.  
  298. cpp_quote("typedef char      OLECHAR;")
  299. cpp_quote("typedef LPSTR     LPOLESTR;")
  300. cpp_quote("typedef LPCSTR    LPCOLESTR;")
  301. cpp_quote("#define OLESTR(str) str")
  302.  
  303. cpp_quote("#endif")
  304.  
  305.  
  306.  
  307.  
  308.  
  309. // This block contains types that are normally defined by the nt sdk in WINDEF.H
  310. // but we need them here for definitions that follow in this file.  If WINDEF.H
  311. // hasn't been included then we need to define them now so that WTYPES.H
  312. // will compile.
  313. cpp_quote("#ifndef _WINDEF_")
  314. typedef const RECTL *LPCRECTL;
  315.  
  316. typedef void * PVOID, *LPVOID;
  317. typedef struct tagRECT
  318. {
  319.     LONG    left;
  320.     LONG    top;
  321.     LONG    right;
  322.     LONG    bottom;
  323. } RECT, *PRECT, *LPRECT;
  324. typedef const RECT *LPCRECT;
  325.  
  326. cpp_quote("#endif  //_WINDEF_")
  327.  
  328.  
  329.  
  330.  
  331. typedef unsigned char  UCHAR;
  332. typedef short SHORT;
  333. typedef unsigned short USHORT;
  334. typedef DWORD ULONG;
  335.  
  336. // just for local wtypes
  337. cpp_quote("#if 0")
  338. //
  339. // __int64 is only supported by 2.0 and later midl.
  340. // __midl is set by the 2.0 midl and not by 1.0 midl.
  341. //
  342.  
  343. #if (defined(__midl))
  344. typedef __int64 LONGLONG;
  345. typedef unsigned __int64 ULONGLONG;
  346. #else
  347. typedef double LONGLONG;
  348. typedef double ULONGLONG;
  349. #endif
  350.  
  351. typedef LONGLONG *PLONGLONG;
  352. typedef ULONGLONG *PULONGLONG;
  353.  
  354. typedef struct _LARGE_INTEGER {
  355.     LONGLONG QuadPart;
  356. } LARGE_INTEGER;
  357.  
  358. typedef LARGE_INTEGER *PLARGE_INTEGER;
  359.  
  360. typedef struct _ULARGE_INTEGER {
  361.     ULONGLONG QuadPart;
  362. } ULARGE_INTEGER;
  363.  
  364. // just for local wtypes
  365. cpp_quote("#endif // 0")
  366.  
  367.  
  368. cpp_quote("#ifndef _WINBASE_")
  369.  
  370. cpp_quote("#ifndef _FILETIME_")
  371. cpp_quote("#define _FILETIME_")
  372. typedef struct _FILETIME
  373. {
  374.     DWORD dwLowDateTime;
  375.     DWORD dwHighDateTime;
  376. } FILETIME, *PFILETIME, *LPFILETIME;
  377. cpp_quote("#endif // !_FILETIME")
  378.  
  379. cpp_quote("#ifndef _SYSTEMTIME_")
  380. cpp_quote("#define _SYSTEMTIME_")
  381. typedef struct _SYSTEMTIME {
  382.     WORD wYear;
  383.     WORD wMonth;
  384.     WORD wDayOfWeek;
  385.     WORD wDay;
  386.     WORD wHour;
  387.     WORD wMinute;
  388.     WORD wSecond;
  389.     WORD wMilliseconds;
  390. } SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
  391.  
  392. cpp_quote("#endif // !_SYSTEMTIME")
  393.  
  394. cpp_quote("#ifndef _SECURITY_ATTRIBUTES_")
  395. cpp_quote("#define _SECURITY_ATTRIBUTES_")
  396. typedef struct _SECURITY_ATTRIBUTES {
  397.     DWORD nLength;
  398.     [size_is(nLength)] LPVOID lpSecurityDescriptor;
  399.     BOOL bInheritHandle;
  400. } SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
  401. cpp_quote("#endif // !_SECURITY_ATTRIBUTES_")
  402.  
  403. cpp_quote("#ifndef SECURITY_DESCRIPTOR_REVISION")
  404.  
  405. typedef USHORT SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
  406.  
  407. typedef PVOID PSID;     // winnt
  408.  
  409. typedef struct _ACL {
  410.     UCHAR AclRevision;
  411.     UCHAR Sbz1;
  412.     USHORT AclSize;
  413.     USHORT AceCount;
  414.     USHORT Sbz2;
  415. } ACL;
  416. typedef ACL *PACL;
  417.  
  418. typedef struct _SECURITY_DESCRIPTOR {
  419.     UCHAR Revision;
  420.     UCHAR Sbz1;
  421.     SECURITY_DESCRIPTOR_CONTROL Control;
  422.     PSID Owner;
  423.     PSID Group;
  424.     PACL Sacl;
  425.     PACL Dacl;
  426. } SECURITY_DESCRIPTOR, *PISECURITY_DESCRIPTOR;
  427.  
  428. cpp_quote("#endif // !SECURITY_DESCRIPTOR_REVISION")
  429.  
  430. cpp_quote("#endif //_WINBASE_")
  431.  
  432.  
  433. //
  434. // SCODE, HRESULT
  435. //
  436. //
  437. //  Status values are 32 bit values layed out as follows:
  438. //
  439. //   3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
  440. //   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
  441. //  +-+-----------------------------+-------------------------------+
  442. //  |S|       Facility              |               Code            |
  443. //  +-+-----------------------------+-------------------------------+
  444. //
  445. //  where
  446. //
  447. //      S - is the severity code
  448. //
  449. //          0 - Success
  450. //          1 - Error
  451. //
  452. //
  453. //      Facility - is the facility code
  454. //
  455. //      Code - is the facility's status code
  456. //
  457. // SCODE and HRESULT are mktyplib base types.
  458. //
  459. typedef LONG SCODE;
  460. cpp_quote("#ifndef _HRESULT_DEFINED")
  461. cpp_quote("#define _HRESULT_DEFINED")
  462. #if defined(_STRICT_HRESULT)
  463. typedef struct _HRESULT_STRUCT {
  464.         DWORD Data1;
  465. } HRESULT_STRUCT, *PHRESULT_STRUCT;
  466. typedef PHRESULT_STRUCT HRESULT;
  467. #else // defined(_STRICT_HRESULT)
  468. typedef LONG HRESULT;
  469. #endif // defined(_STRICT_HRESULT)
  470. cpp_quote("#endif // !_HRESULT_DEFINED")
  471.  
  472. typedef SCODE *PSCODE;
  473.  
  474.  
  475. cpp_quote("#ifndef GUID_DEFINED")
  476. cpp_quote("#define GUID_DEFINED")
  477. typedef struct _GUID
  478. {
  479.     DWORD Data1;
  480.     WORD  Data2;
  481.     WORD  Data3;
  482.     BYTE  Data4[8];
  483. } GUID;
  484. cpp_quote("#endif // !GUID_DEFINED")
  485.  
  486. cpp_quote("#if !defined( __LPGUID_DEFINED__ )")
  487. cpp_quote("#define __LPGUID_DEFINED__")
  488. typedef GUID *LPGUID;
  489. cpp_quote("#endif // !__LPGUID_DEFINED__")
  490.  
  491. cpp_quote("#ifndef __OBJECTID_DEFINED")
  492. cpp_quote("#define __OBJECTID_DEFINED")
  493. cpp_quote("#define _OBJECTID_DEFINED")
  494. typedef struct _OBJECTID     // NOTE!! Order of structure members is important for OFS
  495. {                            // enumeration.
  496.    GUID Lineage;             // Unique for objects copied from same original and copies of.
  497.    unsigned long Uniquifier; // Random, to provide uniqueness within small set with same
  498. } OBJECTID;                  // lineage id.
  499. cpp_quote("#endif // !_OBJECTID_DEFINED")
  500.  
  501.  
  502.  
  503.  
  504. cpp_quote("#if !defined( __IID_DEFINED__ )")
  505. cpp_quote("#define __IID_DEFINED__")
  506.  
  507. // Interface ID are just a kind of GUID
  508. typedef GUID IID;
  509. typedef IID *LPIID;
  510. cpp_quote("#define IID_NULL            GUID_NULL")
  511. cpp_quote("#define IsEqualIID(riid1, riid2) IsEqualGUID(riid1, riid2)")
  512.  
  513. // Class ID are just a kind of GUID
  514. typedef GUID CLSID;
  515. typedef              CLSID *LPCLSID;
  516. cpp_quote("#define CLSID_NULL          GUID_NULL")
  517. cpp_quote("#define IsEqualCLSID(rclsid1, rclsid2) IsEqualGUID(rclsid1, rclsid2)")
  518.  
  519. //The following typedefs are used internally by MIDL.
  520. cpp_quote("#if 0")
  521. #if defined(__midl)
  522.     /* MIDL 2.0 definitions */
  523.     typedef GUID *REFGUID;
  524.     typedef IID *REFIID;
  525.     typedef CLSID *REFCLSID;
  526. #else
  527.     /* MIDL 1.1 definitions */
  528.     typedef GUID REFGUID;
  529.     typedef IID REFIID;
  530.     typedef CLSID REFCLSID;
  531. #endif
  532. cpp_quote("#endif // 0")
  533.  
  534. cpp_quote("#if defined(__cplusplus)")
  535.  
  536. cpp_quote("#ifndef _REFGUID_DEFINED")
  537. cpp_quote("#define _REFGUID_DEFINED")
  538. cpp_quote("#define REFGUID             const GUID &")
  539. cpp_quote("#endif // !_REFGUID_DEFINED")
  540.  
  541. cpp_quote("#ifndef _REFIID_DEFINED")
  542. cpp_quote("#define _REFIID_DEFINED")
  543. cpp_quote("#define REFIID              const IID &")
  544. cpp_quote("#endif // !_REFIID_DEFINED")
  545.  
  546. cpp_quote("#ifndef _REFCLSID_DEFINED")
  547. cpp_quote("#define _REFCLSID_DEFINED")
  548. cpp_quote("#define REFCLSID            const CLSID &")
  549. cpp_quote("#endif // !_REFCLSID_DEFINED")
  550.  
  551.  
  552. cpp_quote("#else // !__cplusplus")
  553.  
  554. cpp_quote("#ifndef _REFGUID_DEFINED")
  555. cpp_quote("#define _REFGUID_DEFINED")
  556. cpp_quote("#define REFGUID             const GUID * const")
  557. cpp_quote("#endif // !_REFGUID_DEFINED")
  558.  
  559. cpp_quote("#ifndef _REFIID_DEFINED")
  560. cpp_quote("#define _REFIID_DEFINED")
  561. cpp_quote("#define REFIID              const IID * const")
  562. cpp_quote("#endif // !_REFIID_DEFINED")
  563.  
  564.  
  565. cpp_quote("#ifndef _REFCLSID_DEFINED")
  566. cpp_quote("#define _REFCLSID_DEFINED")
  567. cpp_quote("#define REFCLSID            const CLSID * const")
  568. cpp_quote("#endif // !_REFCLSID_DEFINED")
  569.  
  570. cpp_quote("#endif // !__cplusplus")
  571.  
  572. cpp_quote("#endif // !__IID_DEFINED__")
  573.  
  574.     /************************* Misc types ***********************************/
  575.  
  576.     // Common typdefs used in API paramaters, gleamed from compobj.h
  577.  
  578.     // memory context values; passed to CoGetMalloc
  579.     typedef enum tagMEMCTX
  580.     {
  581.         MEMCTX_TASK = 1,            // task (private) memory
  582.         MEMCTX_SHARED = 2,          // shared memory (between processes)
  583.         MEMCTX_MACSYSTEM = 3,       // on the mac, the system heap
  584.         // these are mostly for internal use...
  585.         MEMCTX_UNKNOWN = -1,        // unknown context (when asked about it)
  586.         MEMCTX_SAME = -2,           // same context (as some other pointer)
  587.     } MEMCTX;
  588.  
  589.  
  590. // For IRunningObjectTable::Register
  591. cpp_quote("#ifndef _ROTFLAGS_DEFINED")
  592. cpp_quote("#define _ROTFLAGS_DEFINED")
  593. cpp_quote("#define ROTFLAGS_REGISTRATIONKEEPSALIVE 1")
  594. cpp_quote("#endif // !_ROTFLAGS_DEFINED")
  595.  
  596. // Maximum size of comparison buffer for IROTData::GetComparisonData
  597. cpp_quote("#ifndef _ROT_COMPARE_MAX_DEFINED")
  598. cpp_quote("#define _ROT_COMPARE_MAX_DEFINED")
  599. cpp_quote("#define ROT_COMPARE_MAX 2048")
  600. cpp_quote("#endif // !_ROT_COMPARE_MAX_DEFINED")
  601.  
  602.  
  603.     // class context: used to determine what scope and kind of class object to use
  604.     // NOTE: this is a bitwise enum
  605.     typedef enum tagCLSCTX
  606.     {
  607.         CLSCTX_INPROC_SERVER = 0x01,   // server dll (runs in same process as caller)
  608.         CLSCTX_INPROC_HANDLER = 0x02,  // handler dll (runs in same process as caller)
  609.         CLSCTX_LOCAL_SERVER = 0x04,    // server exe (runs on same machine; diff proc)
  610.         CLSCTX_INPROC_SERVER16 = 0x08, // 16-bit server dll (runs in same process as caller)
  611.         CLSCTX_REMOTE_SERVER = 0x10,    // remote server exe (runs on different machine)
  612.         CLSCTX_INPROC_HANDLER16 = 0x20, // 16-bit handler dll (runs in same process as caller)
  613.         CLSCTX_INPROC_SERVERX86 = 0x40, // Wx86 server dll (runs in same process as caller)
  614.         CLSCTX_INPROC_HANDLERX86 = 0x80, // Wx86 handler dll (runs in same process as caller)
  615.     } CLSCTX;
  616.  
  617.  
  618.     // marshaling flags; passed to CoMarshalInterface
  619.     typedef enum tagMSHLFLAGS
  620.     {
  621.         MSHLFLAGS_NORMAL = 0,       // normal marshaling via proxy/stub
  622.         MSHLFLAGS_TABLESTRONG = 1,  // keep object alive; must explicitly release
  623.     MSHLFLAGS_TABLEWEAK = 2,    // doesn't hold object alive; still must release
  624.     MSHLFLAGS_NOPING = 4        // remote clients dont 'ping' to keep objects alive
  625.     } MSHLFLAGS;
  626.  
  627.     // marshal context: determines the destination context of the marshal operation
  628.     typedef enum tagMSHCTX
  629.     {
  630.         MSHCTX_LOCAL = 0,           // unmarshal context is local (eg.shared memory)
  631.         MSHCTX_NOSHAREDMEM = 1,     // unmarshal context has no shared memory access
  632.         MSHCTX_DIFFERENTMACHINE = 2,// unmarshal context is on a different machine
  633.         MSHCTX_INPROC = 3,          // unmarshal context is on different thread
  634.     } MSHCTX;
  635.  
  636.  
  637.     //
  638.     // Common typedefs for paramaters used in data view API's, gleamed
  639.     // from dvobj.h
  640.     //
  641.  
  642.     // Data/View aspect; specifies the desired aspect of the object when
  643.     // drawing or getting data.
  644.     typedef enum tagDVASPECT
  645.     {
  646.         DVASPECT_CONTENT = 1,
  647.         DVASPECT_THUMBNAIL = 2,
  648.         DVASPECT_ICON = 4,
  649.         DVASPECT_DOCPRINT = 8
  650.     } DVASPECT;
  651.  
  652.     /****** Storage types *************************************************/
  653.  
  654.  
  655.     /* Storage commit types */
  656.     typedef enum tagSTGC
  657.     {
  658.         STGC_DEFAULT        = 0,
  659.         STGC_OVERWRITE      = 1,
  660.         STGC_ONLYIFCURRENT  = 2,
  661.         STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4
  662.     } STGC;
  663.  
  664.  
  665.     typedef enum tagSTGMOVE
  666.     {
  667.         STGMOVE_MOVE    = 0,
  668.         STGMOVE_COPY    = 1,
  669.         STGMOVE_SHALLOWCOPY = 2
  670.     } STGMOVE;
  671.  
  672.     typedef enum tagSTATFLAG
  673.     {
  674.         STATFLAG_DEFAULT = 0,
  675.         STATFLAG_NONAME = 1,
  676.         STATFLAG_NOOPEN = 2
  677.     } STATFLAG;
  678.  
  679.  
  680. typedef [context_handle] void *HCONTEXT;
  681.  
  682. /****** Critical Section Wrappers ***********************************/
  683.  
  684.  
  685. /* if not already picked up from olenls.h */
  686. cpp_quote("#ifndef _LCID_DEFINED")
  687. cpp_quote("#define _LCID_DEFINED")
  688. typedef DWORD LCID;
  689. cpp_quote("#endif // !_LCID_DEFINED")
  690.  
  691. // #######################################################################
  692. //
  693. //  User marshal support for Windows data types.
  694.  
  695. //
  696. //  Frequently used helpers: sized blobs
  697. //
  698. //      Never put [user_marshal] or [wire_marshal] on the helpers directly.
  699. //
  700.  
  701. // Simple blobs.
  702.  
  703. typedef struct _BYTE_BLOB {
  704.                         unsigned long   clSize;
  705.     [size_is(clSize)]   byte            abData[];
  706.     } BYTE_BLOB;
  707.  
  708. typedef [unique] BYTE_BLOB * UP_BYTE_BLOB;
  709.  
  710. typedef struct _WORD_BLOB {
  711.                         unsigned long   clSize;
  712.     [size_is(clSize)]   unsigned short  asData[];
  713.     } WORD_BLOB;
  714.  
  715. typedef [unique] WORD_BLOB * UP_WORD_BLOB;
  716.  
  717. typedef struct _DWORD_BLOB {
  718.                         unsigned long   clSize;
  719.     [size_is(clSize)]   unsigned long   alData[];
  720.     } DWORD_BLOB;
  721.  
  722. typedef [unique] DWORD_BLOB * UP_DWORD_BLOB;
  723.  
  724. // Flagged blobs.
  725.  
  726. typedef struct _FLAGGED_BYTE_BLOB {
  727.                         unsigned long   fFlags;
  728.                         unsigned long   clSize;
  729.     [size_is(clSize)]   byte            abData[];
  730.     } FLAGGED_BYTE_BLOB;
  731.  
  732. typedef [unique] FLAGGED_BYTE_BLOB * UP_FLAGGED_BYTE_BLOB;
  733.  
  734. typedef struct _FLAGGED_WORD_BLOB {
  735.                         unsigned long   fFlags;
  736.                         unsigned long   clSize;
  737.     [size_is(clSize)]   unsigned short  asData[];
  738.     } FLAGGED_WORD_BLOB;
  739.  
  740. typedef [unique] FLAGGED_WORD_BLOB * UP_FLAGGED_WORD_BLOB;
  741.  
  742. // Frequently used helpers with sized pointers.
  743.  
  744. typedef struct _BYTE_SIZEDARR {
  745.                         unsigned long   clSize;
  746.     [size_is(clSize)]   byte     *      pData ;
  747.     } BYTE_SIZEDARR;
  748.  
  749. typedef struct _SHORT_SIZEDARR {
  750.                         unsigned long   clSize;
  751.     [size_is(clSize)]   unsigned short* pData ;
  752.     } WORD_SIZEDARR;
  753.  
  754. typedef struct _LONG_SIZEDARR {
  755.                         unsigned long   clSize;
  756.     [size_is(clSize)]   unsigned long * pData ;
  757.     } DWORD_SIZEDARR;
  758.  
  759. typedef struct _HYPER_SIZEDARR {
  760.                         unsigned long   clSize;
  761.     [size_is(clSize)]   hyper         * pData ;
  762.     } HYPER_SIZEDARR;
  763.  
  764.  
  765. // #########################################################################
  766. //
  767. //   Constants for the call context
  768. //
  769.  
  770. const unsigned long WDT_INPROC_CALL = 0x48746457;
  771. const unsigned long WDT_REMOTE_CALL = 0x52746457;
  772.  
  773.  
  774. // #########################################################################
  775. //
  776. //  CLIPFORMAT
  777. //
  778.  
  779. typedef union _userCLIPFORMAT switch(long fContext) u
  780. {
  781.     case WDT_INPROC_CALL:         DWORD     dwValue;
  782.     case WDT_REMOTE_CALL:   [string] wchar_t * pwszName;
  783. } userCLIPFORMAT;
  784.  
  785. typedef [unique] userCLIPFORMAT *  wireCLIPFORMAT;
  786.  
  787. typedef [wire_marshal(wireCLIPFORMAT)] WORD  CLIPFORMAT;
  788.  
  789.  
  790. // #########################################################################
  791. //
  792. //  Good for most of the gdi handles.
  793.  
  794. typedef union _GDI_NONREMOTE switch( long fContext ) u
  795. {
  796.     case WDT_INPROC_CALL:   long        hInproc;
  797.     case WDT_REMOTE_CALL:   DWORD_BLOB *hRemote;
  798.     default:                long        hGlobal;
  799. } GDI_NONREMOTE;
  800.  
  801.  
  802. // #########################################################################
  803. //
  804. //  HGLOBAL
  805. //
  806. // A global may be Null or may be non-NULL with 0 length.
  807.  
  808. typedef union _userHGLOBAL switch( long fContext ) u
  809. {
  810.     case WDT_INPROC_CALL:   long            hInproc;
  811.     case WDT_REMOTE_CALL:   FLAGGED_BYTE_BLOB *     hRemote;
  812.     default:                long            hGlobal;
  813. } userHGLOBAL;
  814.  
  815. typedef [unique] userHGLOBAL       * wireHGLOBAL;
  816.  
  817.  
  818. // #########################################################################
  819. //
  820. //  HMETAFILE
  821. //
  822.  
  823. typedef union _userHMETAFILE switch( long fContext ) u
  824. {
  825.     case WDT_INPROC_CALL:   long            hInproc;
  826.     case WDT_REMOTE_CALL:   BYTE_BLOB *     hRemote;
  827.     default:                long            hGlobal;
  828. } userHMETAFILE;
  829.  
  830.  
  831. // #########################################################################
  832. //
  833. //  HMETAFILEPICT
  834. //
  835. typedef struct _remoteMETAFILEPICT
  836. {
  837.     long            mm;
  838.     long            xExt;
  839.     long            yExt;
  840.     userHMETAFILE * hMF;
  841. } remoteMETAFILEPICT;
  842.  
  843. typedef union _userHMETAFILEPICT switch( long fContext ) u
  844. {
  845.     case WDT_INPROC_CALL:   long                hInproc;
  846.     case WDT_REMOTE_CALL:   remoteMETAFILEPICT* hRemote;
  847.     default:                long                hGlobal;
  848. } userHMETAFILEPICT;
  849.  
  850.  
  851. // #########################################################################
  852. //
  853. //  HENHMETAFILE
  854. //
  855.  
  856. typedef union _userHENHMETAFILE switch( long fContext ) u
  857. {
  858.     case WDT_INPROC_CALL:   long            hInproc;
  859.     case WDT_REMOTE_CALL:   BYTE_BLOB *     hRemote;
  860.     default:                long            hGlobal;
  861. } userHENHMETAFILE;
  862.  
  863.  
  864. // #########################################################################
  865. //
  866. //  HBITMAP
  867. //
  868.  
  869. // RemHBITMAP was just a byte blob, but the whole bitmap structure was copied
  870. // at the beginning of the buffer.
  871.  
  872. // So, we take BITMAP fields from wingdi.x
  873.  
  874. typedef struct _userBITMAP
  875. {
  876.     LONG            bmType;
  877.     LONG            bmWidth;
  878.     LONG            bmHeight;
  879.     LONG            bmWidthBytes;
  880.     WORD            bmPlanes;
  881.     WORD            bmBitsPixel;
  882.     ULONG                       cbSize;
  883.     [size_is(cbSize)]   byte    pBuffer[];
  884. } userBITMAP;
  885.  
  886.  
  887. typedef union _userHBITMAP switch( long fContext ) u
  888. {
  889.     case WDT_INPROC_CALL:   long            hInproc;
  890.     case WDT_REMOTE_CALL:   userBITMAP *    hRemote;
  891.     default:                long            hGlobal;
  892. } userHBITMAP;
  893.  
  894.  
  895. // #########################################################################
  896. //
  897. //  HPALETTE
  898. //
  899.  
  900. // PALETTEENTRY is in wingdi.x, it is a struct with 4 bytes.
  901. // LOGPALETTE   is in wingdi.x, it is a conf struct with paletteentries and
  902. //                                    a version field
  903.  
  904. typedef struct tagrpcLOGPALETTE {
  905.     WORD                        palVersion;
  906.     WORD                        palNumEntries;
  907.     [size_is( palNumEntries )]  PALETTEENTRY        palPalEntry[];
  908. } rpcLOGPALETTE;
  909.  
  910. typedef union _userHPALETTE switch( long fContext ) u
  911. {
  912.     case WDT_INPROC_CALL:   long            hInproc;
  913.     case WDT_REMOTE_CALL:   rpcLOGPALETTE * hRemote;
  914.     default:                long            hGlobal;
  915. } userHPALETTE;
  916.  
  917.  
  918. // #########################################################################
  919. //
  920. //  Handles passed locally as longs.
  921. //
  922.  
  923. typedef union _RemotableHandle switch( long fContext ) u
  924. {
  925.     case WDT_INPROC_CALL:   long   hInproc;
  926.     case WDT_REMOTE_CALL:   long   hRemote;
  927.     default:                long   hGlobal;
  928. } RemotableHandle;
  929.  
  930. typedef [unique] RemotableHandle * wireHWND;
  931. typedef [unique] RemotableHandle * wireHMENU;
  932. typedef [unique] RemotableHandle * wireHACCEL;
  933. typedef [unique] RemotableHandle * wireHBRUSH;
  934.  
  935.  
  936. cpp_quote("#if 0")
  937. DECLARE_WIREM_HANDLE( HWND );
  938. DECLARE_WIREM_HANDLE( HMENU );
  939. DECLARE_WIREM_HANDLE( HACCEL );
  940. DECLARE_WIREM_HANDLE( HBRUSH );
  941. cpp_quote("#endif //0")
  942.  
  943. cpp_quote("#ifndef _WIN32           // The following code is for Win16 only")
  944. cpp_quote("#ifndef WINAPI          // If not included with 3.1 headers... ")
  945.  
  946. // Message structure
  947.  
  948. typedef struct tagMSG {
  949.     HWND        hwnd;
  950.     UINT        message;
  951.     WPARAM      wParam;
  952.     LPARAM      lParam;
  953.     DWORD       time;
  954.     POINT       pt;
  955. } MSG, *PMSG, *NPMSG, *LPMSG;
  956. cpp_quote("#endif // _WIN32")
  957. cpp_quote("#endif // WINAPI")
  958.  
  959.  
  960. typedef [unique] userHBITMAP      * wireHBITMAP;
  961. typedef [unique] userHPALETTE     * wireHPALETTE;
  962. typedef [unique] userHENHMETAFILE * wireHENHMETAFILE;
  963. typedef [unique] userHMETAFILE    * wireHMETAFILE;
  964. typedef [unique] userHMETAFILEPICT* wireHMETAFILEPICT;
  965.  
  966. cpp_quote("#if 0")
  967.  
  968. DECLARE_WIREM_HANDLE( HGLOBAL );
  969. typedef HGLOBAL HLOCAL;
  970.  
  971. DECLARE_WIREM_HANDLE( HBITMAP );
  972. DECLARE_WIREM_HANDLE( HPALETTE );
  973. DECLARE_WIREM_HANDLE( HENHMETAFILE );
  974. DECLARE_WIREM_HANDLE( HMETAFILE );
  975. cpp_quote("#endif //0")
  976.  
  977. DECLARE_WIREM_HANDLE( HMETAFILEPICT );
  978.  
  979. }
  980.  
  981. // #########################################################################
  982. //
  983.  
  984. typedef double DATE;
  985.  
  986. /* This is a helper struct for use in handling currency. */
  987. cpp_quote("#ifndef _tagCY_DEFINED")
  988. cpp_quote("#define _tagCY_DEFINED")
  989. cpp_quote("#define _CY_DEFINED")
  990.  
  991. cpp_quote("#if 0")
  992.  
  993. cpp_quote("/* the following isn't the real definition of CY, but it is */")
  994. cpp_quote("/* what RPC knows how to remote */")
  995. typedef struct tagCY {
  996.     LONGLONG    int64;
  997. } CY;
  998.  
  999. cpp_quote("#else /* 0 */")
  1000.  
  1001. cpp_quote("/* real definition that makes the C++ compiler happy */")
  1002. cpp_quote("typedef union tagCY {")
  1003. cpp_quote("    struct {         ")
  1004. cpp_quote("#ifdef _MAC          ")
  1005. cpp_quote("        long      Hi;")
  1006. cpp_quote("        long Lo;     ")
  1007. cpp_quote("#else                ")
  1008. cpp_quote("        unsigned long Lo;")
  1009. cpp_quote("        long      Hi;")
  1010. cpp_quote("#endif               ")
  1011. cpp_quote("    };               ")
  1012. cpp_quote("    LONGLONG int64;  ")
  1013. cpp_quote("} CY;                ")
  1014. cpp_quote("#endif /* 0 */")
  1015.  
  1016. cpp_quote("#endif /* _tagCY_DEFINED */")
  1017.  
  1018.  
  1019. /* IDL declarations for BSTR how to transmit them */
  1020. //
  1021. typedef FLAGGED_WORD_BLOB   userBSTR;
  1022. typedef [unique] userBSTR * wireBSTR;
  1023.  
  1024. typedef [wire_marshal( wireBSTR )] OLECHAR *  BSTR;
  1025. typedef BSTR * LPBSTR;
  1026.  
  1027. cpp_quote("/* Don't use XBSTR any more, just use BSTR instead */")
  1028. cpp_quote("/* XBSTR is for internal use only, it is subject to change */")
  1029. typedef struct tagXBSTR {
  1030.     ULONG cbSize;
  1031.     [size_is(cbSize)]
  1032.     OLECHAR  rgBstrData[];
  1033.     } XBSTR;
  1034.  
  1035. cpp_quote("/* 0 == FALSE, -1 == TRUE */")
  1036. typedef short VARIANT_BOOL;
  1037.  
  1038. cpp_quote("#define VARIANT_TRUE ((VARIANT_BOOL)0xffff)")
  1039. cpp_quote("#define VARIANT_FALSE ((VARIANT_BOOL)0)")
  1040.  
  1041. cpp_quote("#ifndef _tagBLOB_DEFINED")
  1042. cpp_quote("#define _tagBLOB_DEFINED")
  1043. cpp_quote("#define _BLOB_DEFINED")
  1044. cpp_quote("#define _LPBLOB_DEFINED")
  1045. typedef struct tagBLOB {
  1046.     ULONG cbSize;
  1047.     [size_is(cbSize)]
  1048.     BYTE  *pBlobData;
  1049.     } BLOB, * LPBLOB;
  1050. cpp_quote("#endif")
  1051.  
  1052. typedef struct tagCLIPDATA {
  1053.     ULONG cbSize;       // count that includes sizeof(ulClipFmt)
  1054.     long ulClipFmt;     // long to keep alignment
  1055.     [size_is(cbSize-4)]
  1056.     BYTE * pClipData;   // cbSize-sizeof(ULONG) bytes of data in clipboard format
  1057.     } CLIPDATA;
  1058.  
  1059. typedef unsigned short VARTYPE;
  1060.  
  1061. // #########################################################################
  1062. //
  1063. //  VARTYPE
  1064. //
  1065. // #########################################################################
  1066.  
  1067. /*
  1068.  * VARENUM usage key,
  1069.  *
  1070.  *   [V] - may appear in a VARIANT
  1071.  *   [T] - may appear in a TYPEDESC
  1072.  *   [P] - may appear in an OLE property set
  1073.  *
  1074.  */
  1075.  
  1076. /*
  1077.  * VARENUM usage key,
  1078.  *
  1079.  *   [V] - may appear in a VARIANT
  1080.  *   [T] - may appear in a TYPEDESC
  1081.  *   [P] - may appear in an OLE property set
  1082.  *   [S] - may appear in a Safe Array
  1083.  *
  1084.  */
  1085.  
  1086. cpp_quote("/*")
  1087. cpp_quote(" * VARENUM usage key,")
  1088. cpp_quote(" *")
  1089. cpp_quote(" * * [V] - may appear in a VARIANT")
  1090. cpp_quote(" * * [T] - may appear in a TYPEDESC")
  1091. cpp_quote(" * * [P] - may appear in an OLE property set")
  1092. cpp_quote(" * * [S] - may appear in a Safe Array")
  1093. cpp_quote(" *")
  1094. cpp_quote(" *")
  1095. cpp_quote(" *  VT_EMPTY            [V]   [P]     nothing                     ")
  1096. cpp_quote(" *  VT_NULL             [V]           SQL style Null              ")
  1097. cpp_quote(" *  VT_I2               [V][T][P][S]  2 byte signed int           ")
  1098. cpp_quote(" *  VT_I4               [V][T][P][S]  4 byte signed int           ")
  1099. cpp_quote(" *  VT_R4               [V][T][P][S]  4 byte real                 ")
  1100. cpp_quote(" *  VT_R8               [V][T][P][S]  8 byte real                 ")
  1101. cpp_quote(" *  VT_CY               [V][T][P][S]  currency                    ")
  1102. cpp_quote(" *  VT_DATE             [V][T][P][S]  date                        ")
  1103. cpp_quote(" *  VT_BSTR             [V][T][P][S]  OLE Automation string       ")
  1104. cpp_quote(" *  VT_DISPATCH         [V][T]   [S]  IDispatch FAR*              ")
  1105. cpp_quote(" *  VT_ERROR            [V][T]   [S]  SCODE                       ")
  1106. cpp_quote(" *  VT_BOOL             [V][T][P][S]  True=-1, False=0            ")
  1107. cpp_quote(" *  VT_VARIANT          [V][T][P][S]  VARIANT FAR*                ")
  1108. cpp_quote(" *  VT_UNKNOWN          [V][T]   [S]  IUnknown FAR*               ")
  1109.  
  1110. cpp_quote(" *  VT_I1                  [T]        signed char                 ")
  1111. cpp_quote(" *  VT_UI1              [V][T]   [S]  unsigned char               ")
  1112. cpp_quote(" *  VT_UI2                 [T]        unsigned short              ")
  1113. cpp_quote(" *  VT_UI4                 [T]        unsigned short              ")
  1114. cpp_quote(" *  VT_I8                  [T][P]     signed 64-bit int           ")
  1115. cpp_quote(" *  VT_UI8                 [T]        unsigned 64-bit int         ")
  1116. cpp_quote(" *  VT_INT                 [T]        signed machine int          ")
  1117. cpp_quote(" *  VT_UINT                [T]        unsigned machine int        ")
  1118. cpp_quote(" *  VT_VOID                [T]        C style void                ")
  1119. cpp_quote(" *  VT_HRESULT             [T]                                    ")
  1120. cpp_quote(" *  VT_PTR                 [T]        pointer type                ")
  1121. cpp_quote(" *  VT_SAFEARRAY           [T]        (use VT_ARRAY in VARIANT)   ")
  1122. cpp_quote(" *  VT_CARRAY              [T]        C style array               ")
  1123. cpp_quote(" *  VT_USERDEFINED         [T]        user defined type           ")
  1124. cpp_quote(" *  VT_LPSTR               [T][P]     null terminated string      ")
  1125. cpp_quote(" *  VT_LPWSTR              [T][P]     wide null terminated string ")
  1126.  
  1127. cpp_quote(" *  VT_FILETIME               [P]     FILETIME                    ")
  1128. cpp_quote(" *  VT_BLOB                   [P]     Length prefixed bytes       ")
  1129. cpp_quote(" *  VT_STREAM                 [P]     Name of the stream follows  ")
  1130. cpp_quote(" *  VT_STORAGE                [P]     Name of the storage follows ")
  1131. cpp_quote(" *  VT_STREAMED_OBJECT        [P]     Stream contains an object   ")
  1132. cpp_quote(" *  VT_STORED_OBJECT          [P]     Storage contains an object  ")
  1133. cpp_quote(" *  VT_BLOB_OBJECT            [P]     Blob contains an object     ")
  1134. cpp_quote(" *  VT_CF                     [P]     Clipboard format            ")
  1135. cpp_quote(" *  VT_CLSID                  [P]     A Class ID                  ")
  1136.  
  1137. cpp_quote(" *  VT_VECTOR                 [P]     simple counted array        ")
  1138. cpp_quote(" *  VT_ARRAY            [V]           SAFEARRAY*                  ")
  1139. cpp_quote(" *  VT_BYREF            [V]                                       ")
  1140. cpp_quote(" */")
  1141.  
  1142. enum VARENUM
  1143. {
  1144.     VT_EMPTY           = 0,
  1145.     VT_NULL            = 1,
  1146.     VT_I2              = 2,
  1147.     VT_I4              = 3,
  1148.     VT_R4              = 4,
  1149.     VT_R8              = 5,
  1150.     VT_CY              = 6,
  1151.     VT_DATE            = 7,
  1152.     VT_BSTR            = 8,
  1153.     VT_DISPATCH        = 9,
  1154.     VT_ERROR           = 10,
  1155.     VT_BOOL            = 11,
  1156.     VT_VARIANT         = 12,
  1157.     VT_UNKNOWN         = 13,
  1158.  
  1159.     VT_I1              = 16,
  1160.     VT_UI1             = 17,
  1161.     VT_UI2             = 18,
  1162.     VT_UI4             = 19,
  1163.     VT_I8              = 20,
  1164.     VT_UI8             = 21,
  1165.     VT_INT             = 22,
  1166.     VT_UINT            = 23,
  1167.     VT_VOID            = 24,
  1168.     VT_HRESULT         = 25,
  1169.     VT_PTR             = 26,
  1170.     VT_SAFEARRAY       = 27,
  1171.     VT_CARRAY          = 28,
  1172.     VT_USERDEFINED     = 29,
  1173.     VT_LPSTR           = 30,
  1174.     VT_LPWSTR          = 31,
  1175.  
  1176.     VT_FILETIME        = 64,
  1177.     VT_BLOB            = 65,
  1178.     VT_STREAM          = 66,
  1179.     VT_STORAGE         = 67,
  1180.     VT_STREAMED_OBJECT = 68,
  1181.     VT_STORED_OBJECT   = 69,
  1182.     VT_BLOB_OBJECT     = 70,
  1183.     VT_CF              = 71,
  1184.     VT_CLSID           = 72,
  1185.  
  1186.     VT_VECTOR          = 0x1000,
  1187.     VT_ARRAY           = 0x2000,
  1188.     VT_BYREF           = 0x4000,
  1189.     VT_RESERVED        = 0x8000,
  1190.     
  1191.     VT_ILLEGAL         = 0xffff,
  1192.     VT_ILLEGALMASKED   = 0x0fff,
  1193.     VT_TYPEMASK        = 0x0fff
  1194. };
  1195.  
  1196. // Property stuff
  1197. typedef ULONG PROPID;
  1198.  
  1199.  
  1200.