mirror of
https://github.com/reactos/reactos.git
synced 2024-07-04 19:54:58 +00:00
[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:
parent
c55c338dfa
commit
1a570d8bbb
|
@ -370,21 +370,17 @@ HRESULT GenericExtractIcon_CreateInstance(IShellFolder * psf, LPCITEMIDLIST pidl
|
||||||
else if (!lstrcmpiA(sTemp, "lnkfile"))
|
else if (!lstrcmpiA(sTemp, "lnkfile"))
|
||||||
{
|
{
|
||||||
/* extract icon from shell shortcut */
|
/* extract icon from shell shortcut */
|
||||||
CComPtr<IShellFolder> dsf;
|
|
||||||
CComPtr<IShellLinkW> psl;
|
CComPtr<IShellLinkW> psl;
|
||||||
|
|
||||||
if (SUCCEEDED(SHGetDesktopFolder(&dsf)))
|
HRESULT hr = psf->GetUIObjectOf(NULL, 1, &pidl, IID_NULL_PPV_ARG(IShellLinkW, &psl));
|
||||||
|
|
||||||
|
if (SUCCEEDED(hr))
|
||||||
{
|
{
|
||||||
HRESULT hr = dsf->GetUIObjectOf(NULL, 1, &pidl, IID_NULL_PPV_ARG(IShellLinkW, &psl));
|
hr = psl->GetIconLocation(wTemp, MAX_PATH, &icon_idx);
|
||||||
|
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr) && *sTemp)
|
||||||
{
|
found = TRUE;
|
||||||
hr = psl->GetIconLocation(wTemp, MAX_PATH, &icon_idx);
|
|
||||||
|
|
||||||
if (SUCCEEDED(hr) && *sTemp)
|
|
||||||
found = TRUE;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue