Author: spetreolle
Date: Fri Jan 1 15:41:44 2010
New Revision: 44852
URL:
http://svn.reactos.org/svn/reactos?rev=44852&view=rev
Log:
Add GetEventLogInformation stub.
Add parameter checks for GetNumberOfEventLogRecords and GetOldestEventLogRecord.
Fixes 3 crashes for advapi32:eventlog winetest.
Modified:
trunk/reactos/dll/win32/advapi32/advapi32.spec
trunk/reactos/dll/win32/advapi32/service/eventlog.c
trunk/reactos/include/psdk/winbase.h
Modified: trunk/reactos/dll/win32/advapi32/advapi32.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/advapi3…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/advapi32.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/advapi32.spec [iso-8859-1] Fri Jan 1 15:41:44 2010
@@ -236,7 +236,7 @@
@ stdcall GetCurrentHwProfileW(ptr)
@ stdcall GetEffectiveRightsFromAclA(ptr ptr ptr)
@ stdcall GetEffectiveRightsFromAclW(ptr ptr ptr)
-@ stub GetEventLogInformation
+@ stdcall GetEventLogInformation(long long ptr long ptr)
@ stdcall GetExplicitEntriesFromAclA(ptr ptr ptr) advapi32.GetExplicitEntriesFromAclW
@ stdcall GetExplicitEntriesFromAclW(ptr ptr ptr)
@ stdcall GetFileSecurityA(str long ptr long ptr)
Modified: trunk/reactos/dll/win32/advapi32/service/eventlog.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/service…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/service/eventlog.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/service/eventlog.c [iso-8859-1] Fri Jan 1 15:41:44
2010
@@ -361,6 +361,29 @@
/******************************************************************************
+ * GetEventLogInformation [ADVAPI32.@]
+ *
+ * PARAMS
+ * hEventLog [I] Handle to event log
+ * dwInfoLevel [I] Level of event log information to return
+ * lpBuffer [O] Buffer that receives the event log information
+ * cbBufSize [I] Size of the lpBuffer buffer
+ * pcbBytesNeeded [O] Required buffer size
+ */
+BOOL WINAPI
+GetEventLogInformation(IN HANDLE hEventLog,
+ IN DWORD dwInfoLevel,
+ OUT LPVOID lpBuffer,
+ IN DWORD cbBufSize,
+ OUT LPDWORD pcbBytesNeeded)
+{
+ UNIMPLEMENTED;
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return FALSE;
+}
+
+
+/******************************************************************************
* GetNumberOfEventLogRecords [ADVAPI32.@]
*
* PARAMS
@@ -376,6 +399,12 @@
TRACE("%p, %p\n", hEventLog, NumberOfRecords);
+ if(!NumberOfRecords)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
RpcTryExcept
{
Status = ElfrNumberOfRecords(hEventLog,
@@ -415,6 +444,12 @@
TRACE("%p, %p\n", hEventLog, OldestRecord);
+ if(!OldestRecord)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
RpcTryExcept
{
Status = ElfrOldestRecord(hEventLog,
Modified: trunk/reactos/include/psdk/winbase.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winbase.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/winbase.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/winbase.h [iso-8859-1] Fri Jan 1 15:41:44 2010
@@ -1628,6 +1628,7 @@
#if (_WIN32_WINNT >= 0x0501)
VOID WINAPI GetNativeSystemInfo(LPSYSTEM_INFO);
#endif
+BOOL WINAPI GetEventLogInformation(HANDLE,DWORD,LPVOID,DWORD,LPDWORD);
BOOL WINAPI GetNumberOfEventLogRecords(HANDLE,PDWORD);
BOOL WINAPI GetOldestEventLogRecord(HANDLE,PDWORD);
BOOL WINAPI GetOverlappedResult(HANDLE,LPOVERLAPPED,PDWORD,BOOL);