[shell32.dll]

- Make sure the ParseDisplayName functions make the ppidle parameter NULL whenever that's possible. Scores a wine test. Spotted by Victor Martinez.

svn path=/branches/shell32_new-bringup/; revision=53641
This commit is contained in:
Claudiu Mihail
2011-09-08 14:07:02 +00:00
parent 261ee4dd58
commit 29ca67f252
2 changed files with 22 additions and 4 deletions
+13 -3
View File
@@ -304,10 +304,16 @@ HRESULT WINAPI CDesktopFolder::ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLE
this, hwndOwner, pbc, lpszDisplayName, debugstr_w(lpszDisplayName),
pchEaten, ppidl, pdwAttributes);
if (!lpszDisplayName || !ppidl)
if (!ppidl)
return E_INVALIDARG;
*ppidl = 0;
if (!lpszDisplayName)
{
*ppidl = NULL;
return E_INVALIDARG;
}
*ppidl = NULL;
if (pchEaten)
*pchEaten = 0; /* strange but like the original */
@@ -333,6 +339,7 @@ HRESULT WINAPI CDesktopFolder::ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLE
else if( (pidlTemp = SHELL32_CreatePidlFromBindCtx(pbc, lpszDisplayName)) )
{
*ppidl = pidlTemp;
DbgPrint("[shell32, CDesktopFolder::ParseDisplayName] 1 *ppidl = 0x%x\n", *ppidl);
return S_OK;
}
else
@@ -379,7 +386,10 @@ HRESULT WINAPI CDesktopFolder::ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLE
}
}
*ppidl = pidlTemp;
if (SUCCEEDED(hr))
*ppidl = pidlTemp;
else
*ppidl = NULL;
TRACE ("(%p)->(-- ret=0x%08x)\n", this, hr);
+9 -1
View File
@@ -188,9 +188,17 @@ HRESULT WINAPI CFSFolder::ParseDisplayName(HWND hwndOwner,
this, hwndOwner, pbc, lpszDisplayName, debugstr_w (lpszDisplayName),
pchEaten, ppidl, pdwAttributes);
if (!lpszDisplayName || !ppidl)
if (!ppidl)
return E_INVALIDARG;
if (!lpszDisplayName)
{
*ppidl = NULL;
return E_INVALIDARG;
}
*ppidl = NULL;
if (pchEaten)
*pchEaten = 0; /* strange but like the original */