mirror of
https://github.com/reactos/reactos.git
synced 2024-06-28 17:01:28 +00:00
[SHELL32] -Remove IShellView_Constructor and CDefView_Constructor. Use SHCreateShellFolderView and SHCreateShellFolderViewEx instead.
svn path=/trunk/; revision=75289
This commit is contained in:
parent
4c022adf19
commit
3b7b8b89b3
|
@ -3153,15 +3153,49 @@ HRESULT CDefView::_MergeToolbar()
|
|||
|
||||
return S_OK;
|
||||
}
|
||||
/**********************************************************
|
||||
* IShellView_Constructor
|
||||
*/
|
||||
HRESULT WINAPI IShellView_Constructor(IShellFolder *pFolder, IShellView **newView)
|
||||
{
|
||||
return ShellObjectCreatorInit<CDefView>(pFolder, IID_PPV_ARG(IShellView, newView));
|
||||
}
|
||||
|
||||
HRESULT WINAPI CDefView_Constructor(IShellFolder *pFolder, REFIID riid, LPVOID * ppvOut)
|
||||
HRESULT CDefView_CreateInstance(IShellFolder *pFolder, REFIID riid, LPVOID * ppvOut)
|
||||
{
|
||||
return ShellObjectCreatorInit<CDefView>(pFolder, riid, ppvOut);
|
||||
}
|
||||
|
||||
HRESULT WINAPI SHCreateShellFolderViewEx(
|
||||
LPCSFV psvcbi, /* [in] shelltemplate struct */
|
||||
IShellView **ppsv) /* [out] IShellView pointer */
|
||||
{
|
||||
CComPtr<IShellView> psv;
|
||||
HRESULT hRes;
|
||||
|
||||
TRACE("sf=%p pidl=%p cb=%p mode=0x%08x parm=%p\n",
|
||||
psvcbi->pshf, psvcbi->pidl, psvcbi->pfnCallback,
|
||||
psvcbi->fvm, psvcbi->psvOuter);
|
||||
|
||||
*ppsv = NULL;
|
||||
hRes = CDefView_CreateInstance(psvcbi->pshf, IID_PPV_ARG(IShellView, &psv));
|
||||
if (FAILED_UNEXPECTEDLY(hRes))
|
||||
return hRes;
|
||||
|
||||
*ppsv = psv.Detach();
|
||||
return hRes;
|
||||
}
|
||||
|
||||
HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv,
|
||||
IShellView **ppsv)
|
||||
{
|
||||
CComPtr<IShellView> psv;
|
||||
HRESULT hRes;
|
||||
|
||||
*ppsv = NULL;
|
||||
if (!pcsfv || pcsfv->cbSize != sizeof(*pcsfv))
|
||||
return E_INVALIDARG;
|
||||
|
||||
TRACE("sf=%p outer=%p callback=%p\n",
|
||||
pcsfv->pshf, pcsfv->psvOuter, pcsfv->psfvcb);
|
||||
|
||||
hRes = CDefView_CreateInstance(pcsfv->pshf, IID_PPV_ARG(IShellView, &psv));
|
||||
if (FAILED(hRes))
|
||||
return hRes;
|
||||
|
||||
*ppsv = psv.Detach();
|
||||
return hRes;
|
||||
}
|
||||
|
|
|
@ -394,7 +394,8 @@ HRESULT WINAPI CControlPanelFolder::CreateViewObject(HWND hwndOwner, REFIID riid
|
|||
WARN("IContextMenu not implemented\n");
|
||||
hr = E_NOTIMPL;
|
||||
} else if (IsEqualIID(riid, IID_IShellView)) {
|
||||
hr = CDefView_Constructor(this, riid, ppvOut);
|
||||
SFV_CREATE sfvparams = {sizeof(SFV_CREATE), this};
|
||||
hr = SHCreateShellFolderView(&sfvparams, (IShellView**)ppvOut);
|
||||
}
|
||||
}
|
||||
TRACE("--(%p)->(interface=%p)\n", this, ppvOut);
|
||||
|
|
|
@ -514,7 +514,6 @@ HRESULT WINAPI CDesktopFolder::CreateViewObject(
|
|||
REFIID riid,
|
||||
LPVOID *ppvOut)
|
||||
{
|
||||
CComPtr<IShellView> pShellView;
|
||||
HRESULT hr = E_INVALIDARG;
|
||||
|
||||
TRACE ("(%p)->(hwnd=%p,%s,%p)\n",
|
||||
|
@ -549,9 +548,8 @@ HRESULT WINAPI CDesktopFolder::CreateViewObject(
|
|||
}
|
||||
else if (IsEqualIID (riid, IID_IShellView))
|
||||
{
|
||||
hr = IShellView_Constructor((IShellFolder *)this, &pShellView);
|
||||
if (pShellView)
|
||||
hr = pShellView->QueryInterface(riid, ppvOut);
|
||||
SFV_CREATE sfvparams = {sizeof(SFV_CREATE), this};
|
||||
hr = SHCreateShellFolderView(&sfvparams, (IShellView**)ppvOut);
|
||||
}
|
||||
TRACE ("-- (%p)->(interface=%p)\n", this, ppvOut);
|
||||
return hr;
|
||||
|
|
|
@ -531,7 +531,8 @@ HRESULT WINAPI CDrivesFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVO
|
|||
}
|
||||
else if (IsEqualIID(riid, IID_IShellView))
|
||||
{
|
||||
hr = CDefView_Constructor(this, riid, ppvOut);
|
||||
SFV_CREATE sfvparams = {sizeof(SFV_CREATE), this};
|
||||
hr = SHCreateShellFolderView(&sfvparams, (IShellView**)ppvOut);
|
||||
}
|
||||
TRACE ("-- (%p)->(interface=%p)\n", this, ppvOut);
|
||||
return hr;
|
||||
|
|
|
@ -393,7 +393,8 @@ HRESULT WINAPI CFSFolder::CreateViewObject(HWND hwndOwner,
|
|||
}
|
||||
else if (IsEqualIID (riid, IID_IShellView))
|
||||
{
|
||||
hr = CDefView_Constructor(this, riid, ppvOut);
|
||||
SFV_CREATE sfvparams = {sizeof(SFV_CREATE), this};
|
||||
hr = SHCreateShellFolderView(&sfvparams, (IShellView**)ppvOut);
|
||||
}
|
||||
}
|
||||
TRACE("-- (%p)->(interface=%p)\n", this, ppvOut);
|
||||
|
|
|
@ -362,7 +362,8 @@ HRESULT WINAPI CNetFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID
|
|||
}
|
||||
else if (IsEqualIID(riid, IID_IShellView))
|
||||
{
|
||||
hr = CDefView_Constructor(this, riid, ppvOut);
|
||||
SFV_CREATE sfvparams = {sizeof(SFV_CREATE), this};
|
||||
hr = SHCreateShellFolderView(&sfvparams, (IShellView**)ppvOut);
|
||||
}
|
||||
TRACE("-- (%p)->(interface=%p)\n", this, ppvOut);
|
||||
return hr;
|
||||
|
|
|
@ -285,7 +285,8 @@ HRESULT WINAPI CPrinterFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPV
|
|||
}
|
||||
else if(IsEqualIID(riid, IID_IShellView))
|
||||
{
|
||||
hr = CDefView_Constructor(this, riid, ppvOut);
|
||||
SFV_CREATE sfvparams = {sizeof(SFV_CREATE), this};
|
||||
hr = SHCreateShellFolderView(&sfvparams, (IShellView**)ppvOut);
|
||||
}
|
||||
TRACE ("-- (%p)->(interface=%p)\n", this, ppvOut);
|
||||
return hr;
|
||||
|
|
|
@ -564,7 +564,8 @@ HRESULT WINAPI CRecycleBin::CreateViewObject(HWND hwndOwner, REFIID riid, void *
|
|||
}
|
||||
else if (IsEqualIID (riid, IID_IShellView))
|
||||
{
|
||||
hr = CDefView_Constructor(this, riid, ppv);
|
||||
SFV_CREATE sfvparams = {sizeof(SFV_CREATE), this};
|
||||
hr = SHCreateShellFolderView(&sfvparams, (IShellView**)ppv);
|
||||
}
|
||||
else
|
||||
return hr;
|
||||
|
|
|
@ -69,8 +69,6 @@ IContextMenu2 * ISvItemCm_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pid
|
|||
HRESULT WINAPI INewItem_Constructor(IUnknown * pUnkOuter, REFIID riif, LPVOID *ppv);
|
||||
IContextMenu2 * ISvStaticItemCm_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pidl, LPCITEMIDLIST *apidl, UINT cidl, HKEY hKey);
|
||||
IContextMenu2 * ISvBgCm_Constructor(LPSHELLFOLDER pSFParent, BOOL bDesktop);
|
||||
HRESULT WINAPI IShellView_Constructor(IShellFolder *pFolder, IShellView **newView);
|
||||
HRESULT WINAPI CDefView_Constructor(IShellFolder *pFolder, REFIID riid, LPVOID * ppvOut);
|
||||
HRESULT WINAPI CDefViewDual_Constructor(REFIID riid, LPVOID * ppvOut);
|
||||
HRESULT WINAPI CShellDispatch_Constructor(REFIID riid, LPVOID * ppvOut);
|
||||
|
||||
|
|
|
@ -1046,6 +1046,8 @@ void WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv)
|
|||
* NOTES
|
||||
* see IShellFolder::CreateViewObject
|
||||
*/
|
||||
#ifndef __REACTOS__
|
||||
|
||||
HRESULT WINAPI SHCreateShellFolderViewEx(
|
||||
LPCSFV psvcbi, /* [in] shelltemplate struct */
|
||||
IShellView **ppv) /* [out] IShellView pointer */
|
||||
|
@ -1068,6 +1070,8 @@ HRESULT WINAPI SHCreateShellFolderViewEx(
|
|||
|
||||
return hRes;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*************************************************************************
|
||||
* SHWinHelp [SHELL32.127]
|
||||
*
|
||||
|
@ -2108,6 +2112,8 @@ HRESULT WINAPI SHGetImageList(int iImageList, REFIID riid, void **ppv)
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifndef __REACTOS__
|
||||
|
||||
/*************************************************************************
|
||||
* SHCreateShellFolderView [SHELL32.256]
|
||||
*
|
||||
|
@ -2142,3 +2148,4 @@ HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv,
|
|||
|
||||
return hRes;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue