mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-02 20:18:28 +00:00
urlmon: Get rid of ICOM_THIS_MULTI macro.
This commit is contained in:
parent
67d2fdc34a
commit
74e0072dfd
2 changed files with 10 additions and 9 deletions
|
@ -35,11 +35,13 @@ typedef struct {
|
|||
|
||||
static IEnumFORMATETC *EnumFORMATETC_Create(UINT cfmtetc, const FORMATETC *rgfmtetc, UINT it);
|
||||
|
||||
#define ENUMF_THIS(iface) ICOM_THIS_MULTI(EnumFORMATETC, lpEnumFORMATETCVtbl, iface)
|
||||
#define ENUMF_THIS(iface) DEFINE_THIS(EnumFORMATETC, EnumFORMATETC, iface)
|
||||
|
||||
static HRESULT WINAPI EnumFORMATETC_QueryInterface(IEnumFORMATETC *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
TRACE("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
|
||||
EnumFORMATETC *This = ENUMF_THIS(iface);
|
||||
|
||||
TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
|
||||
|
||||
*ppv = NULL;
|
||||
|
||||
|
@ -55,7 +57,7 @@ static HRESULT WINAPI EnumFORMATETC_QueryInterface(IEnumFORMATETC *iface, REFIID
|
|||
|
||||
static ULONG WINAPI EnumFORMATETC_AddRef(IEnumFORMATETC *iface)
|
||||
{
|
||||
ENUMF_THIS(iface);
|
||||
EnumFORMATETC *This = ENUMF_THIS(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
return ref;
|
||||
|
@ -63,7 +65,7 @@ static ULONG WINAPI EnumFORMATETC_AddRef(IEnumFORMATETC *iface)
|
|||
|
||||
static ULONG WINAPI EnumFORMATETC_Release(IEnumFORMATETC *iface)
|
||||
{
|
||||
ENUMF_THIS(iface);
|
||||
EnumFORMATETC *This = ENUMF_THIS(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
|
@ -81,7 +83,7 @@ static ULONG WINAPI EnumFORMATETC_Release(IEnumFORMATETC *iface)
|
|||
static HRESULT WINAPI EnumFORMATETC_Next(IEnumFORMATETC *iface, ULONG celt,
|
||||
FORMATETC *rgelt, ULONG *pceltFetched)
|
||||
{
|
||||
ENUMF_THIS(iface);
|
||||
EnumFORMATETC *This = ENUMF_THIS(iface);
|
||||
ULONG cnt;
|
||||
|
||||
TRACE("(%p)->(%d %p %p)\n", This, celt, rgelt, pceltFetched);
|
||||
|
@ -108,7 +110,7 @@ static HRESULT WINAPI EnumFORMATETC_Next(IEnumFORMATETC *iface, ULONG celt,
|
|||
|
||||
static HRESULT WINAPI EnumFORMATETC_Skip(IEnumFORMATETC *iface, ULONG celt)
|
||||
{
|
||||
ENUMF_THIS(iface);
|
||||
EnumFORMATETC *This = ENUMF_THIS(iface);
|
||||
|
||||
TRACE("(%p)->(%d)\n", This, celt);
|
||||
|
||||
|
@ -118,7 +120,7 @@ static HRESULT WINAPI EnumFORMATETC_Skip(IEnumFORMATETC *iface, ULONG celt)
|
|||
|
||||
static HRESULT WINAPI EnumFORMATETC_Reset(IEnumFORMATETC *iface)
|
||||
{
|
||||
ENUMF_THIS(iface);
|
||||
EnumFORMATETC *This = ENUMF_THIS(iface);
|
||||
|
||||
TRACE("(%p)\n", This);
|
||||
|
||||
|
@ -128,7 +130,7 @@ static HRESULT WINAPI EnumFORMATETC_Reset(IEnumFORMATETC *iface)
|
|||
|
||||
static HRESULT WINAPI EnumFORMATETC_Clone(IEnumFORMATETC *iface, IEnumFORMATETC **ppenum)
|
||||
{
|
||||
ENUMF_THIS(iface);
|
||||
EnumFORMATETC *This = ENUMF_THIS(iface);
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, ppenum);
|
||||
|
||||
|
|
|
@ -53,7 +53,6 @@ extern LONG URLMON_refCount;
|
|||
static inline void URLMON_LockModule(void) { InterlockedIncrement( &URLMON_refCount ); }
|
||||
static inline void URLMON_UnlockModule(void) { InterlockedDecrement( &URLMON_refCount ); }
|
||||
|
||||
#define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))
|
||||
#define DEFINE_THIS2(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,ifc)))
|
||||
#define DEFINE_THIS(cls,ifc,iface) DEFINE_THIS2(cls,lp ## ifc ## Vtbl,iface)
|
||||
|
||||
|
|
Loading…
Reference in a new issue