mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +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
1 changed files with 6 additions and 10 deletions
|
@ -370,21 +370,17 @@ 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 = 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))
|
||||
{
|
||||
hr = psl->GetIconLocation(wTemp, MAX_PATH, &icon_idx);
|
||||
if (SUCCEEDED(hr) && *sTemp)
|
||||
found = TRUE;
|
||||
|
||||
if (SUCCEEDED(hr) && *sTemp)
|
||||
found = TRUE;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue