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

This commit is contained in:
Paul Vriens 2009-10-27 10:37:07 +01:00 committed by Alexandre Julliard
parent 6bdbf6ee4c
commit 4af8e5f24d
2 changed files with 9 additions and 5 deletions

View File

@ -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;
}
/******************************************************************************

View File

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