home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 10 / ioProg_10.iso / soft / optima / hpp.z / WOLE.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-03-19  |  7.4 KB  |  287 lines

  1. /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2.    %     Copyright (C) 1994, by WATCOM International Inc.  All rights    %
  3.    %     reserved.  No part of this software may be reproduced or        %
  4.    %     used in any form or by any means - graphic, electronic or       %
  5.    %     mechanical, including photocopying, recording, taping or        %
  6.    %     information storage and retrieval systems - except with the     %
  7.    %     written permission of WATCOM International Inc.                 %
  8.    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  9. */
  10.  
  11. #ifndef _WOLE_HPP_INCLUDED
  12. #define _WOLE_HPP_INCLUDED
  13.  
  14. #ifndef _WNO_PRAGMA_PUSH
  15. #pragma pack(push,4);
  16. #pragma enum int;
  17. #endif
  18.  
  19. // **** ************************************************
  20. // **** The following are very temporary measures !!!!!
  21. // **** ************************************************
  22.  
  23. // *****************************************************
  24. // * Define Windows base types and macros
  25. // * If you wish to use windows.h you MUST include
  26. // * it before this file
  27. // *****************************************************
  28.  
  29. // from rpc.h
  30. #ifndef __RPC_H__
  31. #define __RPC_H__
  32.  
  33. #define __RPC_FAR
  34.  
  35. #endif // __RPC_H__
  36.  
  37. // from wtypes.h
  38. #ifndef __wtypes_h__
  39. #define __wtypes_h__
  40.  
  41. #ifndef _BYTE_DEFINED
  42. #define _BYTE_DEFINED
  43. typedef unsigned char BYTE;
  44. #endif // !_BYTE_DEFINED
  45.  
  46. #ifndef _WORD_DEFINED
  47. #define _WORD_DEFINED
  48. typedef unsigned short WORD;
  49. #endif // !_WORD_DEFINED
  50.  
  51. typedef /* [transmit] */ unsigned int UINT;
  52.  
  53. typedef /* [transmit] */ int INT;
  54.  
  55. #ifndef _LONG_DEFINED
  56. #define _LONG_DEFINED
  57. typedef long LONG;
  58. #endif // !_LONG_DEFINED
  59.  
  60. #ifndef _DWORD_DEFINED
  61. #define _DWORD_DEFINED
  62. typedef unsigned long DWORD;
  63. #endif // !_DWORD_DEFINED
  64.  
  65. typedef DWORD ULONG;
  66.  
  67. typedef LONG SCODE;
  68.  
  69. typedef LONG HRESULT;
  70.  
  71. #ifndef _WCHAR_T_DEFINED
  72. typedef unsigned short wchar_t;
  73. #define _WCHAR_T_DEFINED
  74. #endif
  75.  
  76. #ifndef _WCHAR_DEFINED
  77. #define _WCHAR_DEFINED
  78. typedef wchar_t WCHAR;
  79. typedef WCHAR TCHAR;
  80. #endif // !_WCHAR_DEFINED
  81.  
  82. typedef WCHAR OLECHAR;
  83. typedef /* [string] */ OLECHAR __RPC_FAR *LPOLESTR;
  84. typedef /* [string] */ const OLECHAR __RPC_FAR *LPCOLESTR;
  85. #define OLESTR(str) L##str
  86.  
  87. #ifndef GUID_DEFINED
  88. #define GUID_DEFINED
  89.                         /* size is 16 */
  90. typedef struct  _GUID
  91.     {
  92.     DWORD Data1;
  93.     WORD Data2;
  94.     WORD Data3;
  95.     BYTE Data4[ 8 ];
  96.     }   GUID;
  97.  
  98. #endif // !GUID_DEFINED
  99.  
  100. #if !defined( __IID_DEFINED__ )
  101. #define __IID_DEFINED__
  102.  
  103. typedef GUID IID;
  104. #define IID_NULL            GUID_NULL
  105. typedef GUID CLSID;
  106. #define CLSID_NULL          GUID_NULL
  107.  
  108. #ifndef _REFGUID_DEFINED
  109. #define _REFGUID_DEFINED
  110. #define REFGUID             const GUID &
  111. #endif // !_REFGUID_DEFINED
  112. #ifndef _REFIID_DEFINED
  113. #define _REFIID_DEFINED
  114. #define REFIID              const IID &
  115. #endif // !_REFIID_DEFINED
  116. #ifndef _REFCLSID_DEFINED
  117. #define _REFCLSID_DEFINED
  118. #define REFCLSID            const CLSID &
  119. #endif // !_REFCLSID_DEFINED
  120.  
  121. #endif // !__IID_DEFINED__
  122.  
  123. #ifndef _LCID_DEFINED
  124. #define _LCID_DEFINED
  125. typedef DWORD LCID;
  126. #endif // !_LCID_DEFINED
  127.  
  128. #endif
  129.  
  130. // *****************************************************
  131. // * Define OLE base types and macros
  132. // *****************************************************
  133.  
  134. // from basetyps.h
  135. #if !defined( _BASETYPS_H_ )
  136. #define _BASETYPS_H_
  137.  
  138. #define interface struct
  139.  
  140. #endif
  141.  
  142. // *****************************************************
  143. // * Define OLE specific types and macros
  144. // *****************************************************
  145.  
  146. // from objbase.h
  147. #if !defined( _OBJBASE_H_ )
  148. #define _OBJBASE_H_
  149.  
  150. #ifndef __IUnknown_FWD_DEFINED__
  151. #define __IUnknown_FWD_DEFINED__
  152. typedef interface IUnknown IUnknown;
  153. #endif  /* __IUnknown_FWD_DEFINED__ */
  154.  
  155. #ifndef __IUnknown_INTERFACE_DEFINED__
  156. #define __IUnknown_INTERFACE_DEFINED__
  157.  
  158. typedef /* [unique] */ IUnknown __RPC_FAR *LPUNKNOWN;
  159.  
  160.     interface IUnknown
  161.     {
  162.     public:
  163.         virtual HRESULT __stdcall QueryInterface( 
  164.             /* [in] */ REFIID riid,
  165.             /* [out] */ void __RPC_FAR *__RPC_FAR *ppvObject) = 0;
  166.         
  167.         virtual ULONG __stdcall AddRef( void) = 0;
  168.         
  169.         virtual ULONG __stdcall Release( void) = 0;
  170.         
  171.     };
  172.     
  173.  
  174. #endif  /* __IUnknown_INTERFACE_DEFINED__ */
  175.  
  176. #endif     // __objbase_H__
  177.  
  178. // *****************************************************
  179. // * Define OLE Automation specific types and macros
  180. // *****************************************************
  181.  
  182. // from oleauto.h
  183. #ifndef _OLEAUTO_H_
  184.  
  185. #ifndef _DISPID_DEFINED
  186. #define _DISPID_DEFINED
  187. typedef LONG DISPID;
  188. #endif
  189.  
  190. typedef OLECHAR __RPC_FAR *BSTR;
  191.  
  192. typedef struct tagVARIANT VARIANT;
  193.  
  194. #ifndef _VARIANTARG_DEFINED
  195. #define _VARIANTARG_DEFINED
  196.                         /* size is 16 */
  197. typedef struct tagVARIANT VARIANTARG;
  198.  
  199. #endif
  200. typedef struct  tagDISPPARAMS
  201.     {
  202.     /* [size_is] */ VARIANTARG __RPC_FAR *rgvarg;
  203.     /* [size_is] */ DISPID __RPC_FAR *rgdispidNamedArgs;
  204.     UINT cArgs;
  205.     UINT cNamedArgs;
  206.     }   DISPPARAMS;
  207.  
  208. #ifndef __ITypeInfo_FWD_DEFINED__
  209. #define __ITypeInfo_FWD_DEFINED__
  210. typedef interface ITypeInfo ITypeInfo;
  211. #endif  /* __ITypeInfo_FWD_DEFINED__ */
  212.  
  213. #ifndef __IDispatch_FWD_DEFINED__
  214. #define __IDispatch_FWD_DEFINED__
  215. typedef interface IDispatch IDispatch;
  216. #endif  /* __IDispatch_FWD_DEFINED__ */
  217.  
  218. #ifndef _tagEXCEPINFO_DEFINED
  219. #define _tagEXCEPINFO_DEFINED
  220. #define _EXCEPINFO_DEFINED
  221. #define _LPEXCEPINFO_DEFINED
  222.                         /* size is 32 */
  223. typedef /* [transmit] */ struct  tagEXCEPINFO
  224.     {
  225.     WORD wCode;
  226.     WORD wReserved;
  227.     BSTR bstrSource;
  228.     BSTR bstrDescription;
  229.     BSTR bstrHelpFile;
  230.     DWORD dwHelpContext;
  231.     /* [unique] */ void __RPC_FAR *pvReserved;
  232.     HRESULT ( __RPC_FAR *pfnDeferredFillIn )( 
  233.         struct tagEXCEPINFO __RPC_FAR *__MIDL_0004);
  234.     SCODE scode;
  235.     }   EXCEPINFO;
  236.  
  237.                         /* size is 4 */
  238. typedef /* [transmit] */ struct tagEXCEPINFO __RPC_FAR *LPEXCEPINFO;
  239.  
  240. #endif
  241.  
  242. #ifndef __IDispatch_INTERFACE_DEFINED__
  243. #define __IDispatch_INTERFACE_DEFINED__
  244.  
  245. typedef /* [unique] */ IDispatch __RPC_FAR *LPDISPATCH;
  246.  
  247.     interface IDispatch : public IUnknown
  248.     {
  249.     public:
  250.         virtual HRESULT __stdcall GetTypeInfoCount( 
  251.             /* [out] */ UINT __RPC_FAR *pctinfo) = 0;
  252.         
  253.         virtual HRESULT __stdcall GetTypeInfo( 
  254.             /* [in] */ UINT itinfo,
  255.             /* [in] */ LCID lcid,
  256.             /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *pptinfo) = 0;
  257.         
  258.         virtual HRESULT __stdcall GetIDsOfNames( 
  259.             /* [in] */ REFIID riid,
  260.             /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames,
  261.             /* [in] */ UINT cNames,
  262.             /* [in] */ LCID lcid,
  263.             /* [size_is][out][in] */ DISPID __RPC_FAR *rgdispid) = 0;
  264.         
  265.         virtual HRESULT __stdcall Invoke( 
  266.             /* [in] */ DISPID dispidMember,
  267.             /* [in] */ REFIID riid,
  268.             /* [in] */ LCID lcid,
  269.             /* [in] */ WORD wFlags,
  270.             /* [unique][in] */ DISPPARAMS __RPC_FAR *pdispparams,
  271.             /* [unique][out][in] */ VARIANT __RPC_FAR *pvarResult,
  272.             /* [out] */ EXCEPINFO __RPC_FAR *pexcepinfo,
  273.             /* [out] */ UINT __RPC_FAR *puArgErr) = 0;
  274.         
  275.     };
  276.     
  277. #endif  /* __IDispatch_INTERFACE_DEFINED__ */
  278.  
  279. #endif // _OLEAUTO_H_
  280.  
  281. #ifndef _WNO_PRAGMA_PUSH
  282. #pragma enum pop;
  283. #pragma pack(pop);
  284. #endif
  285.  
  286. #endif // _WOLE_HPP_INCLUDED
  287.