shell32/tests: Use proper method macros.

This commit is contained in:
Nikolay Sivov 2012-08-24 13:17:20 +04:00 committed by Alexandre Julliard
parent 1552e22b0b
commit 96005d17d5
5 changed files with 15 additions and 14 deletions

View File

@ -43,19 +43,19 @@ static void test_IQueryAssociations_QueryInterface(void)
return;
}
hr = IUnknown_QueryInterface(qa, &IID_IQueryAssociations, (void**)&qa2);
hr = IQueryAssociations_QueryInterface(qa, &IID_IQueryAssociations, (void**)&qa2);
ok(hr == S_OK, "QueryInterface (IQueryAssociations) returned 0x%x\n", hr);
if (SUCCEEDED(hr)) {
IUnknown_Release(qa2);
IQueryAssociations_Release(qa2);
}
hr = IUnknown_QueryInterface(qa, &IID_IUnknown, (void**)&unk);
hr = IQueryAssociations_QueryInterface(qa, &IID_IUnknown, (void**)&unk);
ok(hr == S_OK, "QueryInterface (IUnknown) returned 0x%x\n", hr);
if (SUCCEEDED(hr)) {
IUnknown_Release(unk);
}
hr = IUnknown_QueryInterface(qa, &IID_IUnknown, NULL);
hr = IQueryAssociations_QueryInterface(qa, &IID_IUnknown, NULL);
ok(hr == E_POINTER, "got 0x%x (expected E_POINTER)\n", hr);
IQueryAssociations_Release(qa);
@ -78,19 +78,20 @@ static void test_IApplicationAssociationRegistration_QueryInterface(void)
return;
}
hr = IUnknown_QueryInterface(appreg, &IID_IApplicationAssociationRegistration, (void**)&appreg2);
hr = IApplicationAssociationRegistration_QueryInterface(appreg, &IID_IApplicationAssociationRegistration,
(void**)&appreg2);
ok(hr == S_OK, "QueryInterface (IApplicationAssociationRegistration) returned 0x%x\n", hr);
if (SUCCEEDED(hr)) {
IUnknown_Release(appreg2);
IApplicationAssociationRegistration_Release(appreg2);
}
hr = IUnknown_QueryInterface(appreg, &IID_IUnknown, (void**)&unk);
hr = IApplicationAssociationRegistration_QueryInterface(appreg, &IID_IUnknown, (void**)&unk);
ok(hr == S_OK, "QueryInterface (IUnknown) returned 0x%x\n", hr);
if (SUCCEEDED(hr)) {
IUnknown_Release(unk);
}
hr = IUnknown_QueryInterface(appreg, &IID_IUnknown, NULL);
hr = IApplicationAssociationRegistration_QueryInterface(appreg, &IID_IUnknown, NULL);
ok(hr == E_POINTER, "got 0x%x (expected E_POINTER)\n", hr);
IApplicationAssociationRegistration_Release(appreg);

View File

@ -360,7 +360,7 @@ static void test_service(void)
ok(V_BOOL(&v) == VARIANT_FALSE, "got %d\n", V_BOOL(&v));
SysFreeString(name);
IShellDispatch_Release(sd);
IShellDispatch2_Release(sd);
}
START_TEST(shelldispatch)

View File

@ -417,7 +417,7 @@ void create_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int save_fails)
lok(r == S_OK, "SetHotkey failed (0x%08x)\n", r);
}
r = IShellLinkW_QueryInterface(sl, &IID_IPersistFile, (LPVOID*)&pf);
r = IShellLinkA_QueryInterface(sl, &IID_IPersistFile, (void**)&pf);
lok(r == S_OK, "no IID_IPersistFile (0x%08x)\n", r);
if (r == S_OK)
{
@ -902,7 +902,7 @@ if (0)
LocalFree( dar );
IUnknown_Release( dl );
IShellLinkDataList_Release( dl );
IShellLinkW_Release( sl );
}

View File

@ -796,7 +796,7 @@ static void test_GetDisplayName(void)
broken(hr == S_OK), /* Win9x, W2K */
"hr = %08x\n", hr);
if (hr == S_OK) {
IShellFolder_Release(psfFile);
IUnknown_Release(psfFile);
}
if (!pSHBindToParent)

View File

@ -170,7 +170,7 @@ static HRESULT WINAPI IDataObjectImpl_QueryInterface(IDataObject *iface, REFIID
if(*ppvObj)
{
IUnknown_AddRef(iface);
IDataObject_AddRef(iface);
return S_OK;
}
@ -302,7 +302,7 @@ static HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface,
if(*ppvObj)
{
IUnknown_AddRef(iface);
IShellBrowser_AddRef(iface);
return S_OK;
}