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