advapi32/tests: Cope with empty servername.

This commit is contained in:
Paul Vriens 2009-10-27 10:27:28 +01:00 committed by Alexandre Julliard
parent 84d689bd58
commit 6bdbf6ee4c
2 changed files with 6 additions and 1 deletions
dlls/advapi32

View File

@ -324,7 +324,7 @@ HANDLE WINAPI OpenEventLogW( LPCWSTR uncname, LPCWSTR source )
return NULL;
}
if (uncname)
if (uncname && uncname[0])
{
FIXME("Remote server not supported\n");
SetLastError(RPC_S_SERVER_UNAVAILABLE);

View File

@ -73,6 +73,11 @@ static void test_open_close(void)
ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
}
/* Empty servername should be read as local server */
handle = OpenEventLogA("", "Application");
ok(handle != NULL, "Expected a handle\n");
CloseEventLog(handle);
handle = OpenEventLogA(NULL, "Application");
ok(handle != NULL, "Expected a handle\n");
CloseEventLog(handle);