Author: tfaber
Date: Tue Oct 22 19:01:07 2013
New Revision: 60731
URL:
http://svn.reactos.org/svn/reactos?rev=60731&view=rev
Log:
[SHELL32]
- Import SHCreateShellFolderView implementation and fixes for -Ex from Wine
CORE-7334 #resolve
Modified:
trunk/reactos/dll/win32/shell32/shellord.cpp
Modified: trunk/reactos/dll/win32/shell32/shellord.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shellord…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shellord.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shellord.cpp [iso-8859-1] Tue Oct 22 19:01:07 2013
@@ -1009,21 +1009,18 @@
LPCSFV psvcbi, /* [in] shelltemplate struct */
IShellView **ppv) /* [out] IShellView pointer */
{
- IShellView * psf;
+ IShellView *psf;
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);
-
+ psvcbi->pshf, psvcbi->pidl, psvcbi->pfnCallback,
+ psvcbi->fvm, psvcbi->psvOuter);
+
+ *ppv = NULL;
hRes = IShellView_Constructor(psvcbi->pshf, &psf);
if (FAILED(hRes))
return hRes;
- if (!psf)
- return E_OUTOFMEMORY;
-
- psf->AddRef();
hRes = psf->QueryInterface(IID_IShellView, (LPVOID *)ppv);
psf->Release();
@@ -1914,25 +1911,24 @@
*/
HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv, IShellView **ppsv)
{
- HRESULT ret = S_OK;
-
- FIXME("SHCreateShellFolderView() stub\n");
-
- if (!pcsfv || sizeof(*pcsfv) != pcsfv->cbSize)
- ret = E_INVALIDARG;
- else
- {
- LPVOID lpdata = 0;/*LocalAlloc(LMEM_ZEROINIT, 0x4E4);*/
-
- if (!lpdata)
- ret = E_OUTOFMEMORY;
- else
- {
- /* Initialize and return unknown lpdata structure */
- }
- }
-
- return ret;
+ IShellView *psf;
+ 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 = IShellView_Constructor(pcsfv->pshf, &psf);
+ if (FAILED(hRes))
+ return hRes;
+
+ hRes = psf->QueryInterface(IID_IShellView, (LPVOID *)ppsv);
+ psf->Release();
+
+ return hRes;
}
/*************************************************************************
@@ -2113,8 +2109,8 @@
if (!(dwFlags & SHERB_NOCONFIRMATION))
{
/* FIXME
- * enumerate available files
- * show confirmation dialog
+ * enumerate available files
+ * show confirmation dialog
*/
FIXME("show confirmation dialog\n");
}
@@ -2137,7 +2133,7 @@
if (!(dwFlags & SHERB_NOSOUND))
{
dwSize = sizeof(szPath);
- ret = RegGetValueW(HKEY_CURRENT_USER,
+ ret = RegGetValueW(HKEY_CURRENT_USER,
L"AppEvents\\Schemes\\Apps\\Explorer\\EmptyRecycleBin\\.Current",
NULL,
RRF_RT_REG_EXPAND_SZ,