Andrew Eikum : shell32: Use ParseURL to detect URLs.
Alexandre Julliard
julliard at winehq.org
Tue Jun 29 10:25:20 CDT 2010
Module: wine
Branch: master
Commit: da31fc06a44b38d441a8310724989ea35d512e9f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=da31fc06a44b38d441a8310724989ea35d512e9f
Author: Andrew Eikum <aeikum at codeweavers.com>
Date: Mon Jun 28 12:06:24 2010 -0500
shell32: Use ParseURL to detect URLs.
---
dlls/shell32/shfldr_desktop.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/shell32/shfldr_desktop.c b/dlls/shell32/shfldr_desktop.c
index 30aea3b..46a725f 100644
--- a/dlls/shell32/shfldr_desktop.c
+++ b/dlls/shell32/shfldr_desktop.c
@@ -152,6 +152,7 @@ static HRESULT WINAPI ISF_Desktop_fnParseDisplayName (IShellFolder2 * iface,
WCHAR szElement[MAX_PATH];
LPCWSTR szNext = NULL;
LPITEMIDLIST pidlTemp = NULL;
+ PARSEDURLW urldata;
HRESULT hr = S_OK;
CLSID clsid;
@@ -167,6 +168,8 @@ static HRESULT WINAPI ISF_Desktop_fnParseDisplayName (IShellFolder2 * iface,
if (pchEaten)
*pchEaten = 0; /* strange but like the original */
+ urldata.cbSize = sizeof(urldata);
+
if (lpszDisplayName[0] == ':' && lpszDisplayName[1] == ':')
{
szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH);
@@ -193,13 +196,8 @@ static HRESULT WINAPI ISF_Desktop_fnParseDisplayName (IShellFolder2 * iface,
*ppidl = pidlTemp;
return S_OK;
}
- else if (strchrW(lpszDisplayName,':'))
+ else if (SUCCEEDED(ParseURLW(lpszDisplayName, &urldata)))
{
- PARSEDURLW urldata;
-
- urldata.cbSize = sizeof(urldata);
- ParseURLW(lpszDisplayName,&urldata);
-
if (urldata.nScheme == URL_SCHEME_SHELL) /* handle shell: urls */
{
TRACE ("-- shell url: %s\n", debugstr_w(urldata.pszSuffix));
More information about the wine-cvs
mailing list