mirror of
https://github.com/reactos/reactos.git
synced 2025-06-09 20:11:14 +00:00
[SHELL32]
- Correctly handle desktop pidls in CDesktopFolder::CompareIDs. Based on a patch by Sylvain Deverre. CORE-10747 CORE-10801 #resolve svn path=/trunk/; revision=71081
This commit is contained in:
parent
113dd2e1e9
commit
d44ee74466
1 changed files with 7 additions and 0 deletions
|
@ -463,12 +463,19 @@ HRESULT WINAPI CDesktopFolder::BindToStorage(
|
||||||
*/
|
*/
|
||||||
HRESULT WINAPI CDesktopFolder::CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
|
HRESULT WINAPI CDesktopFolder::CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
|
||||||
{
|
{
|
||||||
|
bool bIsDesktopFolder1, bIsDesktopFolder2;
|
||||||
|
|
||||||
if (!pidl1 || !pidl2)
|
if (!pidl1 || !pidl2)
|
||||||
{
|
{
|
||||||
ERR("Got null pidl pointer (%Ix %p %p)!\n", lParam, pidl1, pidl2);
|
ERR("Got null pidl pointer (%Ix %p %p)!\n", lParam, pidl1, pidl2);
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bIsDesktopFolder1 = _ILIsDesktop(pidl1);
|
||||||
|
bIsDesktopFolder2 = _ILIsDesktop(pidl2);
|
||||||
|
if (bIsDesktopFolder1 || bIsDesktopFolder2)
|
||||||
|
return MAKE_COMPARE_HRESULT(bIsDesktopFolder1 - bIsDesktopFolder2);
|
||||||
|
|
||||||
if (_ILIsSpecialFolder(pidl1) || _ILIsSpecialFolder(pidl2))
|
if (_ILIsSpecialFolder(pidl1) || _ILIsSpecialFolder(pidl2))
|
||||||
return SHELL32_CompareGuidItems(this, lParam, pidl1, pidl2);
|
return SHELL32_CompareGuidItems(this, lParam, pidl1, pidl2);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue