Hans Leidekker : msi: Test the reference count on the installer object retrieved from a session object .

Alexandre Julliard julliard at winehq.org
Thu May 20 11:03:02 CDT 2010


Module: wine
Branch: master
Commit: e16f1877915a988cd02b574250285759a07ffd59
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e16f1877915a988cd02b574250285759a07ffd59

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Thu May 20 12:02:22 2010 +0200

msi: Test the reference count on the installer object retrieved from a session object.

---

 dlls/msi/tests/automation.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c
index 99fb778..c7c8926 100644
--- a/dlls/msi/tests/automation.c
+++ b/dlls/msi/tests/automation.c
@@ -1815,6 +1815,7 @@ static void test_Session(IDispatch *pSession)
     BOOL bool;
     int myint;
     IDispatch *pDatabase = NULL, *pInst = NULL, *record = NULL;
+    ULONG refs_before, refs_after;
     HRESULT hr;
 
     /* Session::Installer */
@@ -1822,6 +1823,14 @@ static void test_Session(IDispatch *pSession)
     ok(hr == S_OK, "Session_Installer failed, hresult 0x%08x\n", hr);
     ok(pInst != NULL, "Session_Installer returned NULL IDispatch pointer\n");
     ok(pInst == pInstaller, "Session_Installer does not match Installer instance from CoCreateInstance\n");
+    refs_before = IDispatch_AddRef(pInst);
+
+    hr = Session_Installer(pSession, &pInst);
+    ok(hr == S_OK, "Session_Installer failed, hresult 0x%08x\n", hr);
+    ok(pInst != NULL, "Session_Installer returned NULL IDispatch pointer\n");
+    ok(pInst == pInstaller, "Session_Installer does not match Installer instance from CoCreateInstance\n");
+    refs_after = IDispatch_Release(pInst);
+    ok(refs_before == refs_after, "got %u and %u\n", refs_before, refs_after);
 
     /* Session::Property, get */
     memset(stringw, 0, sizeof(stringw));




More information about the wine-cvs mailing list