home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 October / Chip_1997-10_cd.bin / tema / sybase / powerj / hpp.z / WOLE.HPP < prev    next >
C/C++ Source or Header  |  1996-09-13  |  8KB  |  288 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. #define _OLEAUTO_H_
  185.  
  186. #ifndef _DISPID_DEFINED
  187. #define _DISPID_DEFINED
  188. typedef LONG DISPID;
  189. #endif
  190.  
  191. typedef OLECHAR __RPC_FAR *BSTR;
  192.  
  193. typedef struct tagVARIANT VARIANT;
  194.  
  195. #ifndef _VARIANTARG_DEFINED
  196. #define _VARIANTARG_DEFINED
  197.                         /* size is 16 */
  198. typedef struct tagVARIANT VARIANTARG;
  199.  
  200. #endif
  201. typedef struct  tagDISPPARAMS
  202.     {
  203.     /* [size_is] */ VARIANTARG __RPC_FAR *rgvarg;
  204.     /* [size_is] */ DISPID __RPC_FAR *rgdispidNamedArgs;
  205.     UINT cArgs;
  206.     UINT cNamedArgs;
  207.     }   DISPPARAMS;
  208.  
  209. #ifndef __ITypeInfo_FWD_DEFINED__
  210. #define __ITypeInfo_FWD_DEFINED__
  211. typedef interface ITypeInfo ITypeInfo;
  212. #endif  /* __ITypeInfo_FWD_DEFINED__ */
  213.  
  214. #ifndef __IDispatch_FWD_DEFINED__
  215. #define __IDispatch_FWD_DEFINED__
  216. typedef interface IDispatch IDispatch;
  217. #endif  /* __IDispatch_FWD_DEFINED__ */
  218.  
  219. #ifndef _tagEXCEPINFO_DEFINED
  220. #define _tagEXCEPINFO_DEFINED
  221. #define _EXCEPINFO_DEFINED
  222. #define _LPEXCEPINFO_DEFINED
  223.                         /* size is 32 */
  224. typedef /* [transmit] */ struct  tagEXCEPINFO
  225.     {
  226.     WORD wCode;
  227.     WORD wReserved;
  228.     BSTR bstrSource;
  229.     BSTR bstrDescription;
  230.     BSTR bstrHelpFile;
  231.     DWORD dwHelpContext;
  232.     /* [unique] */ void __RPC_FAR *pvReserved;
  233.     HRESULT ( __RPC_FAR *pfnDeferredFillIn )( 
  234.         struct tagEXCEPINFO __RPC_FAR *__MIDL_0004);
  235.     SCODE scode;
  236.     }   EXCEPINFO;
  237.  
  238.                         /* size is 4 */
  239. typedef /* [transmit] */ struct tagEXCEPINFO __RPC_FAR *LPEXCEPINFO;
  240.  
  241. #endif
  242.  
  243. #ifndef __IDispatch_INTERFACE_DEFINED__
  244. #define __IDispatch_INTERFACE_DEFINED__
  245.  
  246. typedef /* [unique] */ IDispatch __RPC_FAR *LPDISPATCH;
  247.  
  248.     interface IDispatch : public IUnknown
  249.     {
  250.     public:
  251.         virtual HRESULT __stdcall GetTypeInfoCount( 
  252.             /* [out] */ UINT __RPC_FAR *pctinfo) = 0;
  253.         
  254.         virtual HRESULT __stdcall GetTypeInfo( 
  255.             /* [in] */ UINT itinfo,
  256.             /* [in] */ LCID lcid,
  257.             /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *pptinfo) = 0;
  258.         
  259.         virtual HRESULT __stdcall GetIDsOfNames( 
  260.             /* [in] */ REFIID riid,
  261.             /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames,
  262.             /* [in] */ UINT cNames,
  263.             /* [in] */ LCID lcid,
  264.             /* [size_is][out][in] */ DISPID __RPC_FAR *rgdispid) = 0;
  265.         
  266.         virtual HRESULT __stdcall Invoke( 
  267.             /* [in] */ DISPID dispidMember,
  268.             /* [in] */ REFIID riid,
  269.             /* [in] */ LCID lcid,
  270.             /* [in] */ WORD wFlags,
  271.             /* [unique][in] */ DISPPARAMS __RPC_FAR *pdispparams,
  272.             /* [unique][out][in] */ VARIANT __RPC_FAR *pvarResult,
  273.             /* [out] */ EXCEPINFO __RPC_FAR *pexcepinfo,
  274.             /* [out] */ UINT __RPC_FAR *puArgErr) = 0;
  275.         
  276.     };
  277.     
  278. #endif  /* __IDispatch_INTERFACE_DEFINED__ */
  279.  
  280. #endif // _OLEAUTO_H_
  281.  
  282. #ifndef _WNO_PRAGMA_PUSH
  283. #pragma enum pop;
  284. #pragma pack(pop);
  285. #endif
  286.  
  287. #endif // _WOLE_HPP_INCLUDED
  288.