mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:03:00 +00:00
[SHELL32]
- Handle failure in SHELL32_CompareDetails. svn path=/trunk/; revision=72771
This commit is contained in:
parent
c6db4d179c
commit
adffe02e6f
1 changed files with 17 additions and 4 deletions
|
@ -439,11 +439,24 @@ HRESULT SHELL32_CompareDetails(IShellFolder2* isf, LPARAM lParam, LPCITEMIDLIST
|
||||||
{
|
{
|
||||||
SHELLDETAILS sd;
|
SHELLDETAILS sd;
|
||||||
WCHAR wszItem1[MAX_PATH], wszItem2[MAX_PATH];
|
WCHAR wszItem1[MAX_PATH], wszItem2[MAX_PATH];
|
||||||
|
HRESULT hres;
|
||||||
|
|
||||||
|
hres = isf->GetDetailsOf(pidl1, lParam, &sd);
|
||||||
|
if (FAILED(hres))
|
||||||
|
return MAKE_COMPARE_HRESULT(1);
|
||||||
|
|
||||||
|
hres = StrRetToBufW(&sd.str, pidl1, wszItem1, MAX_PATH);
|
||||||
|
if (FAILED(hres))
|
||||||
|
return MAKE_COMPARE_HRESULT(1);
|
||||||
|
|
||||||
|
hres = isf->GetDetailsOf(pidl2, lParam, &sd);
|
||||||
|
if (FAILED(hres))
|
||||||
|
return MAKE_COMPARE_HRESULT(1);
|
||||||
|
|
||||||
|
hres = StrRetToBufW(&sd.str, pidl2, wszItem2, MAX_PATH);
|
||||||
|
if (FAILED(hres))
|
||||||
|
return MAKE_COMPARE_HRESULT(1);
|
||||||
|
|
||||||
isf->GetDetailsOf(pidl1, lParam, &sd);
|
|
||||||
StrRetToBufW(&sd.str, pidl1, wszItem1, MAX_PATH);
|
|
||||||
isf->GetDetailsOf(pidl2, lParam, &sd);
|
|
||||||
StrRetToBufW(&sd.str, pidl2, wszItem2, MAX_PATH);
|
|
||||||
int ret = wcsicmp(wszItem1, wszItem2);
|
int ret = wcsicmp(wszItem1, wszItem2);
|
||||||
|
|
||||||
return MAKE_COMPARE_HRESULT(ret);
|
return MAKE_COMPARE_HRESULT(ret);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue