Commit 4af8e5f2 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

advapi32/tests: Add a input parameter check (CloseEventLog).

parent 6bdbf6ee
......@@ -125,8 +125,15 @@ BOOL WINAPI ClearEventLogW( HANDLE hEventLog, LPCWSTR lpBackupFileName )
*/
BOOL WINAPI CloseEventLog( HANDLE hEventLog )
{
FIXME("(%p) stub\n", hEventLog);
return TRUE;
FIXME("(%p) stub\n", hEventLog);
if (!hEventLog)
{
SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
return TRUE;
}
/******************************************************************************
......
......@@ -34,13 +34,10 @@ static void test_open_close(void)
SetLastError(0xdeadbeef);
ret = CloseEventLog(NULL);
todo_wine
{
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_HANDLE ||
GetLastError() == ERROR_NOACCESS, /* W2K */
"Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
}
SetLastError(0xdeadbeef);
handle = OpenEventLogA(NULL, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment