Paul Vriens : advapi32/tests: Fix a test failure on W2K3 without a service pack.
Alexandre Julliard
julliard at winehq.org
Tue Nov 24 12:40:22 CST 2009
Module: wine
Branch: master
Commit: da92afa3e1c93d99c69e71fbe8d9209f2a5a41d0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=da92afa3e1c93d99c69e71fbe8d9209f2a5a41d0
Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date: Tue Nov 24 09:36:57 2009 +0100
advapi32/tests: Fix a test failure on W2K3 without a service pack.
---
dlls/advapi32/tests/eventlog.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/dlls/advapi32/tests/eventlog.c b/dlls/advapi32/tests/eventlog.c
index c6272ff..207fec5 100644
--- a/dlls/advapi32/tests/eventlog.c
+++ b/dlls/advapi32/tests/eventlog.c
@@ -741,6 +741,27 @@ static void test_readwrite(void)
return;
}
+ count = 0xdeadbeef;
+ GetNumberOfEventLogRecords(handle, &count);
+ if (count != 0)
+ {
+ /* Needed for W2K3 without a service pack */
+ win_skip("We most likely opened the Application eventlog\n");
+ CloseEventLog(handle);
+ Sleep(2000);
+
+ handle = OpenEventLogA(NULL, eventlogname);
+ count = 0xdeadbeef;
+ GetNumberOfEventLogRecords(handle, &count);
+ if (count != 0)
+ {
+ win_skip("We didn't open our new eventlog\n");
+ HeapFree(GetProcessHeap(), 0, user);
+ CloseEventLog(handle);
+ return;
+ }
+ }
+
SetLastError(0xdeadbeef);
ret = ReportEvent(handle, 0x20, 0, 0, NULL, 0, 0, NULL, NULL);
if (!ret && GetLastError() == ERROR_CRC)
More information about the wine-cvs
mailing list