From 080abfcd35afaf5e8330d52a11e7b3b624e9451e Mon Sep 17 00:00:00 2001 From: Ove Kaaven Date: Tue, 25 Sep 2001 22:38:43 +0000 Subject: [PATCH] Added ICOM_[C]THIS_MULTI macros to make it easier to implement objects that expose multiple interfaces. Added prototypes for CoGetPSClsid and IUnknown_*_Proxy. --- include/wine/obj_base.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/include/wine/obj_base.h b/include/wine/obj_base.h index e355833761a..efa07142ecc 100644 --- a/include/wine/obj_base.h +++ b/include/wine/obj_base.h @@ -584,8 +584,11 @@ INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax); #endif /* ICOM_MSVTABLE_COMPAT */ -#define ICOM_THIS(impl,iface) impl* const This=(impl*)iface -#define ICOM_CTHIS(impl,iface) const impl* const This=(const impl*)iface +#define ICOM_THIS(impl,iface) impl* const This=(impl*)(iface) +#define ICOM_CTHIS(impl,iface) const impl* const This=(const impl*)(iface) + +#define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field)) +#define ICOM_CTHIS_MULTI(impl,field,iface) const impl* const This=(const impl*)((char*)(iface) - offsetof(impl,field)) #endif /*ICOM_CINTERFACE */ @@ -676,6 +679,10 @@ struct IUnknown { #define IUnknown_AddRef(p) ICOM_CALL (AddRef,p) #define IUnknown_Release(p) ICOM_CALL (Release,p) +HRESULT CALLBACK IUnknown_QueryInterface_Proxy(IUnknown *This,REFIID riid,LPVOID*ppvObj); +ULONG CALLBACK IUnknown_AddRef_Proxy(IUnknown *This); +ULONG CALLBACK IUnknown_Release_Proxy(IUnknown *This); + /***************************************************************************** * IClassFactory interface */ @@ -797,6 +804,8 @@ HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid,LPUNKNOWN pUnk,DWORD dwClsC HRESULT WINAPI CoRevokeClassObject(DWORD dwRegister); +HRESULT WINAPI CoGetPSClsid(REFIID riid,CLSID *pclsid); + /***************************************************************************** * COM Server dll - exports */ -- 2.11.4.GIT