4 #pragma GCC system_header
9 # define EXTERN_C extern "C"
11 # define EXTERN_C extern
12 # endif /* __cplusplus */
14 # define __int64 long long
20 # define __int16 short
29 # define __hyper long long
31 # define STDMETHODCALLTYPE __stdcall
32 # define STDMETHODVCALLTYPE __cdecl
33 # define STDAPICALLTYPE __stdcall
34 # define STDAPIVCALLTYPE __cdecl
35 # define STDAPI EXTERN_C HRESULT STDAPICALLTYPE
36 # define STDAPI_(t) EXTERN_C t STDAPICALLTYPE
37 # define STDMETHODIMP HRESULT STDMETHODCALLTYPE
38 # define STDMETHODIMP_(t) t STDMETHODCALLTYPE
39 # define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
40 # define STDAPIV_(t) EXTERN_C t STDAPIVCALLTYPE
41 # define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
42 # define STDMETHODIMPV_(t) t STDMETHODVCALLTYPE
43 /* Newer MS compilers support the __interface keyword, but
44 that has a specific meaning that is enforced by the compiler.
45 For now, just get 'interface' out of the global namespace
47 # define _COM_interface struct
49 # define interface _COM_interface
51 # if defined(__cplusplus) && !defined(CINTERFACE)
52 # define STDMETHOD(m) virtual HRESULT STDMETHODCALLTYPE m
53 # define STDMETHOD_(t,m) virtual t STDMETHODCALLTYPE m
58 __attribute__((com_interface)) is obsolete in __GNUC__ >= 3
59 g++ vtables are now COM-compatible by default
61 # if defined(__GNUC__) && __GNUC__ < 3 && !defined(NOCOMATTRIBUTE)
62 # define DECLARE_INTERFACE(i) _COM_interface __attribute__((com_interface)) i
63 # define DECLARE_INTERFACE_(i,b) _COM_interface __attribute__((com_interface)) i : public b
65 # define DECLARE_INTERFACE(i) _COM_interface i
66 # define DECLARE_INTERFACE_(i,b) _COM_interface i : public b
69 # define STDMETHOD(m) HRESULT(STDMETHODCALLTYPE *m)
70 # define STDMETHOD_(t,m) t(STDMETHODCALLTYPE *m)
72 # define THIS_ INTERFACE *,
73 # define THIS INTERFACE *
77 # define DECLARE_INTERFACE(i) \
78 typedef _COM_interface i { CONST_VTABLE struct i##Vtbl *lpVtbl; } i; \
79 typedef CONST_VTABLE struct i##Vtbl i##Vtbl; \
80 CONST_VTABLE struct i##Vtbl
81 # define DECLARE_INTERFACE_(i,b) DECLARE_INTERFACE(i)
83 # define BEGIN_INTERFACE
84 # define END_INTERFACE
86 # define FWD_DECL(i) typedef _COM_interface i i
87 # if defined(__cplusplus) && !defined(CINTERFACE)
88 # define IENUM_THIS(T)
89 # define IENUM_THIS_(T)
91 # define IENUM_THIS(T) T*
92 # define IENUM_THIS_(T) T*,
94 # define DECLARE_ENUMERATOR_(I,T) \
95 DECLARE_INTERFACE_(I,IUnknown) \
97 STDMETHOD(QueryInterface)(IENUM_THIS_(I) REFIID,PVOID*) PURE; \
98 STDMETHOD_(ULONG,AddRef)(IENUM_THIS(I)) PURE; \
99 STDMETHOD_(ULONG,Release)(IENUM_THIS(I)) PURE; \
100 STDMETHOD(Next)(IENUM_THIS_(I) ULONG,T*,ULONG*) PURE; \
101 STDMETHOD(Skip)(IENUM_THIS_(I) ULONG) PURE; \
102 STDMETHOD(Reset)(IENUM_THIS(I)) PURE; \
103 STDMETHOD(Clone)(IENUM_THIS_(I) I**) PURE; \
105 # define DECLARE_ENUMERATOR(T) DECLARE_ENUMERATOR_(IEnum##T,T)
107 #endif /* _OBJC_NO_COM_ */
110 # warning _GUID_DEFINED is deprecated, use GUID_DEFINED instead
113 #if ! (defined _GUID_DEFINED || defined GUID_DEFINED) /* also defined in winnt.h */
118 unsigned short Data2
;
119 unsigned short Data3
;
120 unsigned char Data4
[8];
121 } GUID
,*REFGUID
,*LPGUID
;
122 #endif /* GUID_DEFINED */
126 #endif /* UUID_DEFINED */
129 typedef CLSID
*LPCLSID
;
132 typedef CLSID
*REFCLSID
;
134 typedef FMTID
*REFFMTID
;
135 typedef unsigned long error_status_t
;
137 typedef unsigned long PROPID
;
139 #ifndef _REFGUID_DEFINED
140 #if defined (__cplusplus) && !defined (CINTERFACE)
141 #define REFGUID const GUID&
142 #define REFIID const IID&
143 #define REFCLSID const CLSID&
144 #define REFFMTID const FMTID&
146 #define REFGUID const GUID* const
147 #define REFIID const IID* const
148 #define REFCLSID const CLSID* const
149 #define REFFMTID const FMTID* const
151 #define _REFGUID_DEFINED
152 #define _REFIID_DEFINED
153 #define _REFCLSID_DEFINED
154 #define _REFFMTID_DEFINED
157 #define GUID_SECTION ".text"
159 /* Explicit naming of .text section for readonly data is only
160 needed for older GGC (pre-2.95).
161 More recent (3.4) GCC puts readonly data in .rdata. */
162 #if defined (__GNUC__) && (__GNUC__ <= 2 && __GNUC_MINOR__ < 95)
163 #define GUID_SECT __attribute__ ((section (GUID_SECTION)))
167 #if !defined(INITGUID) || (defined(INITGUID) && defined(__cplusplus))
168 #define GUID_EXT EXTERN_C
173 #define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) GUID_EXT const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
174 #define DEFINE_OLEGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
176 #define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) GUID_EXT const GUID n
177 #define DEFINE_OLEGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)