From cb58010118bd8ee32c8e95948d4530ac58f9b0d7 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Wed, 15 Dec 2010 10:55:12 +0100 Subject: [PATCH] msi: Use an iface instead of a vtbl pointer in msi_custom_remote_impl. --- dlls/msi/custom.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index 6fa1038be1b..f875571a34c 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -1456,13 +1456,13 @@ void ACTION_FinishCustomActions(const MSIPACKAGE* package) } typedef struct _msi_custom_remote_impl { - const IWineMsiRemoteCustomActionVtbl *lpVtbl; + IWineMsiRemoteCustomAction IWineMsiRemoteCustomAction_iface; LONG refs; } msi_custom_remote_impl; -static inline msi_custom_remote_impl* mcr_from_IWineMsiRemoteCustomAction( IWineMsiRemoteCustomAction* iface ) +static inline msi_custom_remote_impl *impl_from_IWineMsiRemoteCustomAction( IWineMsiRemoteCustomAction *iface ) { - return (msi_custom_remote_impl*) iface; + return CONTAINING_RECORD(iface, msi_custom_remote_impl, IWineMsiRemoteCustomAction_iface); } static HRESULT WINAPI mcr_QueryInterface( IWineMsiRemoteCustomAction *iface, @@ -1481,14 +1481,14 @@ static HRESULT WINAPI mcr_QueryInterface( IWineMsiRemoteCustomAction *iface, static ULONG WINAPI mcr_AddRef( IWineMsiRemoteCustomAction *iface ) { - msi_custom_remote_impl* This = mcr_from_IWineMsiRemoteCustomAction( iface ); + msi_custom_remote_impl* This = impl_from_IWineMsiRemoteCustomAction( iface ); return InterlockedIncrement( &This->refs ); } static ULONG WINAPI mcr_Release( IWineMsiRemoteCustomAction *iface ) { - msi_custom_remote_impl* This = mcr_from_IWineMsiRemoteCustomAction( iface ); + msi_custom_remote_impl* This = impl_from_IWineMsiRemoteCustomAction( iface ); ULONG r; r = InterlockedDecrement( &This->refs ); @@ -1531,7 +1531,7 @@ HRESULT create_msi_custom_remote( IUnknown *pOuter, LPVOID *ppObj ) if (!This) return E_OUTOFMEMORY; - This->lpVtbl = &msi_custom_remote_vtbl; + This->IWineMsiRemoteCustomAction_iface.lpVtbl = &msi_custom_remote_vtbl; This->refs = 1; *ppObj = This;