Commit 33598db7 authored by Mohamad Al-Jaf's avatar Mohamad Al-Jaf Committed by Alexandre Julliard

shell32: Fix last parameter behavior in SHBindToFolderIDListParent().

parent 27434f36
......@@ -1304,12 +1304,13 @@ HRESULT WINAPI SHBindToFolderIDListParent(IShellFolder *psf, LPCITEMIDLIST pidl,
TRACE_(shell)("%p,%p,%s\n", psf, pidl, debugstr_guid(riid));
pdump(pidl);
if (ppidlLast)
*ppidlLast = NULL;
if (!pidl || !ppv)
return E_INVALIDARG;
*ppv = NULL;
if (ppidlLast)
*ppidlLast = NULL;
if (!psf)
{
......
......@@ -779,7 +779,7 @@ static void test_GetDisplayName(void)
hr = SHBindToParent(NULL, &IID_IShellFolder, (void **)&psfPersonal, &pidlLast);
ok (hr == E_INVALIDARG || broken(hr == E_OUTOFMEMORY) /* XP */,
"SHBindToParent(NULL) should fail! hr = %08lx\n", hr);
todo_wine ok(pidlLast == NULL, "got %p\n", pidlLast);
ok(pidlLast == NULL, "got %p\n", pidlLast);
/* But it succeeds with an empty PIDL. */
hr = SHBindToParent(pidlEmpty, &IID_IShellFolder, (void **)&psfPersonal, &pidlLast);
......@@ -5601,7 +5601,7 @@ static void test_SHBindToFolderIDListParent(void)
pidl_last = (LPITEMIDLIST)0xdeadbeef;
hr = pSHBindToFolderIDListParent(NULL, NULL, &IID_IShellFolder, (void **)&psf, &pidl_last);
ok(hr == E_INVALIDARG, "got %#lx\n", hr);
todo_wine ok(pidl_last == NULL, "got %p\n", pidl_last);
ok(pidl_last == NULL, "got %p\n", pidl_last);
}
START_TEST(shlfolder)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment