mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +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,12 +370,9 @@ 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));
|
||||||
{
|
|
||||||
HRESULT hr = dsf->GetUIObjectOf(NULL, 1, &pidl, IID_NULL_PPV_ARG(IShellLinkW, &psl));
|
|
||||||
|
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
{
|
{
|
||||||
|
@ -387,7 +384,6 @@ HRESULT GenericExtractIcon_CreateInstance(IShellFolder * psf, LPCITEMIDLIST pidl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!found)
|
if (!found)
|
||||||
/* default icon */
|
/* default icon */
|
||||||
|
|
Loading…
Reference in a new issue