Author: cmihail
Date: Sat Nov 5 16:40:42 2011
New Revision: 54300
URL:
http://svn.reactos.org/svn/reactos?rev=54300&view=rev
Log:
[shell32]
- Fix ParseDisplayName based on wine by checking for paths that are parsable through
IEParseDisplayNameWithBCW. Score 2 failed wine tests in shlfolder
Modified:
trunk/reactos/dll/win32/shell32/CMakeLists.txt
trunk/reactos/dll/win32/shell32/shfldr_desktop.cpp
Modified: trunk/reactos/dll/win32/shell32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CMakeLis…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CMakeLists.txt [iso-8859-1] Sat Nov 5 16:40:42 2011
@@ -92,6 +92,7 @@
user32
comctl32
comdlg32
+ shdocvw
shlwapi
devmgr
winspool
@@ -100,6 +101,8 @@
kernel32
ntdll)
+add_dependencies(shdocvw shdocvw_v1)
+
add_pch(shell32 precomp.h)
add_cd_file(TARGET shell32 DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/dll/win32/shell32/shfldr_desktop.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr_d…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shfldr_desktop.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shfldr_desktop.cpp [iso-8859-1] Sat Nov 5 16:40:42
2011
@@ -40,6 +40,9 @@
it from the view by handling the IncludeObject query to return S_FALSE. The enumerator
always shows My Computer.
*/
+
+/* Undocumented functions from shdocvw */
+extern "C" HRESULT WINAPI IEParseDisplayNameWithBCW(DWORD codepage, LPCWSTR
lpszDisplayName, LPBC pbc, LPITEMIDLIST *ppidl);
/***********************************************************************
* Desktopfolder implementation
@@ -296,6 +299,7 @@
WCHAR szElement[MAX_PATH];
LPCWSTR szNext = NULL;
LPITEMIDLIST pidlTemp = NULL;
+ PARSEDURLW urldata;
HRESULT hr = S_OK;
CLSID clsid;
@@ -316,6 +320,8 @@
if (pchEaten)
*pchEaten = 0; /* strange but like the original */
+
+ urldata.cbSize = sizeof(urldata);
if (lpszDisplayName[0] == ':' && lpszDisplayName[1] == ':')
{
@@ -339,6 +345,17 @@
{
*ppidl = pidlTemp;
return S_OK;
+ }
+ else if (SUCCEEDED(ParseURLW(lpszDisplayName, &urldata)))
+ {
+ if (urldata.nScheme == URL_SCHEME_SHELL) /* handle shell: urls */
+ {
+ TRACE ("-- shell url: %s\n", debugstr_w(urldata.pszSuffix));
+ SHCLSIDFromStringW (urldata.pszSuffix+2, &clsid);
+ pidlTemp = _ILCreateGuid (PT_GUID, clsid);
+ }
+ else
+ return IEParseDisplayNameWithBCW(CP_ACP,lpszDisplayName,pbc,ppidl);
}
else
{
@@ -356,6 +373,7 @@
{
lstrcpynW(pathPtr, lpszDisplayName, MAX_PATH - (pathPtr - szPath));
hr = _ILCreateFromPathW(szPath, &pidlTemp);
+ __debugbreak();
}
else
{