Author: gadamopoulos
Date: Sun Nov 6 20:13:17 2016
New Revision: 73157
URL:
http://svn.reactos.org/svn/reactos?rev=73157&view=rev
Log:
[SHELL32]
- CDesktopBrowser: The flags that SHOpenNewFrame takes are the same that
SHExplorerParseCmdLine returns, not the SBSP_ ones.
[BROWSEUI]
- Move the hack to fill the parsed pidl if none was found to SHCreateFromDesktop.
- Convert the SH_EXPLORER_CMDLINE_FLAG_E flag to a SBSP_EXPLOREMODE and pass it to the
CShellBrowser.
Modified:
trunk/reactos/dll/win32/browseui/desktopipc.cpp
trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp
Modified: trunk/reactos/dll/win32/browseui/desktopipc.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/desktop…
==============================================================================
--- trunk/reactos/dll/win32/browseui/desktopipc.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/desktopipc.cpp [iso-8859-1] Sun Nov 6 20:13:17 2016
@@ -357,13 +357,11 @@
if (parameters && parameters->offsetF8)
parameters->offsetF8->AddRef();
- // HACK! This shouldn't happen! SHExplorerParseCmdLine needs fixing.
- if (!parameters->directoryPIDL)
- {
- SHGetFolderLocation(NULL, CSIDL_PERSONAL, NULL, NULL,
¶meters->directoryPIDL);
- }
-
- hResult = CShellBrowser_CreateInstance(parameters->directoryPIDL,
parameters->dwFlags, IID_PPV_ARG(IBrowserService2, &browser));
+ UINT wFlags = 0;
+ if ((parameters->dwFlags & SH_EXPLORER_CMDLINE_FLAG_E))
+ wFlags |= SBSP_EXPLOREMODE;
+
+ hResult = CShellBrowser_CreateInstance(parameters->directoryPIDL, wFlags,
IID_PPV_ARG(IBrowserService2, &browser));
if (FAILED_UNEXPECTEDLY(hResult))
return hResult;
@@ -609,6 +607,12 @@
}
}
+ // HACK! This shouldn't happen! SHExplorerParseCmdLine needs fixing.
+ if (!pidl)
+ {
+ SHGetFolderLocation(NULL, CSIDL_PERSONAL, NULL, NULL, &pidl);
+ }
+
parameters->directoryPIDL = pidl;
// Try to find the owner of the idlist, if we aren't running /SEPARATE
Modified: trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shelldes…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp [iso-8859-1]
(original)
+++ trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp [iso-8859-1] Sun Nov
6 20:13:17 2016
@@ -284,7 +284,8 @@
* find an open shell window that shows the requested pidl and activate it
*/
- return SHOpenNewFrame((LPITEMIDLIST)pidl, NULL, 0, wFlags);
+ DWORD dwFlags = ((wFlags & SBSP_EXPLOREMODE) != 0) ? SH_EXPLORER_CMDLINE_FLAG_E :
0;
+ return SHOpenNewFrame((LPITEMIDLIST)pidl, NULL, 0, dwFlags);
}
HRESULT STDMETHODCALLTYPE CDesktopBrowser::GetViewStateStream(DWORD grfMode, IStream
**ppStrm)