Commit b1a9701b authored by Alexandre Julliard's avatar Alexandre Julliard

Replace the _ICOM_THIS_From macros by inline functions the way it's

already done in shelllink.c.
parent 54508df5
...@@ -55,6 +55,16 @@ typedef struct ...@@ -55,6 +55,16 @@ typedef struct
} IShellBrowserImpl; } IShellBrowserImpl;
static inline IShellBrowserImpl *impl_from_ICommDlgBrowser( ICommDlgBrowser *iface )
{
return (IShellBrowserImpl *)((char*)iface - FIELD_OFFSET(IShellBrowserImpl, lpVtblCommDlgBrowser));
}
static inline IShellBrowserImpl *impl_from_IServiceProvider( IServiceProvider *iface )
{
return (IShellBrowserImpl *)((char*)iface - FIELD_OFFSET(IShellBrowserImpl, lpVtblServiceProvider));
}
/************************************************************************** /**************************************************************************
* vtable * vtable
*/ */
...@@ -728,11 +738,11 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_QueryInterface( ...@@ -728,11 +738,11 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_QueryInterface(
REFIID riid, REFIID riid,
LPVOID *ppvObj) LPVOID *ppvObj)
{ {
_ICOM_THIS_FromICommDlgBrowser(IShellBrowser,iface); IShellBrowserImpl *This = impl_from_ICommDlgBrowser(iface);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
return IShellBrowserImpl_QueryInterface(This,riid,ppvObj); return IShellBrowserImpl_QueryInterface((IShellBrowser *)This,riid,ppvObj);
} }
/************************************************************************** /**************************************************************************
...@@ -740,11 +750,11 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_QueryInterface( ...@@ -740,11 +750,11 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_QueryInterface(
*/ */
static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_AddRef(ICommDlgBrowser * iface) static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_AddRef(ICommDlgBrowser * iface)
{ {
_ICOM_THIS_FromICommDlgBrowser(IShellBrowser,iface); IShellBrowserImpl *This = impl_from_ICommDlgBrowser(iface);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
return IShellBrowserImpl_AddRef(This); return IShellBrowserImpl_AddRef((IShellBrowser *)This);
} }
/************************************************************************** /**************************************************************************
...@@ -752,11 +762,11 @@ static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_AddRef(ICommDlgBrowser * i ...@@ -752,11 +762,11 @@ static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_AddRef(ICommDlgBrowser * i
*/ */
static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_Release(ICommDlgBrowser * iface) static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_Release(ICommDlgBrowser * iface)
{ {
_ICOM_THIS_FromICommDlgBrowser(IShellBrowser,iface); IShellBrowserImpl *This = impl_from_ICommDlgBrowser(iface);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
return IShellBrowserImpl_Release(This); return IShellBrowserImpl_Release((IShellBrowser *)This);
} }
/************************************************************************** /**************************************************************************
...@@ -770,7 +780,7 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand(ICommDl ...@@ -770,7 +780,7 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand(ICommDl
LPITEMIDLIST pidl; LPITEMIDLIST pidl;
FileOpenDlgInfos *fodInfos; FileOpenDlgInfos *fodInfos;
_ICOM_THIS_FromICommDlgBrowser(IShellBrowserImpl,iface); IShellBrowserImpl *This = impl_from_ICommDlgBrowser(iface);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
...@@ -812,7 +822,7 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnStateChange(ICommDlgBr ...@@ -812,7 +822,7 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnStateChange(ICommDlgBr
ULONG uChange) ULONG uChange)
{ {
_ICOM_THIS_FromICommDlgBrowser(IShellBrowserImpl,iface); IShellBrowserImpl *This = impl_from_ICommDlgBrowser(iface);
TRACE("(%p shv=%p)\n", This, ppshv); TRACE("(%p shv=%p)\n", This, ppshv);
...@@ -855,7 +865,7 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBr ...@@ -855,7 +865,7 @@ static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBr
STRRET str; STRRET str;
WCHAR szPathW[MAX_PATH]; WCHAR szPathW[MAX_PATH];
_ICOM_THIS_FromICommDlgBrowser(IShellBrowserImpl,iface); IShellBrowserImpl *This = impl_from_ICommDlgBrowser(iface);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
...@@ -895,7 +905,7 @@ static HRESULT IShellBrowserImpl_ICommDlgBrowser_OnSelChange(ICommDlgBrowser *if ...@@ -895,7 +905,7 @@ static HRESULT IShellBrowserImpl_ICommDlgBrowser_OnSelChange(ICommDlgBrowser *if
{ {
FileOpenDlgInfos *fodInfos; FileOpenDlgInfos *fodInfos;
_ICOM_THIS_FromICommDlgBrowser(IShellBrowserImpl,iface); IShellBrowserImpl *This = impl_from_ICommDlgBrowser(iface);
fodInfos = (FileOpenDlgInfos *) GetPropA(This->hwndOwner,FileOpenDlgInfosStr); fodInfos = (FileOpenDlgInfos *) GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
TRACE("(%p do=%p view=%p)\n", This, fodInfos->Shell.FOIDataObject, fodInfos->Shell.FOIShellView); TRACE("(%p do=%p view=%p)\n", This, fodInfos->Shell.FOIDataObject, fodInfos->Shell.FOIShellView);
...@@ -942,11 +952,11 @@ static HRESULT WINAPI IShellBrowserImpl_IServiceProvider_QueryInterface( ...@@ -942,11 +952,11 @@ static HRESULT WINAPI IShellBrowserImpl_IServiceProvider_QueryInterface(
REFIID riid, REFIID riid,
LPVOID *ppvObj) LPVOID *ppvObj)
{ {
_ICOM_THIS_FromIServiceProvider(IShellBrowser,iface); IShellBrowserImpl *This = impl_from_IServiceProvider(iface);
FIXME("(%p)\n", This); FIXME("(%p)\n", This);
return IShellBrowserImpl_QueryInterface(This,riid,ppvObj); return IShellBrowserImpl_QueryInterface((IShellBrowser *)This,riid,ppvObj);
} }
/************************************************************************** /**************************************************************************
...@@ -954,11 +964,11 @@ static HRESULT WINAPI IShellBrowserImpl_IServiceProvider_QueryInterface( ...@@ -954,11 +964,11 @@ static HRESULT WINAPI IShellBrowserImpl_IServiceProvider_QueryInterface(
*/ */
static ULONG WINAPI IShellBrowserImpl_IServiceProvider_AddRef(IServiceProvider * iface) static ULONG WINAPI IShellBrowserImpl_IServiceProvider_AddRef(IServiceProvider * iface)
{ {
_ICOM_THIS_FromIServiceProvider(IShellBrowser,iface); IShellBrowserImpl *This = impl_from_IServiceProvider(iface);
FIXME("(%p)\n", This); FIXME("(%p)\n", This);
return IShellBrowserImpl_AddRef(This); return IShellBrowserImpl_AddRef((IShellBrowser *)This);
} }
/************************************************************************** /**************************************************************************
...@@ -966,11 +976,11 @@ static ULONG WINAPI IShellBrowserImpl_IServiceProvider_AddRef(IServiceProvider * ...@@ -966,11 +976,11 @@ static ULONG WINAPI IShellBrowserImpl_IServiceProvider_AddRef(IServiceProvider *
*/ */
static ULONG WINAPI IShellBrowserImpl_IServiceProvider_Release(IServiceProvider * iface) static ULONG WINAPI IShellBrowserImpl_IServiceProvider_Release(IServiceProvider * iface)
{ {
_ICOM_THIS_FromIServiceProvider(IShellBrowser,iface); IShellBrowserImpl *This = impl_from_IServiceProvider(iface);
FIXME("(%p)\n", This); FIXME("(%p)\n", This);
return IShellBrowserImpl_Release(This); return IShellBrowserImpl_Release((IShellBrowser *)This);
} }
/************************************************************************** /**************************************************************************
...@@ -990,14 +1000,14 @@ static HRESULT WINAPI IShellBrowserImpl_IServiceProvider_QueryService( ...@@ -990,14 +1000,14 @@ static HRESULT WINAPI IShellBrowserImpl_IServiceProvider_QueryService(
REFIID riid, REFIID riid,
void** ppv) void** ppv)
{ {
_ICOM_THIS_FromIServiceProvider(IShellBrowser,iface); IShellBrowserImpl *This = impl_from_IServiceProvider(iface);
FIXME("(%p)\n\t%s\n\t%s\n", This,debugstr_guid(guidService), debugstr_guid(riid) ); FIXME("(%p)\n\t%s\n\t%s\n", This,debugstr_guid(guidService), debugstr_guid(riid) );
*ppv = NULL; *ppv = NULL;
if(guidService && IsEqualIID(guidService, &SID_STopLevelBrowser)) if(guidService && IsEqualIID(guidService, &SID_STopLevelBrowser))
{ {
return IShellBrowserImpl_QueryInterface(This,riid,ppv); return IShellBrowserImpl_QueryInterface((IShellBrowser *)This,riid,ppv);
} }
FIXME("(%p) unknown interface requested\n", This); FIXME("(%p) unknown interface requested\n", This);
return E_NOINTERFACE; return E_NOINTERFACE;
......
...@@ -37,11 +37,6 @@ ...@@ -37,11 +37,6 @@
/*********************************************************************** /***********************************************************************
* Defines and global variables * Defines and global variables
*/ */
#define _ICommDlgBrowser_Offset ((int)(&(((IShellBrowserImpl*)0)->lpVtblCommDlgBrowser)))
#define _ICOM_THIS_FromICommDlgBrowser(class, name) class* This = (class*)(((char*)name)-_ICommDlgBrowser_Offset);
#define _IServiceProvider_Offset ((int)(&(((IShellBrowserImpl*)0)->lpVtblServiceProvider)))
#define _ICOM_THIS_FromIServiceProvider(class, name) class* This = (class*)(((char*)name)-_IServiceProvider_Offset);
/* dialog internal property */ /* dialog internal property */
......
...@@ -53,6 +53,11 @@ typedef struct AntiMonikerImpl{ ...@@ -53,6 +53,11 @@ typedef struct AntiMonikerImpl{
} AntiMonikerImpl; } AntiMonikerImpl;
static inline IMoniker *impl_from_IROTData( IROTData *iface )
{
return (IMoniker *)((char*)iface - FIELD_OFFSET(AntiMonikerImpl, lpvtbl2));
}
/******************************************************************************* /*******************************************************************************
* AntiMoniker_QueryInterface * AntiMoniker_QueryInterface
...@@ -485,7 +490,7 @@ AntiMonikerImpl_IsSystemMoniker(IMoniker* iface,DWORD* pwdMksys) ...@@ -485,7 +490,7 @@ AntiMonikerImpl_IsSystemMoniker(IMoniker* iface,DWORD* pwdMksys)
static HRESULT WINAPI static HRESULT WINAPI
AntiMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid,VOID** ppvObject) AntiMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid,VOID** ppvObject)
{ {
ICOM_THIS_From_IROTData(IMoniker, iface); IMoniker *This = impl_from_IROTData(iface);
TRACE("(%p,%p,%p)\n",iface,riid,ppvObject); TRACE("(%p,%p,%p)\n",iface,riid,ppvObject);
...@@ -497,7 +502,7 @@ AntiMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid,VOID** ppvObje ...@@ -497,7 +502,7 @@ AntiMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid,VOID** ppvObje
*/ */
static ULONG WINAPI AntiMonikerROTDataImpl_AddRef(IROTData *iface) static ULONG WINAPI AntiMonikerROTDataImpl_AddRef(IROTData *iface)
{ {
ICOM_THIS_From_IROTData(IMoniker, iface); IMoniker *This = impl_from_IROTData(iface);
TRACE("(%p)\n",iface); TRACE("(%p)\n",iface);
...@@ -509,7 +514,7 @@ static ULONG WINAPI AntiMonikerROTDataImpl_AddRef(IROTData *iface) ...@@ -509,7 +514,7 @@ static ULONG WINAPI AntiMonikerROTDataImpl_AddRef(IROTData *iface)
*/ */
static ULONG WINAPI AntiMonikerROTDataImpl_Release(IROTData* iface) static ULONG WINAPI AntiMonikerROTDataImpl_Release(IROTData* iface)
{ {
ICOM_THIS_From_IROTData(IMoniker, iface); IMoniker *This = impl_from_IROTData(iface);
TRACE("(%p)\n",iface); TRACE("(%p)\n",iface);
......
...@@ -80,6 +80,10 @@ typedef struct EnumMonikerImpl{ ...@@ -80,6 +80,10 @@ typedef struct EnumMonikerImpl{
} EnumMonikerImpl; } EnumMonikerImpl;
static inline IMoniker *impl_from_IROTData( IROTData *iface )
{
return (IMoniker *)((char*)iface - FIELD_OFFSET(CompositeMonikerImpl, lpvtbl2));
}
static HRESULT EnumMonikerImpl_CreateEnumMoniker(IMoniker** tabMoniker,ULONG tabSize,ULONG currentPos,BOOL leftToRigth,IEnumMoniker ** ppmk); static HRESULT EnumMonikerImpl_CreateEnumMoniker(IMoniker** tabMoniker,ULONG tabSize,ULONG currentPos,BOOL leftToRigth,IEnumMoniker ** ppmk);
...@@ -1208,7 +1212,7 @@ CompositeMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid, ...@@ -1208,7 +1212,7 @@ CompositeMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid,
VOID** ppvObject) VOID** ppvObject)
{ {
ICOM_THIS_From_IROTData(IMoniker, iface); IMoniker *This = impl_from_IROTData(iface);
TRACE("(%p,%p,%p)\n",iface,riid,ppvObject); TRACE("(%p,%p,%p)\n",iface,riid,ppvObject);
...@@ -1221,7 +1225,7 @@ CompositeMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid, ...@@ -1221,7 +1225,7 @@ CompositeMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid,
static ULONG WINAPI static ULONG WINAPI
CompositeMonikerROTDataImpl_AddRef(IROTData *iface) CompositeMonikerROTDataImpl_AddRef(IROTData *iface)
{ {
ICOM_THIS_From_IROTData(IMoniker, iface); IMoniker *This = impl_from_IROTData(iface);
TRACE("(%p)\n",iface); TRACE("(%p)\n",iface);
...@@ -1233,7 +1237,7 @@ CompositeMonikerROTDataImpl_AddRef(IROTData *iface) ...@@ -1233,7 +1237,7 @@ CompositeMonikerROTDataImpl_AddRef(IROTData *iface)
*/ */
static ULONG WINAPI CompositeMonikerROTDataImpl_Release(IROTData* iface) static ULONG WINAPI CompositeMonikerROTDataImpl_Release(IROTData* iface)
{ {
ICOM_THIS_From_IROTData(IMoniker, iface); IMoniker *This = impl_from_IROTData(iface);
TRACE("(%p)\n",iface); TRACE("(%p)\n",iface);
......
...@@ -147,14 +147,22 @@ static const ISupportErrorInfoVtbl ISupportErrorInfoImpl_VTable; ...@@ -147,14 +147,22 @@ static const ISupportErrorInfoVtbl ISupportErrorInfoImpl_VTable;
/* /*
converts an object pointer to This converts an object pointer to This
*/ */
#define _IErrorInfo_Offset ((int)(&(((ErrorInfoImpl*)0)->lpvtei)))
#define _ICOM_THIS_From_IErrorInfo(class, name) class* This = (class*)(((char*)name)-_IErrorInfo_Offset)
#define _ICreateErrorInfo_Offset ((int)(&(((ErrorInfoImpl*)0)->lpvtcei))) static inline ErrorInfoImpl *impl_from_IErrorInfo( IErrorInfo *iface )
#define _ICOM_THIS_From_ICreateErrorInfo(class, name) class* This = (class*)(((char*)name)-_ICreateErrorInfo_Offset) {
return (ErrorInfoImpl *)((char*)iface - FIELD_OFFSET(ErrorInfoImpl, lpvtei));
}
static inline ErrorInfoImpl *impl_from_ICreateErrorInfo( ICreateErrorInfo *iface )
{
return (ErrorInfoImpl *)((char*)iface - FIELD_OFFSET(ErrorInfoImpl, lpvtcei));
}
static inline ErrorInfoImpl *impl_from_ISupportErrorInfo( ISupportErrorInfo *iface )
{
return (ErrorInfoImpl *)((char*)iface - FIELD_OFFSET(ErrorInfoImpl, lpvtsei));
}
#define _ISupportErrorInfo_Offset ((int)(&(((ErrorInfoImpl*)0)->lpvtsei)))
#define _ICOM_THIS_From_ISupportErrorInfo(class, name) class* This = (class*)(((char*)name)-_ISupportErrorInfo_Offset)
/* /*
converts This to an object pointer converts This to an object pointer
...@@ -186,7 +194,7 @@ static HRESULT WINAPI IErrorInfoImpl_QueryInterface( ...@@ -186,7 +194,7 @@ static HRESULT WINAPI IErrorInfoImpl_QueryInterface(
REFIID riid, REFIID riid,
VOID** ppvoid) VOID** ppvoid)
{ {
_ICOM_THIS_From_IErrorInfo(ErrorInfoImpl, iface); ErrorInfoImpl *This = impl_from_IErrorInfo(iface);
TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvoid); TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvoid);
*ppvoid = NULL; *ppvoid = NULL;
...@@ -217,7 +225,7 @@ static HRESULT WINAPI IErrorInfoImpl_QueryInterface( ...@@ -217,7 +225,7 @@ static HRESULT WINAPI IErrorInfoImpl_QueryInterface(
static ULONG WINAPI IErrorInfoImpl_AddRef( static ULONG WINAPI IErrorInfoImpl_AddRef(
IErrorInfo* iface) IErrorInfo* iface)
{ {
_ICOM_THIS_From_IErrorInfo(ErrorInfoImpl, iface); ErrorInfoImpl *This = impl_from_IErrorInfo(iface);
TRACE("(%p)->(count=%lu)\n",This,This->ref); TRACE("(%p)->(count=%lu)\n",This,This->ref);
return InterlockedIncrement(&This->ref); return InterlockedIncrement(&This->ref);
} }
...@@ -225,7 +233,7 @@ static ULONG WINAPI IErrorInfoImpl_AddRef( ...@@ -225,7 +233,7 @@ static ULONG WINAPI IErrorInfoImpl_AddRef(
static ULONG WINAPI IErrorInfoImpl_Release( static ULONG WINAPI IErrorInfoImpl_Release(
IErrorInfo* iface) IErrorInfo* iface)
{ {
_ICOM_THIS_From_IErrorInfo(ErrorInfoImpl, iface); ErrorInfoImpl *This = impl_from_IErrorInfo(iface);
ULONG ref = InterlockedDecrement(&This->ref); ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p)->(count=%lu)\n",This,ref+1); TRACE("(%p)->(count=%lu)\n",This,ref+1);
...@@ -243,7 +251,7 @@ static HRESULT WINAPI IErrorInfoImpl_GetGUID( ...@@ -243,7 +251,7 @@ static HRESULT WINAPI IErrorInfoImpl_GetGUID(
IErrorInfo* iface, IErrorInfo* iface,
GUID * pGUID) GUID * pGUID)
{ {
_ICOM_THIS_From_IErrorInfo(ErrorInfoImpl, iface); ErrorInfoImpl *This = impl_from_IErrorInfo(iface);
TRACE("(%p)->(count=%lu)\n",This,This->ref); TRACE("(%p)->(count=%lu)\n",This,This->ref);
if(!pGUID )return E_INVALIDARG; if(!pGUID )return E_INVALIDARG;
memcpy(pGUID, &This->m_Guid, sizeof(GUID)); memcpy(pGUID, &This->m_Guid, sizeof(GUID));
...@@ -254,7 +262,7 @@ static HRESULT WINAPI IErrorInfoImpl_GetSource( ...@@ -254,7 +262,7 @@ static HRESULT WINAPI IErrorInfoImpl_GetSource(
IErrorInfo* iface, IErrorInfo* iface,
BSTR *pBstrSource) BSTR *pBstrSource)
{ {
_ICOM_THIS_From_IErrorInfo(ErrorInfoImpl, iface); ErrorInfoImpl *This = impl_from_IErrorInfo(iface);
TRACE("(%p)->(pBstrSource=%p)\n",This,pBstrSource); TRACE("(%p)->(pBstrSource=%p)\n",This,pBstrSource);
if (pBstrSource == NULL) if (pBstrSource == NULL)
return E_INVALIDARG; return E_INVALIDARG;
...@@ -266,7 +274,7 @@ static HRESULT WINAPI IErrorInfoImpl_GetDescription( ...@@ -266,7 +274,7 @@ static HRESULT WINAPI IErrorInfoImpl_GetDescription(
IErrorInfo* iface, IErrorInfo* iface,
BSTR *pBstrDescription) BSTR *pBstrDescription)
{ {
_ICOM_THIS_From_IErrorInfo(ErrorInfoImpl, iface); ErrorInfoImpl *This = impl_from_IErrorInfo(iface);
TRACE("(%p)->(pBstrDescription=%p)\n",This,pBstrDescription); TRACE("(%p)->(pBstrDescription=%p)\n",This,pBstrDescription);
if (pBstrDescription == NULL) if (pBstrDescription == NULL)
...@@ -280,7 +288,7 @@ static HRESULT WINAPI IErrorInfoImpl_GetHelpFile( ...@@ -280,7 +288,7 @@ static HRESULT WINAPI IErrorInfoImpl_GetHelpFile(
IErrorInfo* iface, IErrorInfo* iface,
BSTR *pBstrHelpFile) BSTR *pBstrHelpFile)
{ {
_ICOM_THIS_From_IErrorInfo(ErrorInfoImpl, iface); ErrorInfoImpl *This = impl_from_IErrorInfo(iface);
TRACE("(%p)->(pBstrHelpFile=%p)\n",This, pBstrHelpFile); TRACE("(%p)->(pBstrHelpFile=%p)\n",This, pBstrHelpFile);
if (pBstrHelpFile == NULL) if (pBstrHelpFile == NULL)
...@@ -294,7 +302,7 @@ static HRESULT WINAPI IErrorInfoImpl_GetHelpContext( ...@@ -294,7 +302,7 @@ static HRESULT WINAPI IErrorInfoImpl_GetHelpContext(
IErrorInfo* iface, IErrorInfo* iface,
DWORD *pdwHelpContext) DWORD *pdwHelpContext)
{ {
_ICOM_THIS_From_IErrorInfo(ErrorInfoImpl, iface); ErrorInfoImpl *This = impl_from_IErrorInfo(iface);
TRACE("(%p)->(pdwHelpContext=%p)\n",This, pdwHelpContext); TRACE("(%p)->(pdwHelpContext=%p)\n",This, pdwHelpContext);
if (pdwHelpContext == NULL) if (pdwHelpContext == NULL)
return E_INVALIDARG; return E_INVALIDARG;
...@@ -322,7 +330,7 @@ static HRESULT WINAPI ICreateErrorInfoImpl_QueryInterface( ...@@ -322,7 +330,7 @@ static HRESULT WINAPI ICreateErrorInfoImpl_QueryInterface(
REFIID riid, REFIID riid,
VOID** ppvoid) VOID** ppvoid)
{ {
_ICOM_THIS_From_ICreateErrorInfo(ErrorInfoImpl, iface); ErrorInfoImpl *This = impl_from_ICreateErrorInfo(iface);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
return IErrorInfo_QueryInterface(_IErrorInfo_(This), riid, ppvoid); return IErrorInfo_QueryInterface(_IErrorInfo_(This), riid, ppvoid);
} }
...@@ -330,7 +338,7 @@ static HRESULT WINAPI ICreateErrorInfoImpl_QueryInterface( ...@@ -330,7 +338,7 @@ static HRESULT WINAPI ICreateErrorInfoImpl_QueryInterface(
static ULONG WINAPI ICreateErrorInfoImpl_AddRef( static ULONG WINAPI ICreateErrorInfoImpl_AddRef(
ICreateErrorInfo* iface) ICreateErrorInfo* iface)
{ {
_ICOM_THIS_From_ICreateErrorInfo(ErrorInfoImpl, iface); ErrorInfoImpl *This = impl_from_ICreateErrorInfo(iface);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
return IErrorInfo_AddRef(_IErrorInfo_(This)); return IErrorInfo_AddRef(_IErrorInfo_(This));
} }
...@@ -338,7 +346,7 @@ static ULONG WINAPI ICreateErrorInfoImpl_AddRef( ...@@ -338,7 +346,7 @@ static ULONG WINAPI ICreateErrorInfoImpl_AddRef(
static ULONG WINAPI ICreateErrorInfoImpl_Release( static ULONG WINAPI ICreateErrorInfoImpl_Release(
ICreateErrorInfo* iface) ICreateErrorInfo* iface)
{ {
_ICOM_THIS_From_ICreateErrorInfo(ErrorInfoImpl, iface); ErrorInfoImpl *This = impl_from_ICreateErrorInfo(iface);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
return IErrorInfo_Release(_IErrorInfo_(This)); return IErrorInfo_Release(_IErrorInfo_(This));
} }
...@@ -348,7 +356,7 @@ static HRESULT WINAPI ICreateErrorInfoImpl_SetGUID( ...@@ -348,7 +356,7 @@ static HRESULT WINAPI ICreateErrorInfoImpl_SetGUID(
ICreateErrorInfo* iface, ICreateErrorInfo* iface,
REFGUID rguid) REFGUID rguid)
{ {
_ICOM_THIS_From_ICreateErrorInfo(ErrorInfoImpl, iface); ErrorInfoImpl *This = impl_from_ICreateErrorInfo(iface);
TRACE("(%p)->(%s)\n", This, debugstr_guid(rguid)); TRACE("(%p)->(%s)\n", This, debugstr_guid(rguid));
memcpy(&This->m_Guid, rguid, sizeof(GUID)); memcpy(&This->m_Guid, rguid, sizeof(GUID));
return S_OK; return S_OK;
...@@ -358,7 +366,7 @@ static HRESULT WINAPI ICreateErrorInfoImpl_SetSource( ...@@ -358,7 +366,7 @@ static HRESULT WINAPI ICreateErrorInfoImpl_SetSource(
ICreateErrorInfo* iface, ICreateErrorInfo* iface,
LPOLESTR szSource) LPOLESTR szSource)
{ {
_ICOM_THIS_From_ICreateErrorInfo(ErrorInfoImpl, iface); ErrorInfoImpl *This = impl_from_ICreateErrorInfo(iface);
TRACE("(%p): %s\n",This, debugstr_w(szSource)); TRACE("(%p): %s\n",This, debugstr_w(szSource));
if (This->bstrSource != NULL) if (This->bstrSource != NULL)
ERRORINFO_SysFreeString(This->bstrSource); ERRORINFO_SysFreeString(This->bstrSource);
...@@ -371,7 +379,7 @@ static HRESULT WINAPI ICreateErrorInfoImpl_SetDescription( ...@@ -371,7 +379,7 @@ static HRESULT WINAPI ICreateErrorInfoImpl_SetDescription(
ICreateErrorInfo* iface, ICreateErrorInfo* iface,
LPOLESTR szDescription) LPOLESTR szDescription)
{ {
_ICOM_THIS_From_ICreateErrorInfo(ErrorInfoImpl, iface); ErrorInfoImpl *This = impl_from_ICreateErrorInfo(iface);
TRACE("(%p): %s\n",This, debugstr_w(szDescription)); TRACE("(%p): %s\n",This, debugstr_w(szDescription));
if (This->bstrDescription != NULL) if (This->bstrDescription != NULL)
ERRORINFO_SysFreeString(This->bstrDescription); ERRORINFO_SysFreeString(This->bstrDescription);
...@@ -384,7 +392,7 @@ static HRESULT WINAPI ICreateErrorInfoImpl_SetHelpFile( ...@@ -384,7 +392,7 @@ static HRESULT WINAPI ICreateErrorInfoImpl_SetHelpFile(
ICreateErrorInfo* iface, ICreateErrorInfo* iface,
LPOLESTR szHelpFile) LPOLESTR szHelpFile)
{ {
_ICOM_THIS_From_ICreateErrorInfo(ErrorInfoImpl, iface); ErrorInfoImpl *This = impl_from_ICreateErrorInfo(iface);
TRACE("(%p,%s)\n",This,debugstr_w(szHelpFile)); TRACE("(%p,%s)\n",This,debugstr_w(szHelpFile));
if (This->bstrHelpFile != NULL) if (This->bstrHelpFile != NULL)
ERRORINFO_SysFreeString(This->bstrHelpFile); ERRORINFO_SysFreeString(This->bstrHelpFile);
...@@ -396,7 +404,7 @@ static HRESULT WINAPI ICreateErrorInfoImpl_SetHelpContext( ...@@ -396,7 +404,7 @@ static HRESULT WINAPI ICreateErrorInfoImpl_SetHelpContext(
ICreateErrorInfo* iface, ICreateErrorInfo* iface,
DWORD dwHelpContext) DWORD dwHelpContext)
{ {
_ICOM_THIS_From_ICreateErrorInfo(ErrorInfoImpl, iface); ErrorInfoImpl *This = impl_from_ICreateErrorInfo(iface);
TRACE("(%p,%ld)\n",This,dwHelpContext); TRACE("(%p,%ld)\n",This,dwHelpContext);
This->m_dwHelpContext = dwHelpContext; This->m_dwHelpContext = dwHelpContext;
return S_OK; return S_OK;
...@@ -420,7 +428,7 @@ static HRESULT WINAPI ISupportErrorInfoImpl_QueryInterface( ...@@ -420,7 +428,7 @@ static HRESULT WINAPI ISupportErrorInfoImpl_QueryInterface(
REFIID riid, REFIID riid,
VOID** ppvoid) VOID** ppvoid)
{ {
_ICOM_THIS_From_ISupportErrorInfo(ErrorInfoImpl, iface); ErrorInfoImpl *This = impl_from_ISupportErrorInfo(iface);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
return IErrorInfo_QueryInterface(_IErrorInfo_(This), riid, ppvoid); return IErrorInfo_QueryInterface(_IErrorInfo_(This), riid, ppvoid);
...@@ -429,7 +437,7 @@ static HRESULT WINAPI ISupportErrorInfoImpl_QueryInterface( ...@@ -429,7 +437,7 @@ static HRESULT WINAPI ISupportErrorInfoImpl_QueryInterface(
static ULONG WINAPI ISupportErrorInfoImpl_AddRef( static ULONG WINAPI ISupportErrorInfoImpl_AddRef(
ISupportErrorInfo* iface) ISupportErrorInfo* iface)
{ {
_ICOM_THIS_From_ISupportErrorInfo(ErrorInfoImpl, iface); ErrorInfoImpl *This = impl_from_ISupportErrorInfo(iface);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
return IErrorInfo_AddRef(_IErrorInfo_(This)); return IErrorInfo_AddRef(_IErrorInfo_(This));
} }
...@@ -437,7 +445,7 @@ static ULONG WINAPI ISupportErrorInfoImpl_AddRef( ...@@ -437,7 +445,7 @@ static ULONG WINAPI ISupportErrorInfoImpl_AddRef(
static ULONG WINAPI ISupportErrorInfoImpl_Release( static ULONG WINAPI ISupportErrorInfoImpl_Release(
ISupportErrorInfo* iface) ISupportErrorInfo* iface)
{ {
_ICOM_THIS_From_ISupportErrorInfo(ErrorInfoImpl, iface); ErrorInfoImpl *This = impl_from_ISupportErrorInfo(iface);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
return IErrorInfo_Release(_IErrorInfo_(This)); return IErrorInfo_Release(_IErrorInfo_(This));
} }
...@@ -447,7 +455,7 @@ static HRESULT WINAPI ISupportErrorInfoImpl_InterfaceSupportsErrorInfo( ...@@ -447,7 +455,7 @@ static HRESULT WINAPI ISupportErrorInfoImpl_InterfaceSupportsErrorInfo(
ISupportErrorInfo* iface, ISupportErrorInfo* iface,
REFIID riid) REFIID riid)
{ {
_ICOM_THIS_From_ISupportErrorInfo(ErrorInfoImpl, iface); ErrorInfoImpl *This = impl_from_ISupportErrorInfo(iface);
TRACE("(%p)->(%s)\n", This, debugstr_guid(riid)); TRACE("(%p)->(%s)\n", This, debugstr_guid(riid));
return (IsEqualIID(riid, &This->m_Guid)) ? S_OK : S_FALSE; return (IsEqualIID(riid, &This->m_Guid)) ? S_OK : S_FALSE;
} }
......
...@@ -60,6 +60,11 @@ typedef struct FileMonikerImpl{ ...@@ -60,6 +60,11 @@ typedef struct FileMonikerImpl{
IUnknown *pMarshal; /* custom marshaler */ IUnknown *pMarshal; /* custom marshaler */
} FileMonikerImpl; } FileMonikerImpl;
static inline IMoniker *impl_from_IROTData( IROTData *iface )
{
return (IMoniker *)((char*)iface - FIELD_OFFSET(FileMonikerImpl, lpvtbl2));
}
/* Local function used by filemoniker implementation */ /* Local function used by filemoniker implementation */
static HRESULT WINAPI FileMonikerImpl_Construct(FileMonikerImpl* iface, LPCOLESTR lpszPathName); static HRESULT WINAPI FileMonikerImpl_Construct(FileMonikerImpl* iface, LPCOLESTR lpszPathName);
static HRESULT WINAPI FileMonikerImpl_Destroy(FileMonikerImpl* iface); static HRESULT WINAPI FileMonikerImpl_Destroy(FileMonikerImpl* iface);
...@@ -1198,7 +1203,7 @@ static HRESULT WINAPI ...@@ -1198,7 +1203,7 @@ static HRESULT WINAPI
FileMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid,VOID** ppvObject) FileMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid,VOID** ppvObject)
{ {
ICOM_THIS_From_IROTData(IMoniker, iface); IMoniker *This = impl_from_IROTData(iface);
TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppvObject); TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppvObject);
...@@ -1211,7 +1216,7 @@ FileMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid,VOID** ppvObje ...@@ -1211,7 +1216,7 @@ FileMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid,VOID** ppvObje
static ULONG WINAPI static ULONG WINAPI
FileMonikerROTDataImpl_AddRef(IROTData *iface) FileMonikerROTDataImpl_AddRef(IROTData *iface)
{ {
ICOM_THIS_From_IROTData(IMoniker, iface); IMoniker *This = impl_from_IROTData(iface);
TRACE("(%p)\n",This); TRACE("(%p)\n",This);
...@@ -1224,7 +1229,7 @@ FileMonikerROTDataImpl_AddRef(IROTData *iface) ...@@ -1224,7 +1229,7 @@ FileMonikerROTDataImpl_AddRef(IROTData *iface)
static ULONG WINAPI static ULONG WINAPI
FileMonikerROTDataImpl_Release(IROTData* iface) FileMonikerROTDataImpl_Release(IROTData* iface)
{ {
ICOM_THIS_From_IROTData(IMoniker, iface); IMoniker *This = impl_from_IROTData(iface);
TRACE("(%p)\n",This); TRACE("(%p)\n",This);
...@@ -1238,7 +1243,7 @@ static HRESULT WINAPI ...@@ -1238,7 +1243,7 @@ static HRESULT WINAPI
FileMonikerROTDataImpl_GetComparisonData(IROTData* iface, BYTE* pbData, FileMonikerROTDataImpl_GetComparisonData(IROTData* iface, BYTE* pbData,
ULONG cbMax, ULONG* pcbData) ULONG cbMax, ULONG* pcbData)
{ {
ICOM_THIS_From_IROTData(IMoniker, iface); IMoniker *This = impl_from_IROTData(iface);
FileMonikerImpl *This1 = (FileMonikerImpl *)This; FileMonikerImpl *This1 = (FileMonikerImpl *)This;
int len = (strlenW(This1->filePathName)+1); int len = (strlenW(This1->filePathName)+1);
int i; int i;
......
...@@ -47,8 +47,10 @@ typedef struct _FTMarshalImpl { ...@@ -47,8 +47,10 @@ typedef struct _FTMarshalImpl {
#define _IFTMUnknown_(This)(IUnknown*)&(This->lpVtbl) #define _IFTMUnknown_(This)(IUnknown*)&(This->lpVtbl)
#define _IFTMarshal_(This) (IMarshal*)&(This->lpvtblFTM) #define _IFTMarshal_(This) (IMarshal*)&(This->lpvtblFTM)
#define _IFTMarshall_Offset ((int)(&(((FTMarshalImpl*)0)->lpvtblFTM))) static inline FTMarshalImpl *impl_from_IMarshal( IMarshal *iface )
#define _ICOM_THIS_From_IFTMarshal(class, name) class* This = (class*)(((char*)name)-_IFTMarshall_Offset); {
return (FTMarshalImpl *)((char*)iface - FIELD_OFFSET(FTMarshalImpl, lpvtblFTM));
}
/* inner IUnknown to handle aggregation */ /* inner IUnknown to handle aggregation */
static HRESULT WINAPI static HRESULT WINAPI
...@@ -104,7 +106,7 @@ static HRESULT WINAPI ...@@ -104,7 +106,7 @@ static HRESULT WINAPI
FTMarshalImpl_QueryInterface (LPMARSHAL iface, REFIID riid, LPVOID * ppv) FTMarshalImpl_QueryInterface (LPMARSHAL iface, REFIID riid, LPVOID * ppv)
{ {
_ICOM_THIS_From_IFTMarshal (FTMarshalImpl, iface); FTMarshalImpl *This = impl_from_IMarshal(iface);
TRACE ("(%p)->(\n\tIID:\t%s,%p)\n", This, debugstr_guid (riid), ppv); TRACE ("(%p)->(\n\tIID:\t%s,%p)\n", This, debugstr_guid (riid), ppv);
return IUnknown_QueryInterface (This->pUnkOuter, riid, ppv); return IUnknown_QueryInterface (This->pUnkOuter, riid, ppv);
...@@ -114,7 +116,7 @@ static ULONG WINAPI ...@@ -114,7 +116,7 @@ static ULONG WINAPI
FTMarshalImpl_AddRef (LPMARSHAL iface) FTMarshalImpl_AddRef (LPMARSHAL iface)
{ {
_ICOM_THIS_From_IFTMarshal (FTMarshalImpl, iface); FTMarshalImpl *This = impl_from_IMarshal(iface);
TRACE ("\n"); TRACE ("\n");
return IUnknown_AddRef (This->pUnkOuter); return IUnknown_AddRef (This->pUnkOuter);
...@@ -124,7 +126,7 @@ static ULONG WINAPI ...@@ -124,7 +126,7 @@ static ULONG WINAPI
FTMarshalImpl_Release (LPMARSHAL iface) FTMarshalImpl_Release (LPMARSHAL iface)
{ {
_ICOM_THIS_From_IFTMarshal (FTMarshalImpl, iface); FTMarshalImpl *This = impl_from_IMarshal(iface);
TRACE ("\n"); TRACE ("\n");
return IUnknown_Release (This->pUnkOuter); return IUnknown_Release (This->pUnkOuter);
...@@ -146,7 +148,7 @@ FTMarshalImpl_GetMarshalSizeMax (LPMARSHAL iface, REFIID riid, void *pv, DWORD d ...@@ -146,7 +148,7 @@ FTMarshalImpl_GetMarshalSizeMax (LPMARSHAL iface, REFIID riid, void *pv, DWORD d
IMarshal *pMarshal = NULL; IMarshal *pMarshal = NULL;
HRESULT hres; HRESULT hres;
_ICOM_THIS_From_IFTMarshal (FTMarshalImpl, iface); FTMarshalImpl *This = impl_from_IMarshal(iface);
FIXME ("(), stub!\n"); FIXME ("(), stub!\n");
...@@ -172,7 +174,7 @@ FTMarshalImpl_MarshalInterface (LPMARSHAL iface, IStream * pStm, REFIID riid, vo ...@@ -172,7 +174,7 @@ FTMarshalImpl_MarshalInterface (LPMARSHAL iface, IStream * pStm, REFIID riid, vo
IMarshal *pMarshal = NULL; IMarshal *pMarshal = NULL;
HRESULT hres; HRESULT hres;
_ICOM_THIS_From_IFTMarshal (FTMarshalImpl, iface); FTMarshalImpl *This = impl_from_IMarshal(iface);
FIXME ("(), stub!\n"); FIXME ("(), stub!\n");
......
...@@ -61,6 +61,11 @@ typedef struct ItemMonikerImpl{ ...@@ -61,6 +61,11 @@ typedef struct ItemMonikerImpl{
IUnknown *pMarshal; /* custom marshaler */ IUnknown *pMarshal; /* custom marshaler */
} ItemMonikerImpl; } ItemMonikerImpl;
static inline IMoniker *impl_from_IROTData( IROTData *iface )
{
return (IMoniker *)((char*)iface - FIELD_OFFSET(ItemMonikerImpl, lpvtbl2));
}
/********************************************************************************/ /********************************************************************************/
/* ItemMoniker prototype functions : */ /* ItemMoniker prototype functions : */
...@@ -929,7 +934,7 @@ HRESULT WINAPI ItemMonikerImpl_IsSystemMoniker(IMoniker* iface,DWORD* pwdMksys) ...@@ -929,7 +934,7 @@ HRESULT WINAPI ItemMonikerImpl_IsSystemMoniker(IMoniker* iface,DWORD* pwdMksys)
HRESULT WINAPI ItemMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid,VOID** ppvObject) HRESULT WINAPI ItemMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid,VOID** ppvObject)
{ {
ICOM_THIS_From_IROTData(IMoniker, iface); IMoniker *This = impl_from_IROTData(iface);
TRACE("(%p,%p,%p)\n",iface,riid,ppvObject); TRACE("(%p,%p,%p)\n",iface,riid,ppvObject);
...@@ -941,7 +946,7 @@ HRESULT WINAPI ItemMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid ...@@ -941,7 +946,7 @@ HRESULT WINAPI ItemMonikerROTDataImpl_QueryInterface(IROTData *iface,REFIID riid
*/ */
ULONG WINAPI ItemMonikerROTDataImpl_AddRef(IROTData *iface) ULONG WINAPI ItemMonikerROTDataImpl_AddRef(IROTData *iface)
{ {
ICOM_THIS_From_IROTData(IMoniker, iface); IMoniker *This = impl_from_IROTData(iface);
TRACE("(%p)\n",iface); TRACE("(%p)\n",iface);
...@@ -953,7 +958,7 @@ ULONG WINAPI ItemMonikerROTDataImpl_AddRef(IROTData *iface) ...@@ -953,7 +958,7 @@ ULONG WINAPI ItemMonikerROTDataImpl_AddRef(IROTData *iface)
*/ */
ULONG WINAPI ItemMonikerROTDataImpl_Release(IROTData* iface) ULONG WINAPI ItemMonikerROTDataImpl_Release(IROTData* iface)
{ {
ICOM_THIS_From_IROTData(IMoniker, iface); IMoniker *This = impl_from_IROTData(iface);
TRACE("(%p)\n",iface); TRACE("(%p)\n",iface);
...@@ -968,7 +973,7 @@ HRESULT WINAPI ItemMonikerROTDataImpl_GetComparisonData(IROTData* iface, ...@@ -968,7 +973,7 @@ HRESULT WINAPI ItemMonikerROTDataImpl_GetComparisonData(IROTData* iface,
ULONG cbMax, ULONG cbMax,
ULONG* pcbData) ULONG* pcbData)
{ {
ICOM_THIS_From_IROTData(IMoniker, iface); IMoniker *This = impl_from_IROTData(iface);
ItemMonikerImpl *This1 = (ItemMonikerImpl *)This; ItemMonikerImpl *This1 = (ItemMonikerImpl *)This;
int len = (strlenW(This1->itemName)+1); int len = (strlenW(This1->itemName)+1);
int i; int i;
......
...@@ -981,8 +981,6 @@ static HRESULT WINAPI EnumMonikerImpl_CreateEnumROTMoniker(MInterfacePointer **m ...@@ -981,8 +981,6 @@ static HRESULT WINAPI EnumMonikerImpl_CreateEnumROTMoniker(MInterfacePointer **m
/* Shared implementation of moniker marshaler based on saving and loading of /* Shared implementation of moniker marshaler based on saving and loading of
* monikers */ * monikers */
#define ICOM_THIS_From_IMoniker(class, name) class* This = (class*)(((char*)name)-FIELD_OFFSET(class, lpVtblMarshal))
typedef struct MonikerMarshal typedef struct MonikerMarshal
{ {
const IUnknownVtbl *lpVtbl; const IUnknownVtbl *lpVtbl;
...@@ -992,6 +990,11 @@ typedef struct MonikerMarshal ...@@ -992,6 +990,11 @@ typedef struct MonikerMarshal
IMoniker *moniker; IMoniker *moniker;
} MonikerMarshal; } MonikerMarshal;
static inline MonikerMarshal *impl_from_IMarshal( IMarshal *iface )
{
return (MonikerMarshal *)((char*)iface - FIELD_OFFSET(MonikerMarshal, lpVtblMarshal));
}
static HRESULT WINAPI MonikerMarshalInner_QueryInterface(IUnknown *iface, REFIID riid, LPVOID *ppv) static HRESULT WINAPI MonikerMarshalInner_QueryInterface(IUnknown *iface, REFIID riid, LPVOID *ppv)
{ {
MonikerMarshal *This = (MonikerMarshal *)iface; MonikerMarshal *This = (MonikerMarshal *)iface;
...@@ -1031,19 +1034,19 @@ static const IUnknownVtbl VT_MonikerMarshalInner = ...@@ -1031,19 +1034,19 @@ static const IUnknownVtbl VT_MonikerMarshalInner =
static HRESULT WINAPI MonikerMarshal_QueryInterface(IMarshal *iface, REFIID riid, LPVOID *ppv) static HRESULT WINAPI MonikerMarshal_QueryInterface(IMarshal *iface, REFIID riid, LPVOID *ppv)
{ {
ICOM_THIS_From_IMoniker(MonikerMarshal, iface); MonikerMarshal *This = impl_from_IMarshal(iface);
return IMoniker_QueryInterface(This->moniker, riid, ppv); return IMoniker_QueryInterface(This->moniker, riid, ppv);
} }
static ULONG WINAPI MonikerMarshal_AddRef(IMarshal *iface) static ULONG WINAPI MonikerMarshal_AddRef(IMarshal *iface)
{ {
ICOM_THIS_From_IMoniker(MonikerMarshal, iface); MonikerMarshal *This = impl_from_IMarshal(iface);
return IMoniker_AddRef(This->moniker); return IMoniker_AddRef(This->moniker);
} }
static ULONG WINAPI MonikerMarshal_Release(IMarshal *iface) static ULONG WINAPI MonikerMarshal_Release(IMarshal *iface)
{ {
ICOM_THIS_From_IMoniker(MonikerMarshal, iface); MonikerMarshal *This = impl_from_IMarshal(iface);
return IMoniker_Release(This->moniker); return IMoniker_Release(This->moniker);
} }
...@@ -1051,7 +1054,7 @@ static HRESULT WINAPI MonikerMarshal_GetUnmarshalClass( ...@@ -1051,7 +1054,7 @@ static HRESULT WINAPI MonikerMarshal_GetUnmarshalClass(
LPMARSHAL iface, REFIID riid, void* pv, DWORD dwDestContext, LPMARSHAL iface, REFIID riid, void* pv, DWORD dwDestContext,
void* pvDestContext, DWORD mshlflags, CLSID* pCid) void* pvDestContext, DWORD mshlflags, CLSID* pCid)
{ {
ICOM_THIS_From_IMoniker(MonikerMarshal, iface); MonikerMarshal *This = impl_from_IMarshal(iface);
TRACE("(%s, %p, %lx, %p, %lx, %p)\n", debugstr_guid(riid), pv, TRACE("(%s, %p, %lx, %p, %lx, %p)\n", debugstr_guid(riid), pv,
dwDestContext, pvDestContext, mshlflags, pCid); dwDestContext, pvDestContext, mshlflags, pCid);
...@@ -1063,7 +1066,7 @@ static HRESULT WINAPI MonikerMarshal_GetMarshalSizeMax( ...@@ -1063,7 +1066,7 @@ static HRESULT WINAPI MonikerMarshal_GetMarshalSizeMax(
LPMARSHAL iface, REFIID riid, void* pv, DWORD dwDestContext, LPMARSHAL iface, REFIID riid, void* pv, DWORD dwDestContext,
void* pvDestContext, DWORD mshlflags, DWORD* pSize) void* pvDestContext, DWORD mshlflags, DWORD* pSize)
{ {
ICOM_THIS_From_IMoniker(MonikerMarshal, iface); MonikerMarshal *This = impl_from_IMarshal(iface);
HRESULT hr; HRESULT hr;
ULARGE_INTEGER size; ULARGE_INTEGER size;
...@@ -1080,7 +1083,7 @@ static HRESULT WINAPI MonikerMarshal_MarshalInterface(LPMARSHAL iface, IStream * ...@@ -1080,7 +1083,7 @@ static HRESULT WINAPI MonikerMarshal_MarshalInterface(LPMARSHAL iface, IStream *
REFIID riid, void* pv, DWORD dwDestContext, REFIID riid, void* pv, DWORD dwDestContext,
void* pvDestContext, DWORD mshlflags) void* pvDestContext, DWORD mshlflags)
{ {
ICOM_THIS_From_IMoniker(MonikerMarshal, iface); MonikerMarshal *This = impl_from_IMarshal(iface);
TRACE("(%p, %s, %p, %lx, %p, %lx)\n", pStm, debugstr_guid(riid), pv, TRACE("(%p, %s, %p, %lx, %p, %lx)\n", pStm, debugstr_guid(riid), pv,
dwDestContext, pvDestContext, mshlflags); dwDestContext, pvDestContext, mshlflags);
...@@ -1090,7 +1093,7 @@ static HRESULT WINAPI MonikerMarshal_MarshalInterface(LPMARSHAL iface, IStream * ...@@ -1090,7 +1093,7 @@ static HRESULT WINAPI MonikerMarshal_MarshalInterface(LPMARSHAL iface, IStream *
static HRESULT WINAPI MonikerMarshal_UnmarshalInterface(LPMARSHAL iface, IStream *pStm, REFIID riid, void **ppv) static HRESULT WINAPI MonikerMarshal_UnmarshalInterface(LPMARSHAL iface, IStream *pStm, REFIID riid, void **ppv)
{ {
ICOM_THIS_From_IMoniker(MonikerMarshal, iface); MonikerMarshal *This = impl_from_IMarshal(iface);
HRESULT hr; HRESULT hr;
TRACE("(%p, %s, %p)\n", pStm, debugstr_guid(riid), ppv); TRACE("(%p, %s, %p)\n", pStm, debugstr_guid(riid), ppv);
......
#ifndef __WINE_MONIKER_H__ #ifndef __WINE_MONIKER_H__
#define __WINE_MONIKER_H__ #define __WINE_MONIKER_H__
#define ICOM_THIS_From_IROTData(class, name) class* This = (class*)(((char*)name)-sizeof(void*))
extern const CLSID CLSID_FileMoniker; extern const CLSID CLSID_FileMoniker;
extern const CLSID CLSID_ItemMoniker; extern const CLSID CLSID_ItemMoniker;
extern const CLSID CLSID_AntiMoniker; extern const CLSID CLSID_AntiMoniker;
......
...@@ -63,9 +63,10 @@ ...@@ -63,9 +63,10 @@
WINE_DEFAULT_DEBUG_CHANNEL(storage); WINE_DEFAULT_DEBUG_CHANNEL(storage);
#define _IPropertySetStorage_Offset ((int)(&(((StorageImpl*)0)->base.pssVtbl))) static inline StorageImpl *impl_from_IPropertySetStorage( IPropertySetStorage *iface )
#define _ICOM_THIS_From_IPropertySetStorage(class, name) \ {
class* This = (class*)(((char*)name)-_IPropertySetStorage_Offset) return (StorageImpl *)((char*)iface - FIELD_OFFSET(StorageImpl, base.pssVtbl));
}
/* These are documented in MSDN, e.g. /* These are documented in MSDN, e.g.
* http://msdn.microsoft.com/library/en-us/stg/stg/property_set_header.asp * http://msdn.microsoft.com/library/en-us/stg/stg/property_set_header.asp
...@@ -2039,7 +2040,7 @@ static HRESULT WINAPI IPropertySetStorage_fnQueryInterface( ...@@ -2039,7 +2040,7 @@ static HRESULT WINAPI IPropertySetStorage_fnQueryInterface(
REFIID riid, REFIID riid,
void** ppvObject) void** ppvObject)
{ {
_ICOM_THIS_From_IPropertySetStorage(StorageImpl, ppstg); StorageImpl *This = impl_from_IPropertySetStorage(ppstg);
return IStorage_QueryInterface( (IStorage*)This, riid, ppvObject ); return IStorage_QueryInterface( (IStorage*)This, riid, ppvObject );
} }
...@@ -2051,7 +2052,7 @@ static HRESULT WINAPI IPropertySetStorage_fnQueryInterface( ...@@ -2051,7 +2052,7 @@ static HRESULT WINAPI IPropertySetStorage_fnQueryInterface(
static ULONG WINAPI IPropertySetStorage_fnAddRef( static ULONG WINAPI IPropertySetStorage_fnAddRef(
IPropertySetStorage *ppstg) IPropertySetStorage *ppstg)
{ {
_ICOM_THIS_From_IPropertySetStorage(StorageImpl, ppstg); StorageImpl *This = impl_from_IPropertySetStorage(ppstg);
return IStorage_AddRef( (IStorage*)This ); return IStorage_AddRef( (IStorage*)This );
} }
...@@ -2063,7 +2064,7 @@ static ULONG WINAPI IPropertySetStorage_fnAddRef( ...@@ -2063,7 +2064,7 @@ static ULONG WINAPI IPropertySetStorage_fnAddRef(
static ULONG WINAPI IPropertySetStorage_fnRelease( static ULONG WINAPI IPropertySetStorage_fnRelease(
IPropertySetStorage *ppstg) IPropertySetStorage *ppstg)
{ {
_ICOM_THIS_From_IPropertySetStorage(StorageImpl, ppstg); StorageImpl *This = impl_from_IPropertySetStorage(ppstg);
return IStorage_Release( (IStorage*)This ); return IStorage_Release( (IStorage*)This );
} }
...@@ -2078,7 +2079,7 @@ static HRESULT WINAPI IPropertySetStorage_fnCreate( ...@@ -2078,7 +2079,7 @@ static HRESULT WINAPI IPropertySetStorage_fnCreate(
DWORD grfMode, DWORD grfMode,
IPropertyStorage** ppprstg) IPropertyStorage** ppprstg)
{ {
_ICOM_THIS_From_IPropertySetStorage(StorageImpl, ppstg); StorageImpl *This = impl_from_IPropertySetStorage(ppstg);
WCHAR name[CCH_MAX_PROPSTG_NAME]; WCHAR name[CCH_MAX_PROPSTG_NAME];
IStream *stm = NULL; IStream *stm = NULL;
HRESULT r; HRESULT r;
...@@ -2133,7 +2134,7 @@ static HRESULT WINAPI IPropertySetStorage_fnOpen( ...@@ -2133,7 +2134,7 @@ static HRESULT WINAPI IPropertySetStorage_fnOpen(
DWORD grfMode, DWORD grfMode,
IPropertyStorage** ppprstg) IPropertyStorage** ppprstg)
{ {
_ICOM_THIS_From_IPropertySetStorage(StorageImpl, ppstg); StorageImpl *This = impl_from_IPropertySetStorage(ppstg);
IStream *stm = NULL; IStream *stm = NULL;
WCHAR name[CCH_MAX_PROPSTG_NAME]; WCHAR name[CCH_MAX_PROPSTG_NAME];
HRESULT r; HRESULT r;
...@@ -2176,7 +2177,7 @@ static HRESULT WINAPI IPropertySetStorage_fnDelete( ...@@ -2176,7 +2177,7 @@ static HRESULT WINAPI IPropertySetStorage_fnDelete(
IPropertySetStorage *ppstg, IPropertySetStorage *ppstg,
REFFMTID rfmtid) REFFMTID rfmtid)
{ {
_ICOM_THIS_From_IPropertySetStorage(StorageImpl, ppstg); StorageImpl *This = impl_from_IPropertySetStorage(ppstg);
IStorage *stg = NULL; IStorage *stg = NULL;
WCHAR name[CCH_MAX_PROPSTG_NAME]; WCHAR name[CCH_MAX_PROPSTG_NAME];
HRESULT r; HRESULT r;
...@@ -2201,7 +2202,7 @@ static HRESULT WINAPI IPropertySetStorage_fnEnum( ...@@ -2201,7 +2202,7 @@ static HRESULT WINAPI IPropertySetStorage_fnEnum(
IPropertySetStorage *ppstg, IPropertySetStorage *ppstg,
IEnumSTATPROPSETSTG** ppenum) IEnumSTATPROPSETSTG** ppenum)
{ {
_ICOM_THIS_From_IPropertySetStorage(StorageImpl, ppstg); StorageImpl *This = impl_from_IPropertySetStorage(ppstg);
FIXME("%p\n", This); FIXME("%p\n", This);
return E_NOTIMPL; return E_NOTIMPL;
} }
......
...@@ -79,8 +79,11 @@ typedef struct ...@@ -79,8 +79,11 @@ typedef struct
static const IAutoCompleteVtbl acvt; static const IAutoCompleteVtbl acvt;
static const IAutoComplete2Vtbl ac2vt; static const IAutoComplete2Vtbl ac2vt;
#define _IAutoComplete2_Offset ((int)(&(((IAutoCompleteImpl*)0)->lpvtblAutoComplete2))) static inline IAutoCompleteImpl *impl_from_IAutoComplete2( IAutoComplete2 *iface )
#define _ICOM_THIS_From_IAutoComplete2(class, name) class* This = (class*)(((char*)name)-_IAutoComplete2_Offset); {
return (IAutoCompleteImpl *)((char*)iface - FIELD_OFFSET(IAutoCompleteImpl, lpvtblAutoComplete2));
}
/* /*
converts This to an interface pointer converts This to an interface pointer
...@@ -329,7 +332,7 @@ static HRESULT WINAPI IAutoComplete2_fnQueryInterface( ...@@ -329,7 +332,7 @@ static HRESULT WINAPI IAutoComplete2_fnQueryInterface(
REFIID riid, REFIID riid,
LPVOID *ppvObj) LPVOID *ppvObj)
{ {
_ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl, iface); IAutoCompleteImpl *This = impl_from_IAutoComplete2(iface);
TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj);
...@@ -342,7 +345,7 @@ static HRESULT WINAPI IAutoComplete2_fnQueryInterface( ...@@ -342,7 +345,7 @@ static HRESULT WINAPI IAutoComplete2_fnQueryInterface(
static ULONG WINAPI IAutoComplete2_fnAddRef( static ULONG WINAPI IAutoComplete2_fnAddRef(
IAutoComplete2 * iface) IAutoComplete2 * iface)
{ {
_ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl,iface); IAutoCompleteImpl *This = impl_from_IAutoComplete2(iface);
TRACE ("(%p)->(count=%lu)\n", This, This->ref); TRACE ("(%p)->(count=%lu)\n", This, This->ref);
...@@ -355,7 +358,7 @@ static ULONG WINAPI IAutoComplete2_fnAddRef( ...@@ -355,7 +358,7 @@ static ULONG WINAPI IAutoComplete2_fnAddRef(
static ULONG WINAPI IAutoComplete2_fnRelease( static ULONG WINAPI IAutoComplete2_fnRelease(
IAutoComplete2 * iface) IAutoComplete2 * iface)
{ {
_ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl,iface); IAutoCompleteImpl *This = impl_from_IAutoComplete2(iface);
TRACE ("(%p)->(count=%lu)\n", This, This->ref); TRACE ("(%p)->(count=%lu)\n", This, This->ref);
...@@ -369,7 +372,7 @@ static HRESULT WINAPI IAutoComplete2_fnEnable( ...@@ -369,7 +372,7 @@ static HRESULT WINAPI IAutoComplete2_fnEnable(
IAutoComplete2 * iface, IAutoComplete2 * iface,
BOOL fEnable) BOOL fEnable)
{ {
_ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl, iface); IAutoCompleteImpl *This = impl_from_IAutoComplete2(iface);
TRACE ("(%p)->(%s)\n", This, (fEnable)?"true":"false"); TRACE ("(%p)->(%s)\n", This, (fEnable)?"true":"false");
...@@ -386,7 +389,7 @@ static HRESULT WINAPI IAutoComplete2_fnInit( ...@@ -386,7 +389,7 @@ static HRESULT WINAPI IAutoComplete2_fnInit(
LPCOLESTR pwzsRegKeyPath, LPCOLESTR pwzsRegKeyPath,
LPCOLESTR pwszQuickComplete) LPCOLESTR pwszQuickComplete)
{ {
_ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl, iface); IAutoCompleteImpl *This = impl_from_IAutoComplete2(iface);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
...@@ -402,7 +405,7 @@ static HRESULT WINAPI IAutoComplete2_fnGetOptions( ...@@ -402,7 +405,7 @@ static HRESULT WINAPI IAutoComplete2_fnGetOptions(
{ {
HRESULT hr = S_OK; HRESULT hr = S_OK;
_ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl, iface); IAutoCompleteImpl *This = impl_from_IAutoComplete2(iface);
TRACE("(%p) -> (%p)\n", This, pdwFlag); TRACE("(%p) -> (%p)\n", This, pdwFlag);
...@@ -420,7 +423,7 @@ static HRESULT WINAPI IAutoComplete2_fnSetOptions( ...@@ -420,7 +423,7 @@ static HRESULT WINAPI IAutoComplete2_fnSetOptions(
{ {
HRESULT hr = S_OK; HRESULT hr = S_OK;
_ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl, iface); IAutoCompleteImpl *This = impl_from_IAutoComplete2(iface);
TRACE("(%p) -> (0x%lx)\n", This, dwFlag); TRACE("(%p) -> (0x%lx)\n", This, dwFlag);
......
...@@ -76,14 +76,20 @@ static const IPersistFolder2Vtbl vt_PersistFolder2; ...@@ -76,14 +76,20 @@ static const IPersistFolder2Vtbl vt_PersistFolder2;
static const IShellExecuteHookWVtbl vt_ShellExecuteHookW; static const IShellExecuteHookWVtbl vt_ShellExecuteHookW;
static const IShellExecuteHookAVtbl vt_ShellExecuteHookA; static const IShellExecuteHookAVtbl vt_ShellExecuteHookA;
#define _IPersistFolder2_Offset ((int)(&(((ICPanelImpl*)0)->lpVtblPersistFolder2))) static inline ICPanelImpl *impl_from_IPersistFolder2( IPersistFolder2 *iface )
#define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset); {
return (ICPanelImpl *)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblPersistFolder2));
}
#define IShellExecuteHookW_Offset ((int)(&(((ICPanelImpl*)0)->lpVtblShellExecuteHookW))) static inline ICPanelImpl *impl_from_IShellExecuteHookW( IShellExecuteHookW *iface )
#define _ICOM_THIS_From_IShellExecuteHookW(class, name) class* This = (class*)(((char*)name)-IShellExecuteHookW_Offset); {
return (ICPanelImpl *)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblShellExecuteHookW));
}
#define IShellExecuteHookA_Offset ((int)(&(((ICPanelImpl*)0)->lpVtblShellExecuteHookA))) static inline ICPanelImpl *impl_from_IShellExecuteHookA( IShellExecuteHookA *iface )
#define _ICOM_THIS_From_IShellExecuteHookA(class, name) class* This = (class*)(((char*)name)-IShellExecuteHookA_Offset); {
return (ICPanelImpl *)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblShellExecuteHookA));
}
/* /*
...@@ -824,7 +830,7 @@ static const IShellFolder2Vtbl vt_ShellFolder2 = ...@@ -824,7 +830,7 @@ static const IShellFolder2Vtbl vt_ShellFolder2 =
*/ */
static HRESULT WINAPI ICPanel_PersistFolder2_QueryInterface(IPersistFolder2 * iface, REFIID iid, LPVOID * ppvObject) static HRESULT WINAPI ICPanel_PersistFolder2_QueryInterface(IPersistFolder2 * iface, REFIID iid, LPVOID * ppvObject)
{ {
_ICOM_THIS_From_IPersistFolder2(ICPanelImpl, iface); ICPanelImpl *This = impl_from_IPersistFolder2(iface);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
...@@ -836,7 +842,7 @@ static HRESULT WINAPI ICPanel_PersistFolder2_QueryInterface(IPersistFolder2 * if ...@@ -836,7 +842,7 @@ static HRESULT WINAPI ICPanel_PersistFolder2_QueryInterface(IPersistFolder2 * if
*/ */
static ULONG WINAPI ICPanel_PersistFolder2_AddRef(IPersistFolder2 * iface) static ULONG WINAPI ICPanel_PersistFolder2_AddRef(IPersistFolder2 * iface)
{ {
_ICOM_THIS_From_IPersistFolder2(ICPanelImpl, iface); ICPanelImpl *This = impl_from_IPersistFolder2(iface);
TRACE("(%p)->(count=%lu)\n", This, This->ref); TRACE("(%p)->(count=%lu)\n", This, This->ref);
...@@ -848,7 +854,7 @@ static ULONG WINAPI ICPanel_PersistFolder2_AddRef(IPersistFolder2 * iface) ...@@ -848,7 +854,7 @@ static ULONG WINAPI ICPanel_PersistFolder2_AddRef(IPersistFolder2 * iface)
*/ */
static ULONG WINAPI ICPanel_PersistFolder2_Release(IPersistFolder2 * iface) static ULONG WINAPI ICPanel_PersistFolder2_Release(IPersistFolder2 * iface)
{ {
_ICOM_THIS_From_IPersistFolder2(ICPanelImpl, iface); ICPanelImpl *This = impl_from_IPersistFolder2(iface);
TRACE("(%p)->(count=%lu)\n", This, This->ref); TRACE("(%p)->(count=%lu)\n", This, This->ref);
...@@ -860,7 +866,7 @@ static ULONG WINAPI ICPanel_PersistFolder2_Release(IPersistFolder2 * iface) ...@@ -860,7 +866,7 @@ static ULONG WINAPI ICPanel_PersistFolder2_Release(IPersistFolder2 * iface)
*/ */
static HRESULT WINAPI ICPanel_PersistFolder2_GetClassID(IPersistFolder2 * iface, CLSID * lpClassId) static HRESULT WINAPI ICPanel_PersistFolder2_GetClassID(IPersistFolder2 * iface, CLSID * lpClassId)
{ {
_ICOM_THIS_From_IPersistFolder2(ICPanelImpl, iface); ICPanelImpl *This = impl_from_IPersistFolder2(iface);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
...@@ -878,7 +884,7 @@ static HRESULT WINAPI ICPanel_PersistFolder2_GetClassID(IPersistFolder2 * iface, ...@@ -878,7 +884,7 @@ static HRESULT WINAPI ICPanel_PersistFolder2_GetClassID(IPersistFolder2 * iface,
*/ */
static HRESULT WINAPI ICPanel_PersistFolder2_Initialize(IPersistFolder2 * iface, LPCITEMIDLIST pidl) static HRESULT WINAPI ICPanel_PersistFolder2_Initialize(IPersistFolder2 * iface, LPCITEMIDLIST pidl)
{ {
_ICOM_THIS_From_IPersistFolder2(ICPanelImpl, iface); ICPanelImpl *This = impl_from_IPersistFolder2(iface);
TRACE("(%p)->(%p)\n", This, pidl); TRACE("(%p)->(%p)\n", This, pidl);
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -888,7 +894,7 @@ static HRESULT WINAPI ICPanel_PersistFolder2_Initialize(IPersistFolder2 * iface, ...@@ -888,7 +894,7 @@ static HRESULT WINAPI ICPanel_PersistFolder2_Initialize(IPersistFolder2 * iface,
*/ */
static HRESULT WINAPI ICPanel_PersistFolder2_GetCurFolder(IPersistFolder2 * iface, LPITEMIDLIST * pidl) static HRESULT WINAPI ICPanel_PersistFolder2_GetCurFolder(IPersistFolder2 * iface, LPITEMIDLIST * pidl)
{ {
_ICOM_THIS_From_IPersistFolder2(ICPanelImpl, iface); ICPanelImpl *This = impl_from_IPersistFolder2(iface);
TRACE("(%p)->(%p)\n", This, pidl); TRACE("(%p)->(%p)\n", This, pidl);
...@@ -931,7 +937,7 @@ HRESULT CPanel_GetIconLocationW(LPITEMIDLIST pidl, ...@@ -931,7 +937,7 @@ HRESULT CPanel_GetIconLocationW(LPITEMIDLIST pidl,
static HRESULT WINAPI IShellExecuteHookW_fnQueryInterface( static HRESULT WINAPI IShellExecuteHookW_fnQueryInterface(
IShellExecuteHookW* iface, REFIID riid, void** ppvObject) IShellExecuteHookW* iface, REFIID riid, void** ppvObject)
{ {
_ICOM_THIS_From_IShellExecuteHookW(ICPanelImpl, iface); ICPanelImpl *This = impl_from_IShellExecuteHookW(iface);
TRACE("(%p)->(count=%lu)\n", This, This->ref); TRACE("(%p)->(count=%lu)\n", This, This->ref);
...@@ -940,7 +946,7 @@ static HRESULT WINAPI IShellExecuteHookW_fnQueryInterface( ...@@ -940,7 +946,7 @@ static HRESULT WINAPI IShellExecuteHookW_fnQueryInterface(
static ULONG STDMETHODCALLTYPE IShellExecuteHookW_fnAddRef(IShellExecuteHookW* iface) static ULONG STDMETHODCALLTYPE IShellExecuteHookW_fnAddRef(IShellExecuteHookW* iface)
{ {
_ICOM_THIS_From_IShellExecuteHookW(ICPanelImpl, iface); ICPanelImpl *This = impl_from_IShellExecuteHookW(iface);
TRACE("(%p)->(count=%lu)\n", This, This->ref); TRACE("(%p)->(count=%lu)\n", This, This->ref);
...@@ -949,7 +955,7 @@ static ULONG STDMETHODCALLTYPE IShellExecuteHookW_fnAddRef(IShellExecuteHookW* i ...@@ -949,7 +955,7 @@ static ULONG STDMETHODCALLTYPE IShellExecuteHookW_fnAddRef(IShellExecuteHookW* i
static ULONG STDMETHODCALLTYPE IShellExecuteHookW_fnRelease(IShellExecuteHookW* iface) static ULONG STDMETHODCALLTYPE IShellExecuteHookW_fnRelease(IShellExecuteHookW* iface)
{ {
_ICOM_THIS_From_IShellExecuteHookW(ICPanelImpl, iface); ICPanelImpl *This = impl_from_IShellExecuteHookW(iface);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
...@@ -1017,7 +1023,7 @@ static const IShellExecuteHookWVtbl vt_ShellExecuteHookW = ...@@ -1017,7 +1023,7 @@ static const IShellExecuteHookWVtbl vt_ShellExecuteHookW =
static HRESULT WINAPI IShellExecuteHookA_fnQueryInterface(IShellExecuteHookA* iface, REFIID riid, void** ppvObject) static HRESULT WINAPI IShellExecuteHookA_fnQueryInterface(IShellExecuteHookA* iface, REFIID riid, void** ppvObject)
{ {
_ICOM_THIS_From_IShellExecuteHookA(ICPanelImpl, iface); ICPanelImpl *This = impl_from_IShellExecuteHookA(iface);
TRACE("(%p)->(count=%lu)\n", This, This->ref); TRACE("(%p)->(count=%lu)\n", This, This->ref);
...@@ -1026,7 +1032,7 @@ static HRESULT WINAPI IShellExecuteHookA_fnQueryInterface(IShellExecuteHookA* if ...@@ -1026,7 +1032,7 @@ static HRESULT WINAPI IShellExecuteHookA_fnQueryInterface(IShellExecuteHookA* if
static ULONG STDMETHODCALLTYPE IShellExecuteHookA_fnAddRef(IShellExecuteHookA* iface) static ULONG STDMETHODCALLTYPE IShellExecuteHookA_fnAddRef(IShellExecuteHookA* iface)
{ {
_ICOM_THIS_From_IShellExecuteHookA(ICPanelImpl, iface); ICPanelImpl *This = impl_from_IShellExecuteHookA(iface);
TRACE("(%p)->(count=%lu)\n", This, This->ref); TRACE("(%p)->(count=%lu)\n", This, This->ref);
...@@ -1035,7 +1041,7 @@ static ULONG STDMETHODCALLTYPE IShellExecuteHookA_fnAddRef(IShellExecuteHookA* i ...@@ -1035,7 +1041,7 @@ static ULONG STDMETHODCALLTYPE IShellExecuteHookA_fnAddRef(IShellExecuteHookA* i
static ULONG STDMETHODCALLTYPE IShellExecuteHookA_fnRelease(IShellExecuteHookA* iface) static ULONG STDMETHODCALLTYPE IShellExecuteHookA_fnRelease(IShellExecuteHookA* iface)
{ {
_ICOM_THIS_From_IShellExecuteHookA(ICPanelImpl, iface); ICPanelImpl *This = impl_from_IShellExecuteHookA(iface);
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
......
...@@ -60,11 +60,16 @@ static const IExtractIconAVtbl eiavt; ...@@ -60,11 +60,16 @@ static const IExtractIconAVtbl eiavt;
static const IExtractIconWVtbl eivt; static const IExtractIconWVtbl eivt;
static const IPersistFileVtbl pfvt; static const IPersistFileVtbl pfvt;
#define _IPersistFile_Offset ((int)(&(((IExtractIconWImpl*)0)->lpvtblPersistFile))) static inline IExtractIconW *impl_from_IPersistFile( IPersistFile *iface )
#define _ICOM_THIS_From_IPersistFile(class, name) class* This = (class*)(((char*)name)-_IPersistFile_Offset); {
return (IExtractIconW *)((char*)iface - FIELD_OFFSET(IExtractIconWImpl, lpvtblPersistFile));
}
static inline IExtractIconW *impl_from_IExtractIconA( IExtractIconA *iface )
{
return (IExtractIconW *)((char*)iface - FIELD_OFFSET(IExtractIconWImpl, lpvtblExtractIconA));
}
#define _IExtractIconA_Offset ((int)(&(((IExtractIconWImpl*)0)->lpvtblExtractIconA)))
#define _ICOM_THIS_From_IExtractIconA(class, name) class* This = (class*)(((char*)name)-_IExtractIconA_Offset);
/************************************************************************** /**************************************************************************
* IExtractIconW_Constructor * IExtractIconW_Constructor
...@@ -422,7 +427,7 @@ IExtractIconA* IExtractIconA_Constructor(LPCITEMIDLIST pidl) ...@@ -422,7 +427,7 @@ IExtractIconA* IExtractIconA_Constructor(LPCITEMIDLIST pidl)
*/ */
static HRESULT WINAPI IExtractIconA_fnQueryInterface(IExtractIconA * iface, REFIID riid, LPVOID *ppvObj) static HRESULT WINAPI IExtractIconA_fnQueryInterface(IExtractIconA * iface, REFIID riid, LPVOID *ppvObj)
{ {
_ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); IExtractIconW *This = impl_from_IExtractIconA(iface);
return IExtractIconW_QueryInterface(This, riid, ppvObj); return IExtractIconW_QueryInterface(This, riid, ppvObj);
} }
...@@ -432,7 +437,7 @@ static HRESULT WINAPI IExtractIconA_fnQueryInterface(IExtractIconA * iface, REFI ...@@ -432,7 +437,7 @@ static HRESULT WINAPI IExtractIconA_fnQueryInterface(IExtractIconA * iface, REFI
*/ */
static ULONG WINAPI IExtractIconA_fnAddRef(IExtractIconA * iface) static ULONG WINAPI IExtractIconA_fnAddRef(IExtractIconA * iface)
{ {
_ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); IExtractIconW *This = impl_from_IExtractIconA(iface);
return IExtractIconW_AddRef(This); return IExtractIconW_AddRef(This);
} }
...@@ -441,7 +446,7 @@ static ULONG WINAPI IExtractIconA_fnAddRef(IExtractIconA * iface) ...@@ -441,7 +446,7 @@ static ULONG WINAPI IExtractIconA_fnAddRef(IExtractIconA * iface)
*/ */
static ULONG WINAPI IExtractIconA_fnRelease(IExtractIconA * iface) static ULONG WINAPI IExtractIconA_fnRelease(IExtractIconA * iface)
{ {
_ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); IExtractIconW *This = impl_from_IExtractIconA(iface);
return IExtractIconW_AddRef(This); return IExtractIconW_AddRef(This);
} }
...@@ -460,7 +465,7 @@ static HRESULT WINAPI IExtractIconA_fnGetIconLocation( ...@@ -460,7 +465,7 @@ static HRESULT WINAPI IExtractIconA_fnGetIconLocation(
{ {
HRESULT ret; HRESULT ret;
LPWSTR lpwstrFile = HeapAlloc(GetProcessHeap(), 0, cchMax * sizeof(WCHAR)); LPWSTR lpwstrFile = HeapAlloc(GetProcessHeap(), 0, cchMax * sizeof(WCHAR));
_ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); IExtractIconW *This = impl_from_IExtractIconA(iface);
TRACE("(%p) (flags=%u %p %u %p %p)\n", This, uFlags, szIconFile, cchMax, piIndex, pwFlags); TRACE("(%p) (flags=%u %p %u %p %p)\n", This, uFlags, szIconFile, cchMax, piIndex, pwFlags);
...@@ -479,7 +484,7 @@ static HRESULT WINAPI IExtractIconA_fnExtract(IExtractIconA * iface, LPCSTR pszF ...@@ -479,7 +484,7 @@ static HRESULT WINAPI IExtractIconA_fnExtract(IExtractIconA * iface, LPCSTR pszF
HRESULT ret; HRESULT ret;
INT len = MultiByteToWideChar(CP_ACP, 0, pszFile, -1, NULL, 0); INT len = MultiByteToWideChar(CP_ACP, 0, pszFile, -1, NULL, 0);
LPWSTR lpwstrFile = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); LPWSTR lpwstrFile = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
_ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); IExtractIconW *This = impl_from_IExtractIconA(iface);
TRACE("(%p) (file=%p index=%u %p %p size=%u)\n", This, pszFile, nIconIndex, phiconLarge, phiconSmall, nIconSize); TRACE("(%p) (file=%p index=%u %p %p size=%u)\n", This, pszFile, nIconIndex, phiconLarge, phiconSmall, nIconSize);
...@@ -506,7 +511,7 @@ static HRESULT WINAPI IEIPersistFile_fnQueryInterface( ...@@ -506,7 +511,7 @@ static HRESULT WINAPI IEIPersistFile_fnQueryInterface(
REFIID iid, REFIID iid,
LPVOID *ppvObj) LPVOID *ppvObj)
{ {
_ICOM_THIS_From_IPersistFile(IExtractIconW, iface); IExtractIconW *This = impl_from_IPersistFile(iface);
return IExtractIconW_QueryInterface(This, iid, ppvObj); return IExtractIconW_QueryInterface(This, iid, ppvObj);
} }
...@@ -517,7 +522,7 @@ static HRESULT WINAPI IEIPersistFile_fnQueryInterface( ...@@ -517,7 +522,7 @@ static HRESULT WINAPI IEIPersistFile_fnQueryInterface(
static ULONG WINAPI IEIPersistFile_fnAddRef( static ULONG WINAPI IEIPersistFile_fnAddRef(
IPersistFile *iface) IPersistFile *iface)
{ {
_ICOM_THIS_From_IPersistFile(IExtractIconW, iface); IExtractIconW *This = impl_from_IPersistFile(iface);
return IExtractIconW_AddRef(This); return IExtractIconW_AddRef(This);
} }
...@@ -528,7 +533,7 @@ static ULONG WINAPI IEIPersistFile_fnAddRef( ...@@ -528,7 +533,7 @@ static ULONG WINAPI IEIPersistFile_fnAddRef(
static ULONG WINAPI IEIPersistFile_fnRelease( static ULONG WINAPI IEIPersistFile_fnRelease(
IPersistFile *iface) IPersistFile *iface)
{ {
_ICOM_THIS_From_IPersistFile(IExtractIconW, iface); IExtractIconW *This = impl_from_IPersistFile(iface);
return IExtractIconW_Release(This); return IExtractIconW_Release(This);
} }
...@@ -555,7 +560,7 @@ static HRESULT WINAPI IEIPersistFile_fnGetClassID( ...@@ -555,7 +560,7 @@ static HRESULT WINAPI IEIPersistFile_fnGetClassID(
*/ */
static HRESULT WINAPI IEIPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR pszFileName, DWORD dwMode) static HRESULT WINAPI IEIPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR pszFileName, DWORD dwMode)
{ {
_ICOM_THIS_From_IPersistFile(IExtractIconW, iface); IExtractIconW *This = impl_from_IPersistFile(iface);
FIXME("%p\n", This); FIXME("%p\n", This);
return E_NOTIMPL; return E_NOTIMPL;
......
...@@ -66,8 +66,11 @@ typedef struct { ...@@ -66,8 +66,11 @@ typedef struct {
static const IShellFolder2Vtbl vt_ShellFolder2; static const IShellFolder2Vtbl vt_ShellFolder2;
static const IPersistFolder2Vtbl vt_PersistFolder2; static const IPersistFolder2Vtbl vt_PersistFolder2;
#define _IPersistFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2))) static inline IGenericSFImpl *impl_from_IPersistFolder2( IPersistFolder2 *iface )
#define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset); {
return (IGenericSFImpl *)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpVtblPersistFolder2));
}
/* /*
converts This to an interface pointer converts This to an interface pointer
...@@ -855,7 +858,7 @@ static const IShellFolder2Vtbl vt_ShellFolder2 = ...@@ -855,7 +858,7 @@ static const IShellFolder2Vtbl vt_ShellFolder2 =
static HRESULT WINAPI IMCFldr_PersistFolder2_QueryInterface ( static HRESULT WINAPI IMCFldr_PersistFolder2_QueryInterface (
IPersistFolder2 * iface, REFIID iid, LPVOID * ppvObj) IPersistFolder2 * iface, REFIID iid, LPVOID * ppvObj)
{ {
_ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); IGenericSFImpl *This = impl_from_IPersistFolder2(iface);
TRACE ("(%p)\n", This); TRACE ("(%p)\n", This);
...@@ -867,7 +870,7 @@ static HRESULT WINAPI IMCFldr_PersistFolder2_QueryInterface ( ...@@ -867,7 +870,7 @@ static HRESULT WINAPI IMCFldr_PersistFolder2_QueryInterface (
*/ */
static ULONG WINAPI IMCFldr_PersistFolder2_AddRef (IPersistFolder2 * iface) static ULONG WINAPI IMCFldr_PersistFolder2_AddRef (IPersistFolder2 * iface)
{ {
_ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); IGenericSFImpl *This = impl_from_IPersistFolder2(iface);
TRACE ("(%p)->(count=%lu)\n", This, This->ref); TRACE ("(%p)->(count=%lu)\n", This, This->ref);
...@@ -879,7 +882,7 @@ static ULONG WINAPI IMCFldr_PersistFolder2_AddRef (IPersistFolder2 * iface) ...@@ -879,7 +882,7 @@ static ULONG WINAPI IMCFldr_PersistFolder2_AddRef (IPersistFolder2 * iface)
*/ */
static ULONG WINAPI IMCFldr_PersistFolder2_Release (IPersistFolder2 * iface) static ULONG WINAPI IMCFldr_PersistFolder2_Release (IPersistFolder2 * iface)
{ {
_ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); IGenericSFImpl *This = impl_from_IPersistFolder2(iface);
TRACE ("(%p)->(count=%lu)\n", This, This->ref); TRACE ("(%p)->(count=%lu)\n", This, This->ref);
...@@ -892,7 +895,7 @@ static ULONG WINAPI IMCFldr_PersistFolder2_Release (IPersistFolder2 * iface) ...@@ -892,7 +895,7 @@ static ULONG WINAPI IMCFldr_PersistFolder2_Release (IPersistFolder2 * iface)
static HRESULT WINAPI IMCFldr_PersistFolder2_GetClassID ( static HRESULT WINAPI IMCFldr_PersistFolder2_GetClassID (
IPersistFolder2 * iface, CLSID * lpClassId) IPersistFolder2 * iface, CLSID * lpClassId)
{ {
_ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); IGenericSFImpl *This = impl_from_IPersistFolder2(iface);
TRACE ("(%p)\n", This); TRACE ("(%p)\n", This);
...@@ -911,7 +914,7 @@ static HRESULT WINAPI IMCFldr_PersistFolder2_GetClassID ( ...@@ -911,7 +914,7 @@ static HRESULT WINAPI IMCFldr_PersistFolder2_GetClassID (
static HRESULT WINAPI IMCFldr_PersistFolder2_Initialize ( static HRESULT WINAPI IMCFldr_PersistFolder2_Initialize (
IPersistFolder2 * iface, LPCITEMIDLIST pidl) IPersistFolder2 * iface, LPCITEMIDLIST pidl)
{ {
_ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); IGenericSFImpl *This = impl_from_IPersistFolder2(iface);
TRACE ("(%p)->(%p)\n", This, pidl); TRACE ("(%p)->(%p)\n", This, pidl);
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -922,7 +925,7 @@ static HRESULT WINAPI IMCFldr_PersistFolder2_Initialize ( ...@@ -922,7 +925,7 @@ static HRESULT WINAPI IMCFldr_PersistFolder2_Initialize (
static HRESULT WINAPI IMCFldr_PersistFolder2_GetCurFolder ( static HRESULT WINAPI IMCFldr_PersistFolder2_GetCurFolder (
IPersistFolder2 * iface, LPITEMIDLIST * pidl) IPersistFolder2 * iface, LPITEMIDLIST * pidl)
{ {
_ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); IGenericSFImpl *This = impl_from_IPersistFolder2(iface);
TRACE ("(%p)->(%p)\n", This, pidl); TRACE ("(%p)->(%p)\n", This, pidl);
......
...@@ -104,20 +104,30 @@ typedef struct ...@@ -104,20 +104,30 @@ typedef struct
static const IShellViewVtbl svvt; static const IShellViewVtbl svvt;
static const IOleCommandTargetVtbl ctvt; static const IOleCommandTargetVtbl ctvt;
#define _IOleCommandTarget_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblOleCommandTarget)))
#define _ICOM_THIS_From_IOleCommandTarget(class, name) class* This = (class*)(((char*)name)-_IOleCommandTarget_Offset);
static const IDropTargetVtbl dtvt; static const IDropTargetVtbl dtvt;
#define _IDropTarget_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblDropTarget)))
#define _ICOM_THIS_From_IDropTarget(class, name) class* This = (class*)(((char*)name)-_IDropTarget_Offset);
static const IDropSourceVtbl dsvt; static const IDropSourceVtbl dsvt;
#define _IDropSource_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblDropSource)))
#define _ICOM_THIS_From_IDropSource(class, name) class* This = (class*)(((char*)name)-_IDropSource_Offset);
static const IViewObjectVtbl vovt; static const IViewObjectVtbl vovt;
#define _IViewObject_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblViewObject)))
#define _ICOM_THIS_From_IViewObject(class, name) class* This = (class*)(((char*)name)-_IViewObject_Offset);
static inline IShellViewImpl *impl_from_IOleCommandTarget( IOleCommandTarget *iface )
{
return (IShellViewImpl *)((char*)iface - FIELD_OFFSET(IShellViewImpl, lpvtblOleCommandTarget));
}
static inline IShellViewImpl *impl_from_IDropTarget( IDropTarget *iface )
{
return (IShellViewImpl *)((char*)iface - FIELD_OFFSET(IShellViewImpl, lpvtblDropTarget));
}
static inline IShellViewImpl *impl_from_IDropSource( IDropSource *iface )
{
return (IShellViewImpl *)((char*)iface - FIELD_OFFSET(IShellViewImpl, lpvtblDropSource));
}
static inline IShellViewImpl *impl_from_IViewObject( IViewObject *iface )
{
return (IShellViewImpl *)((char*)iface - FIELD_OFFSET(IShellViewImpl, lpvtblViewObject));
}
/* ListView Header ID's */ /* ListView Header ID's */
#define LISTVIEW_COLUMN_NAME 0 #define LISTVIEW_COLUMN_NAME 0
...@@ -2017,7 +2027,7 @@ static HRESULT WINAPI ISVOleCmdTarget_QueryInterface( ...@@ -2017,7 +2027,7 @@ static HRESULT WINAPI ISVOleCmdTarget_QueryInterface(
REFIID iid, REFIID iid,
LPVOID* ppvObj) LPVOID* ppvObj)
{ {
_ICOM_THIS_From_IOleCommandTarget(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IOleCommandTarget(iface);
return IShellFolder_QueryInterface((IShellFolder*)This, iid, ppvObj); return IShellFolder_QueryInterface((IShellFolder*)This, iid, ppvObj);
} }
...@@ -2028,7 +2038,7 @@ static HRESULT WINAPI ISVOleCmdTarget_QueryInterface( ...@@ -2028,7 +2038,7 @@ static HRESULT WINAPI ISVOleCmdTarget_QueryInterface(
static ULONG WINAPI ISVOleCmdTarget_AddRef( static ULONG WINAPI ISVOleCmdTarget_AddRef(
IOleCommandTarget * iface) IOleCommandTarget * iface)
{ {
_ICOM_THIS_From_IOleCommandTarget(IShellFolder, iface); IShellViewImpl *This = impl_from_IOleCommandTarget(iface);
return IShellFolder_AddRef((IShellFolder*)This); return IShellFolder_AddRef((IShellFolder*)This);
} }
...@@ -2039,7 +2049,7 @@ static ULONG WINAPI ISVOleCmdTarget_AddRef( ...@@ -2039,7 +2049,7 @@ static ULONG WINAPI ISVOleCmdTarget_AddRef(
static ULONG WINAPI ISVOleCmdTarget_Release( static ULONG WINAPI ISVOleCmdTarget_Release(
IOleCommandTarget * iface) IOleCommandTarget * iface)
{ {
_ICOM_THIS_From_IOleCommandTarget(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IOleCommandTarget(iface);
return IShellFolder_Release((IShellFolder*)This); return IShellFolder_Release((IShellFolder*)This);
} }
...@@ -2055,7 +2065,7 @@ static HRESULT WINAPI ISVOleCmdTarget_QueryStatus( ...@@ -2055,7 +2065,7 @@ static HRESULT WINAPI ISVOleCmdTarget_QueryStatus(
OLECMDTEXT* pCmdText) OLECMDTEXT* pCmdText)
{ {
UINT i; UINT i;
_ICOM_THIS_From_IOleCommandTarget(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IOleCommandTarget(iface);
FIXME("(%p)->(%p(%s) 0x%08lx %p %p\n", FIXME("(%p)->(%p(%s) 0x%08lx %p %p\n",
This, pguidCmdGroup, debugstr_guid(pguidCmdGroup), cCmds, prgCmds, pCmdText); This, pguidCmdGroup, debugstr_guid(pguidCmdGroup), cCmds, prgCmds, pCmdText);
...@@ -2083,7 +2093,7 @@ static HRESULT WINAPI ISVOleCmdTarget_Exec( ...@@ -2083,7 +2093,7 @@ static HRESULT WINAPI ISVOleCmdTarget_Exec(
VARIANT* pvaIn, VARIANT* pvaIn,
VARIANT* pvaOut) VARIANT* pvaOut)
{ {
_ICOM_THIS_From_IOleCommandTarget(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IOleCommandTarget(iface);
FIXME("(%p)->(\n\tTarget GUID:%s Command:0x%08lx Opt:0x%08lx %p %p)\n", FIXME("(%p)->(\n\tTarget GUID:%s Command:0x%08lx Opt:0x%08lx %p %p)\n",
This, debugstr_guid(pguidCmdGroup), nCmdID, nCmdexecopt, pvaIn, pvaOut); This, debugstr_guid(pguidCmdGroup), nCmdID, nCmdexecopt, pvaIn, pvaOut);
...@@ -2118,7 +2128,7 @@ static HRESULT WINAPI ISVDropTarget_QueryInterface( ...@@ -2118,7 +2128,7 @@ static HRESULT WINAPI ISVDropTarget_QueryInterface(
REFIID riid, REFIID riid,
LPVOID *ppvObj) LPVOID *ppvObj)
{ {
_ICOM_THIS_From_IDropTarget(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IDropTarget(iface);
TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj);
...@@ -2127,7 +2137,7 @@ static HRESULT WINAPI ISVDropTarget_QueryInterface( ...@@ -2127,7 +2137,7 @@ static HRESULT WINAPI ISVDropTarget_QueryInterface(
static ULONG WINAPI ISVDropTarget_AddRef( IDropTarget *iface) static ULONG WINAPI ISVDropTarget_AddRef( IDropTarget *iface)
{ {
_ICOM_THIS_From_IDropTarget(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IDropTarget(iface);
TRACE("(%p)->(count=%lu)\n",This,This->ref); TRACE("(%p)->(count=%lu)\n",This,This->ref);
...@@ -2136,7 +2146,7 @@ static ULONG WINAPI ISVDropTarget_AddRef( IDropTarget *iface) ...@@ -2136,7 +2146,7 @@ static ULONG WINAPI ISVDropTarget_AddRef( IDropTarget *iface)
static ULONG WINAPI ISVDropTarget_Release( IDropTarget *iface) static ULONG WINAPI ISVDropTarget_Release( IDropTarget *iface)
{ {
_ICOM_THIS_From_IDropTarget(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IDropTarget(iface);
TRACE("(%p)->(count=%lu)\n",This,This->ref); TRACE("(%p)->(count=%lu)\n",This,This->ref);
...@@ -2151,7 +2161,7 @@ static HRESULT WINAPI ISVDropTarget_DragEnter( ...@@ -2151,7 +2161,7 @@ static HRESULT WINAPI ISVDropTarget_DragEnter(
DWORD *pdwEffect) DWORD *pdwEffect)
{ {
_ICOM_THIS_From_IDropTarget(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IDropTarget(iface);
FIXME("Stub: This=%p, DataObject=%p\n",This,pDataObject); FIXME("Stub: This=%p, DataObject=%p\n",This,pDataObject);
...@@ -2164,7 +2174,7 @@ static HRESULT WINAPI ISVDropTarget_DragOver( ...@@ -2164,7 +2174,7 @@ static HRESULT WINAPI ISVDropTarget_DragOver(
POINTL pt, POINTL pt,
DWORD *pdwEffect) DWORD *pdwEffect)
{ {
_ICOM_THIS_From_IDropTarget(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IDropTarget(iface);
FIXME("Stub: This=%p\n",This); FIXME("Stub: This=%p\n",This);
...@@ -2174,7 +2184,7 @@ static HRESULT WINAPI ISVDropTarget_DragOver( ...@@ -2174,7 +2184,7 @@ static HRESULT WINAPI ISVDropTarget_DragOver(
static HRESULT WINAPI ISVDropTarget_DragLeave( static HRESULT WINAPI ISVDropTarget_DragLeave(
IDropTarget *iface) IDropTarget *iface)
{ {
_ICOM_THIS_From_IDropTarget(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IDropTarget(iface);
FIXME("Stub: This=%p\n",This); FIXME("Stub: This=%p\n",This);
...@@ -2188,7 +2198,7 @@ static HRESULT WINAPI ISVDropTarget_Drop( ...@@ -2188,7 +2198,7 @@ static HRESULT WINAPI ISVDropTarget_Drop(
POINTL pt, POINTL pt,
DWORD *pdwEffect) DWORD *pdwEffect)
{ {
_ICOM_THIS_From_IDropTarget(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IDropTarget(iface);
FIXME("Stub: This=%p\n",This); FIXME("Stub: This=%p\n",This);
...@@ -2215,7 +2225,7 @@ static HRESULT WINAPI ISVDropSource_QueryInterface( ...@@ -2215,7 +2225,7 @@ static HRESULT WINAPI ISVDropSource_QueryInterface(
REFIID riid, REFIID riid,
LPVOID *ppvObj) LPVOID *ppvObj)
{ {
_ICOM_THIS_From_IDropSource(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IDropSource(iface);
TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj);
...@@ -2224,7 +2234,7 @@ static HRESULT WINAPI ISVDropSource_QueryInterface( ...@@ -2224,7 +2234,7 @@ static HRESULT WINAPI ISVDropSource_QueryInterface(
static ULONG WINAPI ISVDropSource_AddRef( IDropSource *iface) static ULONG WINAPI ISVDropSource_AddRef( IDropSource *iface)
{ {
_ICOM_THIS_From_IDropSource(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IDropSource(iface);
TRACE("(%p)->(count=%lu)\n",This,This->ref); TRACE("(%p)->(count=%lu)\n",This,This->ref);
...@@ -2233,7 +2243,7 @@ static ULONG WINAPI ISVDropSource_AddRef( IDropSource *iface) ...@@ -2233,7 +2243,7 @@ static ULONG WINAPI ISVDropSource_AddRef( IDropSource *iface)
static ULONG WINAPI ISVDropSource_Release( IDropSource *iface) static ULONG WINAPI ISVDropSource_Release( IDropSource *iface)
{ {
_ICOM_THIS_From_IDropSource(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IDropSource(iface);
TRACE("(%p)->(count=%lu)\n",This,This->ref); TRACE("(%p)->(count=%lu)\n",This,This->ref);
...@@ -2244,7 +2254,7 @@ static HRESULT WINAPI ISVDropSource_QueryContinueDrag( ...@@ -2244,7 +2254,7 @@ static HRESULT WINAPI ISVDropSource_QueryContinueDrag(
BOOL fEscapePressed, BOOL fEscapePressed,
DWORD grfKeyState) DWORD grfKeyState)
{ {
_ICOM_THIS_From_IDropSource(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IDropSource(iface);
TRACE("(%p)\n",This); TRACE("(%p)\n",This);
if (fEscapePressed) if (fEscapePressed)
...@@ -2259,7 +2269,7 @@ static HRESULT WINAPI ISVDropSource_GiveFeedback( ...@@ -2259,7 +2269,7 @@ static HRESULT WINAPI ISVDropSource_GiveFeedback(
IDropSource *iface, IDropSource *iface,
DWORD dwEffect) DWORD dwEffect)
{ {
_ICOM_THIS_From_IDropSource(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IDropSource(iface);
TRACE("(%p)\n",This); TRACE("(%p)\n",This);
return DRAGDROP_S_USEDEFAULTCURSORS; return DRAGDROP_S_USEDEFAULTCURSORS;
...@@ -2282,7 +2292,7 @@ static HRESULT WINAPI ISVViewObject_QueryInterface( ...@@ -2282,7 +2292,7 @@ static HRESULT WINAPI ISVViewObject_QueryInterface(
REFIID riid, REFIID riid,
LPVOID *ppvObj) LPVOID *ppvObj)
{ {
_ICOM_THIS_From_IViewObject(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IViewObject(iface);
TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj);
...@@ -2291,7 +2301,7 @@ static HRESULT WINAPI ISVViewObject_QueryInterface( ...@@ -2291,7 +2301,7 @@ static HRESULT WINAPI ISVViewObject_QueryInterface(
static ULONG WINAPI ISVViewObject_AddRef( IViewObject *iface) static ULONG WINAPI ISVViewObject_AddRef( IViewObject *iface)
{ {
_ICOM_THIS_From_IViewObject(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IViewObject(iface);
TRACE("(%p)->(count=%lu)\n",This,This->ref); TRACE("(%p)->(count=%lu)\n",This,This->ref);
...@@ -2300,7 +2310,7 @@ static ULONG WINAPI ISVViewObject_AddRef( IViewObject *iface) ...@@ -2300,7 +2310,7 @@ static ULONG WINAPI ISVViewObject_AddRef( IViewObject *iface)
static ULONG WINAPI ISVViewObject_Release( IViewObject *iface) static ULONG WINAPI ISVViewObject_Release( IViewObject *iface)
{ {
_ICOM_THIS_From_IViewObject(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IViewObject(iface);
TRACE("(%p)->(count=%lu)\n",This,This->ref); TRACE("(%p)->(count=%lu)\n",This,This->ref);
...@@ -2321,7 +2331,7 @@ static HRESULT WINAPI ISVViewObject_Draw( ...@@ -2321,7 +2331,7 @@ static HRESULT WINAPI ISVViewObject_Draw(
ULONG_PTR dwContinue) ULONG_PTR dwContinue)
{ {
_ICOM_THIS_From_IViewObject(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IViewObject(iface);
FIXME("Stub: This=%p\n",This); FIXME("Stub: This=%p\n",This);
...@@ -2337,7 +2347,7 @@ static HRESULT WINAPI ISVViewObject_GetColorSet( ...@@ -2337,7 +2347,7 @@ static HRESULT WINAPI ISVViewObject_GetColorSet(
LOGPALETTE** ppColorSet) LOGPALETTE** ppColorSet)
{ {
_ICOM_THIS_From_IViewObject(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IViewObject(iface);
FIXME("Stub: This=%p\n",This); FIXME("Stub: This=%p\n",This);
...@@ -2351,7 +2361,7 @@ static HRESULT WINAPI ISVViewObject_Freeze( ...@@ -2351,7 +2361,7 @@ static HRESULT WINAPI ISVViewObject_Freeze(
DWORD* pdwFreeze) DWORD* pdwFreeze)
{ {
_ICOM_THIS_From_IViewObject(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IViewObject(iface);
FIXME("Stub: This=%p\n",This); FIXME("Stub: This=%p\n",This);
...@@ -2362,7 +2372,7 @@ static HRESULT WINAPI ISVViewObject_Unfreeze( ...@@ -2362,7 +2372,7 @@ static HRESULT WINAPI ISVViewObject_Unfreeze(
DWORD dwFreeze) DWORD dwFreeze)
{ {
_ICOM_THIS_From_IViewObject(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IViewObject(iface);
FIXME("Stub: This=%p\n",This); FIXME("Stub: This=%p\n",This);
...@@ -2375,7 +2385,7 @@ static HRESULT WINAPI ISVViewObject_SetAdvise( ...@@ -2375,7 +2385,7 @@ static HRESULT WINAPI ISVViewObject_SetAdvise(
IAdviseSink* pAdvSink) IAdviseSink* pAdvSink)
{ {
_ICOM_THIS_From_IViewObject(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IViewObject(iface);
FIXME("partial stub: %p %08lx %08lx %p\n", FIXME("partial stub: %p %08lx %08lx %p\n",
This, aspects, advf, pAdvSink); This, aspects, advf, pAdvSink);
...@@ -2395,7 +2405,7 @@ static HRESULT WINAPI ISVViewObject_GetAdvise( ...@@ -2395,7 +2405,7 @@ static HRESULT WINAPI ISVViewObject_GetAdvise(
IAdviseSink** ppAdvSink) IAdviseSink** ppAdvSink)
{ {
_ICOM_THIS_From_IViewObject(IShellViewImpl, iface); IShellViewImpl *This = impl_from_IViewObject(iface);
TRACE("This=%p pAspects=%p pAdvf=%p ppAdvSink=%p\n", TRACE("This=%p pAspects=%p pAdvf=%p ppAdvSink=%p\n",
This, pAspects, pAdvf, ppAdvSink); This, pAspects, pAdvf, ppAdvSink);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment