Author: gadamopoulos Date: Mon May 2 13:50:13 2016 New Revision: 71233
URL: http://svn.reactos.org/svn/reactos?rev=71233&view=rev Log: [SHELL32] - Fix loading shortcut icons. The previous code passed a full pidl to GetUIObjectOf which is really wrong. CORE-11158
Modified: trunk/reactos/dll/win32/shell32/folders.cpp
Modified: trunk/reactos/dll/win32/shell32/folders.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders.c... ============================================================================== --- trunk/reactos/dll/win32/shell32/folders.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders.cpp [iso-8859-1] Mon May 2 13:50:13 2016 @@ -370,21 +370,17 @@ 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)); - - if (SUCCEEDED(hr)) - { - hr = psl->GetIconLocation(wTemp, MAX_PATH, &icon_idx); - - if (SUCCEEDED(hr) && *sTemp) - found = TRUE; - - } + HRESULT hr = psf->GetUIObjectOf(NULL, 1, &pidl, IID_NULL_PPV_ARG(IShellLinkW, &psl)); + + if (SUCCEEDED(hr)) + { + hr = psl->GetIconLocation(wTemp, MAX_PATH, &icon_idx); + + if (SUCCEEDED(hr) && *sTemp) + found = TRUE; + } } }