advapi32/tests: Add a input parameter check (CloseEventLog).
This commit is contained in:
parent
6bdbf6ee4c
commit
4af8e5f24d
|
@ -125,8 +125,15 @@ BOOL WINAPI ClearEventLogW( HANDLE hEventLog, LPCWSTR lpBackupFileName )
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI CloseEventLog( HANDLE hEventLog )
|
BOOL WINAPI CloseEventLog( HANDLE hEventLog )
|
||||||
{
|
{
|
||||||
FIXME("(%p) stub\n", hEventLog);
|
FIXME("(%p) stub\n", hEventLog);
|
||||||
return TRUE;
|
|
||||||
|
if (!hEventLog)
|
||||||
|
{
|
||||||
|
SetLastError(ERROR_INVALID_HANDLE);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
|
|
@ -34,13 +34,10 @@ static void test_open_close(void)
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = CloseEventLog(NULL);
|
ret = CloseEventLog(NULL);
|
||||||
todo_wine
|
|
||||||
{
|
|
||||||
ok(!ret, "Expected failure\n");
|
ok(!ret, "Expected failure\n");
|
||||||
ok(GetLastError() == ERROR_INVALID_HANDLE ||
|
ok(GetLastError() == ERROR_INVALID_HANDLE ||
|
||||||
GetLastError() == ERROR_NOACCESS, /* W2K */
|
GetLastError() == ERROR_NOACCESS, /* W2K */
|
||||||
"Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
|
"Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
|
||||||
}
|
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
handle = OpenEventLogA(NULL, NULL);
|
handle = OpenEventLogA(NULL, NULL);
|
||||||
|
|
Loading…
Reference in New Issue