shell32: Use ParseURL to detect URLs.
This commit is contained in:
parent
ff08a68668
commit
da31fc06a4
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue