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