Module: wine
Branch: master
Commit: 91648ff4beaf8bf6e90c9e9b2caaf19da16c641f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=91648ff4beaf8bf6e90c9e9b2…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com>
Date: Tue Nov 24 08:53:18 2009 +0100
advapi32/tests: Fix an intermittent crash on NT4.
---
dlls/advapi32/tests/eventlog.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/dlls/advapi32/tests/eventlog.c b/dlls/advapi32/tests/eventlog.c
index e71f823..c6272ff 100644
--- a/dlls/advapi32/tests/eventlog.c
+++ b/dlls/advapi32/tests/eventlog.c
@@ -733,6 +733,13 @@ static void test_readwrite(void)
* but succeed on all others, hence it's not part of the struct.
*/
handle = OpenEventLogA(NULL, eventlogname);
+ if (!handle)
+ {
+ /* Intermittently seen on NT4 when tests are run immediately after boot */
+ win_skip("Could not get a handle to the eventlog\n");
+ HeapFree(GetProcessHeap(), 0, user);
+ return;
+ }
SetLastError(0xdeadbeef);
ret = ReportEvent(handle, 0x20, 0, 0, NULL, 0, 0, NULL, NULL);
Module: wine
Branch: master
Commit: 8554ce5b18e8d7a23af20b3eeb3a97f779369fa7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8554ce5b18e8d7a23af20b3ee…
Author: Rob Shearman <robertshearman(a)gmail.com>
Date: Mon Nov 23 21:52:22 2009 +0000
ole32: Add tests for errors returned by CoCreateInstance for classes that are not registered.
---
dlls/ole32/tests/compobj.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c
index e868014..21293bc 100644
--- a/dlls/ole32/tests/compobj.c
+++ b/dlls/ole32/tests/compobj.c
@@ -261,6 +261,18 @@ static void test_CoCreateInstance(void)
ok(pUnk == NULL, "CoCreateInstance should have changed the passed in pointer to NULL, instead of %p\n", pUnk);
OleInitialize(NULL);
+
+ /* test errors returned for non-registered clsids */
+ hr = CoCreateInstance(&CLSID_non_existent, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk);
+ ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance for non-registered inproc server should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr);
+ hr = CoCreateInstance(&CLSID_non_existent, NULL, CLSCTX_INPROC_HANDLER, &IID_IUnknown, (void **)&pUnk);
+ ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance for non-registered inproc handler should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr);
+ hr = CoCreateInstance(&CLSID_non_existent, NULL, CLSCTX_LOCAL_SERVER, &IID_IUnknown, (void **)&pUnk);
+ ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance for non-registered local server should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr);
+ hr = CoCreateInstance(&CLSID_non_existent, NULL, CLSCTX_REMOTE_SERVER, &IID_IUnknown, (void **)&pUnk);
+ todo_wine
+ ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance for non-registered remote server should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr);
+
hr = CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk);
if(hr == REGDB_E_CLASSNOTREG)
{