shell32/tests: Fix a test failure on Win8.

This commit is contained in:
Nikolay Sivov 2014-02-13 10:14:16 +04:00 committed by Alexandre Julliard
parent c2faae4c3a
commit 7dc45ea585
1 changed files with 17 additions and 4 deletions

View File

@ -3639,10 +3639,23 @@ static void test_ShellItemBindToHandler(void)
ok(hr == S_OK, "Got 0x%08x\n", hr);
if(SUCCEEDED(hr)) IUnknown_Release(punk);
/* BHID_Transfer */
hr = IShellItem_BindToHandler(psi, NULL, &BHID_Transfer, &IID_IUnknown, (void**)&punk);
ok(hr == E_NOINTERFACE || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr);
if(SUCCEEDED(hr)) IUnknown_Release(punk);
/* BHID_Transfer
ITransferSource and ITransferDestination are accessible starting Vista, IUnknown is
supported start Win8. */
hr = IShellItem_BindToHandler(psi, NULL, &BHID_Transfer, &IID_ITransferSource, (void**)&punk);
ok(hr == S_OK || broken(FAILED(hr)) /* pre-Vista */, "Got 0x%08x\n", hr);
if(SUCCEEDED(hr))
{
IUnknown_Release(punk);
hr = IShellItem_BindToHandler(psi, NULL, &BHID_Transfer, &IID_ITransferDestination, (void**)&punk);
ok(hr == S_OK, "Got 0x%08x\n", hr);
if(SUCCEEDED(hr)) IUnknown_Release(punk);
hr = IShellItem_BindToHandler(psi, NULL, &BHID_Transfer, &IID_IUnknown, (void**)&punk);
ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* pre-Win8 */, "Got 0x%08x\n", hr);
if(SUCCEEDED(hr)) IUnknown_Release(punk);
}
/* BHID_EnumItems */
hr = IShellItem_BindToHandler(psi, NULL, &BHID_EnumItems, &IID_IEnumShellItems, (void**)&punk);