Rob Shearman : ole32: Move the Running Object Table test in marshal. c to moniker.c to put it with the other ROT tests.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jan 10 05:35:52 CST 2007


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

Author: Rob Shearman <rob at codeweavers.com>
Date:   Tue Jan  9 17:14:53 2007 +0000

ole32: Move the Running Object Table test in marshal.c to moniker.c to put it with the other ROT tests.

---

 dlls/ole32/tests/marshal.c |   29 -----------------------------
 dlls/ole32/tests/moniker.c |   15 +++++++++++++++
 2 files changed, 15 insertions(+), 29 deletions(-)

diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c
index 9a30df4..f1d912e 100644
--- a/dlls/ole32/tests/marshal.c
+++ b/dlls/ole32/tests/marshal.c
@@ -2088,34 +2088,6 @@ static void test_out_of_process_com(void
     CloseHandle(heventShutdown);
 }
 
-static void test_ROT(void)
-{
-    static const WCHAR wszFileName[] = {'B','E','2','0','E','2','F','5','-',
-        '1','9','0','3','-','4','A','A','E','-','B','1','A','F','-',
-        '2','0','4','6','E','5','8','6','C','9','2','5',0};
-    HRESULT hr;
-    IMoniker *pMoniker = NULL;
-    IRunningObjectTable *pROT = NULL;
-    DWORD dwCookie;
-
-    cLocks = 0;
-
-    hr = CreateFileMoniker(wszFileName, &pMoniker);
-    ok_ole_success(hr, CreateClassMoniker);
-    hr = GetRunningObjectTable(0, &pROT);
-    ok_ole_success(hr, GetRunningObjectTable);
-    hr = IRunningObjectTable_Register(pROT, 0, (IUnknown*)&Test_ClassFactory, pMoniker, &dwCookie);
-    ok_ole_success(hr, IRunningObjectTable_Register);
-    IMoniker_Release(pMoniker);
-
-    ok_more_than_one_lock();
-
-    hr = IRunningObjectTable_Revoke(pROT, dwCookie);
-    ok_ole_success(hr, IRunningObjectTable_Revoke);
-
-    ok_no_locks();
-}
-
 struct git_params
 {
 	DWORD cookie;
@@ -2455,7 +2427,6 @@ START_TEST(marshal)
     /* doesn't pass with Win9x COM DLLs (even though Essential COM says it should) */
     if (0) test_out_of_process_com();
 
-    test_ROT();
     test_globalinterfacetable();
 
     test_CoGetInterfaceAndReleaseStream();
diff --git a/dlls/ole32/tests/moniker.c b/dlls/ole32/tests/moniker.c
index 2195750..6203ea6 100644
--- a/dlls/ole32/tests/moniker.c
+++ b/dlls/ole32/tests/moniker.c
@@ -584,6 +584,20 @@ static void test_ROT(void)
     hr = CreateFileMoniker(wszFileName, &pMoniker);
     ok_ole_success(hr, CreateClassMoniker);
 
+    /* test flags: 0 */
+    hr = IRunningObjectTable_Register(pROT, 0, (IUnknown*)&Test_ClassFactory,
+                                      pMoniker, &dwCookie);
+    ok_ole_success(hr, IRunningObjectTable_Register);
+    IMoniker_Release(pMoniker);
+
+    ok_more_than_one_lock();
+
+    hr = IRunningObjectTable_Revoke(pROT, dwCookie);
+    ok_ole_success(hr, IRunningObjectTable_Revoke);
+
+    ok_no_locks();
+
+    /* test flags: ROTFLAGS_REGISTRATIONKEEPSALIVE */
     hr = IRunningObjectTable_Register(pROT, ROTFLAGS_REGISTRATIONKEEPSALIVE,
         (IUnknown*)&Test_ClassFactory, pMoniker, &dwCookie);
     ok_ole_success(hr, IRunningObjectTable_Register);
@@ -595,6 +609,7 @@ static void test_ROT(void)
 
     ok_no_locks();
 
+    /* test flags: ROTFLAGS_REGISTRATIONKEEPSALIVE|ROTFLAGS_ALLOWANYCLIENT */
     /* only succeeds when process is started by SCM and has LocalService
      * or RunAs AppId values */
     hr = IRunningObjectTable_Register(pROT,




More information about the wine-cvs mailing list