2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: include\ole32\objbase.h
5 * PURPOSE: Header file for the ole32.dll implementation
6 * PROGRAMMER: jurgen van gael [jurgen.vangael@student.kuleuven.ac.be]
10 /********************************************************************
13 This library is free software; you can redistribute it and/or
14 modify it under the terms of the GNU Library General Public License as
15 published by the Free Software Foundation; either version 2 of the
16 License, or (at your option) any later version.
18 This library is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Library General Public License for more details.
23 You should have received a copy of the GNU Library General Public
24 License along with this library; see the file COPYING.LIB. If
25 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
26 Cambridge, MA 02139, USA.
29 ********************************************************************/
37 #define EXTERN_C extern "C"
39 #define EXTERN_C extern
43 #define STDMETHODCALLTYPE __stdcall
44 #define STDMETHODVCALLTYPE __cdecl
46 #define STDAPICALLTYPE __stdcall
47 #define STDAPIVCALLTYPE __cdecl
50 #define STDAPI EXTERN_C HRESULT STDMETHODCALLTYPE
51 #define STDAPI_(type) EXTERN_C type STDAPICALLTYPE
53 #define STDMETHODIMP HRESULT STDMETHODCALLTYPE
54 #define STDMETHODIMP_(type) type STDMETHODCALLTYPE
57 /* variable argument lists versions */
58 #define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
59 #define STDAPIV_(type) EXTERN_C type STDAPIVCALLTYPE
61 #define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
62 #define STDMETHODIMPV_(type) type STDMETHODVCALLTYPE
65 #define WINOLEAPI STDAPI
66 #define WINOLEAPI_(type) STDAPI_(type)
70 * COM interface declaration macros [from the wine implementation
72 * These macros declare interfaces for both C and C++ depending for what
73 * language you are compiling
75 * DECLARE_INTERFACE(iface): declare not derived interface
76 * DECLARE_INTERFACE(iface, baseiface): declare derived interface
78 * Use CINTERFACE if you want to force a c style interface declaration,
79 * else, the compiler will look at the source file extension
81 #if defined(__cplusplus) && !defined(CINTERFACE)
82 /* define the c++ macros */
83 #define interface struct
84 #define STDMETHOD(method) virtual HRESULT STDMETHODCALLTYPE method
85 #define STDMETHOD_(type,method) virtual type STDMETHODCALLTYPE method
86 #define STDMETHODV(method) virtual HRESULT STDMETHODVCALLTYPE method
87 #define STDMETHODV_(type,method) virtual type STDMETHODVCALLTYPE method
91 #define DECLARE_INTERFACE(iface) interface iface
92 #define DECLARE_INTERFACE_(iface, baseiface) interface iface : public baseiface
95 /* define the c macros */
96 #define interface struct
97 #define STDMETHOD(method) HRESULT (STDMETHODCALLTYPE* method)
98 #define STDMETHOD_(type,method) type (STDMETHODCALLTYPE* method)
99 #define STDMETHODV(method) HRESULT (STDMETHODVCALLTYPE* method)
100 #define STDMETHODV_(type,method)type (STDMETHODVCALLTYPE* method)
102 #define THIS_ INTERFACE FAR* This,
103 #define THIS INTERFACE FAR* This
106 #define DECLARE_INTERFACE(iface) typedef interface iface { \
107 const struct iface##Vtbl FAR* lpVtbl; \
109 typedef const struct iface##Vtbl iface##Vtbl; \
110 const struct iface##Vtbl
112 #define DECLARE_INTERFACE(iface) typedef interface iface { \
113 struct iface##Vtbl FAR* lpVtbl; \
115 typedef struct iface##Vtbl iface##Vtbl; \
119 #define DECLARE_INTERFACE_(iface, baseiface) DECLARE_INTERFACE(iface)