shell32/tests: Use proper method macros

Nikolay Sivov nsivov at codeweavers.com
Fri Aug 24 04:28:11 CDT 2012


Use proper method macros
-------------- next part --------------
>From aa6708ecb1c35268f9bc790cc1fa77802bba1f4f Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov at codeweavers.com>
Date: Fri, 24 Aug 2012 13:17:20 +0400
Subject: [PATCH 5/6] Use proper method macros

---
 dlls/shell32/tests/assoc.c         |   17 +++++++++--------
 dlls/shell32/tests/shelldispatch.c |    2 +-
 dlls/shell32/tests/shelllink.c     |    4 ++--
 dlls/shell32/tests/shlfolder.c     |    2 +-
 dlls/shell32/tests/shlview.c       |    4 ++--
 5 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/dlls/shell32/tests/assoc.c b/dlls/shell32/tests/assoc.c
index 488f8e9..29524dc 100644
--- a/dlls/shell32/tests/assoc.c
+++ b/dlls/shell32/tests/assoc.c
@@ -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);
diff --git a/dlls/shell32/tests/shelldispatch.c b/dlls/shell32/tests/shelldispatch.c
index 9d8d70b..0c49674 100644
--- a/dlls/shell32/tests/shelldispatch.c
+++ b/dlls/shell32/tests/shelldispatch.c
@@ -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)
diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c
index 8c6275d..f2f33aa 100644
--- a/dlls/shell32/tests/shelllink.c
+++ b/dlls/shell32/tests/shelllink.c
@@ -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 );
 }
 
diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c
index f34bb70..ef8aae9 100644
--- a/dlls/shell32/tests/shlfolder.c
+++ b/dlls/shell32/tests/shlfolder.c
@@ -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)
diff --git a/dlls/shell32/tests/shlview.c b/dlls/shell32/tests/shlview.c
index 6e97499..554e086 100644
--- a/dlls/shell32/tests/shlview.c
+++ b/dlls/shell32/tests/shlview.c
@@ -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;
     }
 
-- 
1.5.6.5



More information about the wine-patches mailing list