Fixed potential memory corruption in EVENT_QueryZOrder.
[wine/hacks.git] / include / objbase.h
blob1f6364030b1205ebf951b092db0befb87405021f
1 #ifndef __WINE_OBJBASE_H
2 #define __WINE_OBJBASE_H
5 #include "wine/obj_base.h"
7 /* the following depend only on obj_base.h */
8 #include "wine/obj_misc.h"
9 #include "wine/obj_channel.h"
10 #include "wine/obj_clientserver.h"
11 #include "wine/obj_storage.h"
13 /* the following depend on obj_storage.h */
14 #include "wine/obj_marshal.h"
15 #include "wine/obj_moniker.h"
16 #include "wine/obj_propertystorage.h"
18 /* the following depend on obj_moniker.h */
19 #include "wine/obj_dataobject.h"
21 #include "wine/obj_dragdrop.h"
23 HRESULT WINAPI GetClassFile(LPOLESTR filePathName,CLSID *pclsid);
26 /* These macros are msdev's way of defining COM objects. They are provided
27 * here for use by winelib users.
30 #ifdef __cplusplus
31 #define EXTERN_C extern "C"
32 #else
33 #define EXTERN_C extern
34 #endif
36 #define STDMETHODCALLTYPE __stdcall
37 #define STDMETHODVCALLTYPE __cdecl
38 #define STDAPICALLTYPE __stdcall
39 #define STDAPIVCALLTYPE __cdecl
41 #define STDAPI EXTERN_C HRESULT STDAPICALLTYPE
42 #define STDAPI_(type) EXTERN_C type STDAPICALLTYPE
44 #define STDMETHODIMP HRESULT STDMETHODCALLTYPE
45 #define STDMETHODIMP_(type) type STDMETHODCALLTYPE
47 #define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
48 #define STDAPIV_(type) EXTERN_C type STDAPIVCALLTYPE
50 #define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
51 #define STDMETHODIMPV_(type) type STDMETHODVCALLTYPE
53 #define WINOLEAPI STDAPI
54 #define WINOLEAPI_(type) STDAPI_(type)
56 #if defined(__cplusplus) && !defined(CINTERFACE)
57 #define interface struct
58 #define STDMETHOD(method) virtual HRESULT STDMETHODCALLTYPE method
59 #define STDMETHOD_(type,method) virtual type STDMETHODCALLTYPE method
60 #define PURE = 0
61 #define THIS_
62 #define THIS void
63 #define DECLARE_INTERFACE(iface) interface iface
64 #define DECLARE_INTERFACE_(iface, baseiface) interface iface : public baseiface
66 #define BEGIN_INTERFACE
67 #define END_INTERFACE
69 #else
71 #define interface struct
72 #define STDMETHOD(method) HRESULT (STDMETHODCALLTYPE * method)
73 #define STDMETHOD_(type,method) type (STDMETHODCALLTYPE * method)
74 #define PURE
75 #define THIS_ INTERFACE FAR* This,
76 #define THIS INTERFACE FAR* This
78 #ifdef CONST_VTABLE
79 #undef CONST_VTBL
80 #define CONST_VTBL const
81 #define DECLARE_INTERFACE(iface) \
82 typedef interface iface { const struct iface##Vtbl FAR* lpVtbl; } iface; \
83 typedef const struct iface##Vtbl iface##Vtbl; \
84 const struct iface##Vtbl
85 #else
86 #undef CONST_VTBL
87 #define CONST_VTBL
88 #define DECLARE_INTERFACE(iface) \
89 typedef interface iface { struct iface##Vtbl FAR* lpVtbl; } iface; \
90 typedef struct iface##Vtbl iface##Vtbl; \
91 struct iface##Vtbl
92 #endif
93 #define DECLARE_INTERFACE_(iface, baseiface) DECLARE_INTERFACE(iface)
95 #define BEGIN_INTERFACE
96 #define END_INTERFACE
98 #endif
100 #endif /* __WINE_OBJBASE_H */