advapi32/tests: Fix a test failure on W2K3 without a service pack.

This commit is contained in:
Paul Vriens 2009-11-24 09:36:57 +01:00 committed by Alexandre Julliard
parent 91648ff4be
commit da92afa3e1
1 changed files with 21 additions and 0 deletions

View File

@ -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)