[SHELL32]

- Fix loading shortcut icons. The previous code passed a full pidl to GetUIObjectOf which is really wrong.
CORE-11158

svn path=/trunk/; revision=71233
This commit is contained in:
Giannis Adamopoulos 2016-05-02 13:50:13 +00:00
parent c55c338dfa
commit 1a570d8bbb

View file

@ -370,12 +370,9 @@ HRESULT GenericExtractIcon_CreateInstance(IShellFolder * psf, LPCITEMIDLIST pidl
else if (!lstrcmpiA(sTemp, "lnkfile"))
{
/* extract icon from shell shortcut */
CComPtr<IShellFolder> dsf;
CComPtr<IShellLinkW> psl;
if (SUCCEEDED(SHGetDesktopFolder(&dsf)))
{
HRESULT hr = dsf->GetUIObjectOf(NULL, 1, &pidl, IID_NULL_PPV_ARG(IShellLinkW, &psl));
HRESULT hr = psf->GetUIObjectOf(NULL, 1, &pidl, IID_NULL_PPV_ARG(IShellLinkW, &psl));
if (SUCCEEDED(hr))
{
@ -387,7 +384,6 @@ HRESULT GenericExtractIcon_CreateInstance(IShellFolder * psf, LPCITEMIDLIST pidl
}
}
}
}
if (!found)
/* default icon */