mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[SHELL32]
- according to msdn ppidl should be set to NULL if an error occurs - fixes shlfolder winetest crash svn path=/trunk/; revision=46112
This commit is contained in:
parent
a17ba7f9af
commit
3666415400
1 changed files with 12 additions and 1 deletions
|
@ -2244,12 +2244,21 @@ LPITEMIDLIST *ppidl, SFGAOF sfgaoIn, SFGAOF *psfgaoOut)
|
|||
HRESULT hr=E_FAIL;
|
||||
ULONG dwAttr=sfgaoIn;
|
||||
|
||||
if (!pszName || !ppidl || !psfgaoOut)
|
||||
if(!ppidl)
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (!pszName || !psfgaoOut)
|
||||
{
|
||||
*ppidl = NULL;
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
hr = SHGetDesktopFolder(&psfDesktop);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
*ppidl = NULL;
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = IShellFolder_ParseDisplayName(psfDesktop, (HWND)NULL, pbc, (LPOLESTR)pszName, (ULONG *)NULL, ppidl, &dwAttr);
|
||||
|
||||
|
@ -2257,6 +2266,8 @@ LPITEMIDLIST *ppidl, SFGAOF sfgaoIn, SFGAOF *psfgaoOut)
|
|||
|
||||
if (SUCCEEDED(hr))
|
||||
*psfgaoOut = dwAttr;
|
||||
else
|
||||
*ppidl = NULL;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue