2 * Copyright (C) 1998 François Gouget
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_OBJBASE_H
20 #define __WINE_OBJBASE_H
24 #define __WINE_INCLUDE_OBJIDL
26 #undef __WINE_INCLUDE_OBJIDL
29 /* For compatibility only, at least for now */
41 HRESULT WINAPI GetClassFile(LPCOLESTR filePathName,CLSID *pclsid);
48 /* These macros are msdev's way of defining COM objects.
49 * They are provided here for use by Winelib developpers.
54 #define WINOLEAPI STDAPI
55 #define WINOLEAPI_(type) STDAPI_(type)
57 #if defined(__cplusplus) && !defined(CINTERFACE)
58 #define interface struct
59 #define STDMETHOD(method) virtual HRESULT STDMETHODCALLTYPE method
60 #define STDMETHOD_(type,method) virtual type STDMETHODCALLTYPE method
64 #define DECLARE_INTERFACE(iface) interface iface
65 #define DECLARE_INTERFACE_(iface, baseiface) interface iface : public baseiface
67 #define BEGIN_INTERFACE
72 #define interface struct
73 #define STDMETHOD(method) HRESULT STDMETHODCALLTYPE (*method)
74 #define STDMETHOD_(type,method) type STDMETHODCALLTYPE (*method)
76 #define THIS_ INTERFACE FAR* This,
77 #define THIS INTERFACE FAR* This
81 #define CONST_VTBL const
82 #define DECLARE_INTERFACE(iface) \
83 typedef interface iface { const struct iface##Vtbl FAR* lpVtbl; } iface; \
84 typedef const struct iface##Vtbl iface##Vtbl; \
85 const struct iface##Vtbl
89 #define DECLARE_INTERFACE(iface) \
90 typedef interface iface { struct iface##Vtbl FAR* lpVtbl; } iface; \
91 typedef struct iface##Vtbl iface##Vtbl; \
94 #define DECLARE_INTERFACE_(iface, baseiface) DECLARE_INTERFACE(iface)
96 #define BEGIN_INTERFACE
99 #endif /* __cplusplus && !CINTERFACE */
101 #endif /* __WINE__ */
103 #endif /* __WINE_OBJBASE_H */