Author: gadamopoulos
Date: Wed Jul 5 21:36:20 2017
New Revision: 75289
URL:
http://svn.reactos.org/svn/reactos?rev=75289&view=rev
Log:
[SHELL32] -Remove IShellView_Constructor and CDefView_Constructor. Use
SHCreateShellFolderView and SHCreateShellFolderViewEx instead.
Modified:
trunk/reactos/dll/win32/shell32/CDefView.cpp
trunk/reactos/dll/win32/shell32/folders/CControlPanelFolder.cpp
trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp
trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp
trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp
trunk/reactos/dll/win32/shell32/folders/CNetFolder.cpp
trunk/reactos/dll/win32/shell32/folders/CPrinterFolder.cpp
trunk/reactos/dll/win32/shell32/folders/CRecycleBin.cpp
trunk/reactos/dll/win32/shell32/wine/shell32_main.h
trunk/reactos/dll/win32/shell32/wine/shellord.c
Modified: trunk/reactos/dll/win32/shell32/CDefView.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDefView…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] Wed Jul 5 21:36:20 2017
@@ -3153,15 +3153,49 @@
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;
+}
Modified: trunk/reactos/dll/win32/shell32/folders/CControlPanelFolder.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CControlPanelFolder.cpp [iso-8859-1]
(original)
+++ trunk/reactos/dll/win32/shell32/folders/CControlPanelFolder.cpp [iso-8859-1] Wed Jul
5 21:36:20 2017
@@ -394,7 +394,8 @@
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);
Modified: trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp [iso-8859-1] Wed Jul 5
21:36:20 2017
@@ -514,7 +514,6 @@
REFIID riid,
LPVOID *ppvOut)
{
- CComPtr<IShellView> pShellView;
HRESULT hr = E_INVALIDARG;
TRACE ("(%p)->(hwnd=%p,%s,%p)\n",
@@ -549,9 +548,8 @@
}
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;
Modified: trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp [iso-8859-1] Wed Jul 5
21:36:20 2017
@@ -531,7 +531,8 @@
}
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;
Modified: trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp [iso-8859-1] Wed Jul 5 21:36:20
2017
@@ -393,7 +393,8 @@
}
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);
Modified: trunk/reactos/dll/win32/shell32/folders/CNetFolder.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CNetFolder.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/folders/CNetFolder.cpp [iso-8859-1] Wed Jul 5
21:36:20 2017
@@ -362,7 +362,8 @@
}
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;
Modified: trunk/reactos/dll/win32/shell32/folders/CPrinterFolder.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CPrinterFolder.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/folders/CPrinterFolder.cpp [iso-8859-1] Wed Jul 5
21:36:20 2017
@@ -285,7 +285,8 @@
}
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;
Modified: trunk/reactos/dll/win32/shell32/folders/CRecycleBin.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CRecycleBin.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/folders/CRecycleBin.cpp [iso-8859-1] Wed Jul 5
21:36:20 2017
@@ -564,7 +564,8 @@
}
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;
Modified: trunk/reactos/dll/win32/shell32/wine/shell32_main.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/wine/she…
==============================================================================
--- trunk/reactos/dll/win32/shell32/wine/shell32_main.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/wine/shell32_main.h [iso-8859-1] Wed Jul 5 21:36:20
2017
@@ -69,8 +69,6 @@
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);
Modified: trunk/reactos/dll/win32/shell32/wine/shellord.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/wine/she…
==============================================================================
--- trunk/reactos/dll/win32/shell32/wine/shellord.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/wine/shellord.c [iso-8859-1] Wed Jul 5 21:36:20 2017
@@ -1046,6 +1046,8 @@
* NOTES
* see IShellFolder::CreateViewObject
*/
+ #ifndef __REACTOS__
+
HRESULT WINAPI SHCreateShellFolderViewEx(
LPCSFV psvcbi, /* [in] shelltemplate struct */
IShellView **ppv) /* [out] IShellView pointer */
@@ -1068,6 +1070,8 @@
return hRes;
}
+#endif
+
/*************************************************************************
* SHWinHelp [SHELL32.127]
*
@@ -2108,6 +2112,8 @@
return ret;
}
+#ifndef __REACTOS__
+
/*************************************************************************
* SHCreateShellFolderView [SHELL32.256]
*
@@ -2142,3 +2148,4 @@
return hRes;
}
+#endif