Author: hpoussin
Date: Sun May 18 10:29:53 2008
New Revision: 33585
URL:
http://svn.reactos.org/svn/reactos?rev=33585&view=rev
Log:
Make eventlog RPC interface more compatible with MS Windows
Modified:
trunk/reactos/base/services/eventlog/rpc.c
trunk/reactos/dll/win32/advapi32/service/eventlog.c
trunk/reactos/include/reactos/idl/eventlogrpc.idl
Modified: trunk/reactos/base/services/eventlog/rpc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/rpc…
==============================================================================
--- trunk/reactos/base/services/eventlog/rpc.c [iso-8859-1] (original)
+++ trunk/reactos/base/services/eventlog/rpc.c [iso-8859-1] Sun May 18 10:29:53 2008
@@ -10,15 +10,6 @@
#include "eventlog.h"
-#ifdef __GNUC__
-/* HACK as long as idl compiler doesn't support well PUNICODE_STRING args */
-#define PANSI_STRING LPSTR
-#define PUNICODE_STRING LPWSTR
-#define BINDING_HANDLE handle_t BindingHandle,
-#else
-#define BINDING_HANDLE
-#endif
-
/* FUNCTIONS ****************************************************************/
DWORD STDCALL RpcThreadRoutine(LPVOID lpParameter)
@@ -50,169 +41,168 @@
return 0;
}
-/* Function 0x00 */
+
+/* Function 0 */
NTSTATUS ElfrClearELFW(
- BINDING_HANDLE
- /* [in] */ LOGHANDLE Handle,
- /* [in] */ PUNICODE_STRING BackupName)
-{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-/* Function 0x01 */
+ handle_t BindingHandle,
+ IELF_HANDLE LogHandle,
+ PRPC_UNICODE_STRING BackupFileName)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/* Function 1 */
NTSTATUS ElfrBackupELFW(
- BINDING_HANDLE
- /* [in] */ LOGHANDLE Handle,
- /* [in] */ PUNICODE_STRING BackupName)
-{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-
-/* Function 0x02 */
+ handle_t BindingHandle,
+ IELF_HANDLE LogHandle,
+ PRPC_UNICODE_STRING BackupFileName)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/* Function 2 */
NTSTATUS ElfrCloseEL(
- BINDING_HANDLE
- /* [out][in] */ PLOGHANDLE Handle)
-{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-
-/* Function 0x03 */
+ handle_t BindingHandle,
+ IELF_HANDLE *LogHandle)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/* Function 3 */
NTSTATUS ElfrDeregisterEventSource(
- BINDING_HANDLE
- /* [out][in] */ PLOGHANDLE Handle)
+ handle_t BindingHandle,
+ IELF_HANDLE *LogHandle)
{
UNIMPLEMENTED;
return STATUS_SUCCESS;
}
-/* Function 0x04 */
+/* Function 4 */
NTSTATUS ElfrNumberOfRecords(
- BINDING_HANDLE
- /* [in] */ LOGHANDLE Handle,
- /* [out] */ long __RPC_FAR * NumberOfRecords)
-{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-
-/* Function 0x05 */
+ handle_t BindingHandle,
+ IELF_HANDLE LogHandle,
+ DWORD *NumberOfRecords)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/* Function 5 */
NTSTATUS ElfrOldestRecord(
- BINDING_HANDLE
- /* [in] */ LOGHANDLE LogHandle,
- /* [out] */ long __RPC_FAR * OldestRecNumber)
-{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-
-/* Function 0x06 */
-NTSTATUS ElfrChangeNotify(void)
-{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-
-/* Function 0x07 */
+ handle_t BindingHandle,
+ IELF_HANDLE LogHandle,
+ DWORD *OldestRecordNumber)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/* Function 6 */
+NTSTATUS ElfrChangeNotify(
+ handle_t BindingHandle,
+ IELF_HANDLE *LogHandle,
+ RPC_CLIENT_ID ClientId,
+ DWORD Event)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/* Function 7 */
NTSTATUS ElfrOpenELW(
- BINDING_HANDLE
- /* [unique][in] */ LPWSTR ServerName,
- /* [in] */ PUNICODE_STRING FileName,
- /* [in] */ PUNICODE_STRING NullStr,
- /* [in] */ long MajorVer,
- /* [in] */ long MinorVer,
- /* [out] */ PLOGHANDLE Handle)
-{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-
-/* Function 0x08 */
+ handle_t BindingHandle,
+ EVENTLOG_HANDLE_W UNCServerName,
+ PRPC_UNICODE_STRING ModuleName,
+ PRPC_UNICODE_STRING RegModuleName,
+ DWORD MajorVersion,
+ DWORD MinorVersion,
+ IELF_HANDLE *LogHandle)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/* Function 8 */
NTSTATUS ElfrRegisterEventSourceW(
- BINDING_HANDLE
- /* [unique][in] */ LPWSTR ServerName,
- /* [in] */ PUNICODE_STRING LogName,
- /* [in] */ PUNICODE_STRING NullStr,
- /* [in] */ long MajorVer,
- /* [in] */ long MinorVer,
- /* [out] */ PLOGHANDLE Handle)
-{
- UNIMPLEMENTED;
- *Handle = 1;
+ handle_t BindingHandle,
+ EVENTLOG_HANDLE_W UNCServerName,
+ PRPC_UNICODE_STRING ModuleName,
+ PRPC_UNICODE_STRING RegModuleName,
+ DWORD MajorVersion,
+ DWORD MinorVersion,
+ IELF_HANDLE *LogHandle)
+{
+ UNIMPLEMENTED;
+ *LogHandle = 1;
return STATUS_SUCCESS;
}
-/* Function 0x09 */
+/* Function 9 */
NTSTATUS ElfrOpenBELW(
- BINDING_HANDLE
- /* [unique][in] */ LPWSTR ServerName,
- /* [in] */ PUNICODE_STRING BackupName,
- /* [in] */ long MajorVer,
- /* [in] */ long MinorVer,
- /* [out] */ PLOGHANDLE Handle)
-{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-
-/* Function 0x0a */
+ handle_t BindingHandle,
+ EVENTLOG_HANDLE_W UNCServerName,
+ PRPC_UNICODE_STRING BackupFileName,
+ DWORD MajorVersion,
+ DWORD MinorVersion,
+ IELF_HANDLE *LogHandle)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/* Function 10 */
NTSTATUS ElfrReadELW(
- BINDING_HANDLE
- /* [in] */ LOGHANDLE Handle,
- /* [in] */ long Flags,
- /* [in] */ long Offset,
- /* [in] */ long BufSize,
- /* [size_is][out] */unsigned char __RPC_FAR * Buffer,
- /* [out] */ long __RPC_FAR * BytesRead,
- /* [out] */ long __RPC_FAR * BytesNeeded)
-{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-
-/* Function 0x0b */
+ handle_t BindingHandle,
+ IELF_HANDLE LogHandle,
+ DWORD ReadFlags,
+ DWORD RecordOffset,
+ RULONG NumberOfBytesToRead,
+ BYTE *Buffer,
+ DWORD *NumberOfBytesRead,
+ DWORD *MinNumberOfBytesNeeded)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/* Function 11 */
NTSTATUS ElfrReportEventW(
- BINDING_HANDLE
- /* [in] */ LOGHANDLE Handle,
- /* [in] */ long Time,
- /* [in] */ short Type,
- /* [in] */ short Category,
- /* [in] */ long ID,
- /* [in] */ short NumStrings,
- /* [in] */ long DataSize,
- /* [in] */ PUNICODE_STRING ComputerName,
- /* [unique][in] */ unsigned char __RPC_FAR * SID,
- /* [unique][size_is][in] */ PUNICODE_STRING __RPC_FAR Strings[],
- /* [unique][size_is][in] */ unsigned char __RPC_FAR * Data,
- /* [in] */ short Flags,
- /* [unique][out][in] */ long __RPC_FAR * unknown1,
- /* [unique][out][in] */ long __RPC_FAR * unknown2)
-{
- short i;
+ handle_t BindingHandle,
+ IELF_HANDLE LogHandle,
+ DWORD Time,
+ USHORT EventType,
+ USHORT EventCategory,
+ DWORD EventID,
+ USHORT NumStrings,
+ DWORD DataSize,
+ PRPC_UNICODE_STRING ComputerName,
+ PRPC_SID UserSID,
+ PRPC_UNICODE_STRING Strings[],
+ BYTE *Data,
+ USHORT Flags,
+ DWORD *RecordNumber,
+ DWORD *TimeWritten)
+{
+ USHORT i;
/* partial stub */
-
- if (NumStrings == 0)
- return STATUS_SUCCESS;
-
- if (Strings == NULL)
- return STATUS_SUCCESS;
-
for (i = 0; i < NumStrings; i++)
{
- switch (Type)
+ switch (EventType)
{
case EVENTLOG_SUCCESS:
DPRINT1("Success: %S\n", Strings[i]);
@@ -231,7 +221,7 @@
break;
default:
- DPRINT1("Type %hu: %S\n", Type, Strings[i]);
+ DPRINT1("Type %hu: %S\n", EventType, Strings[i]);
break;
}
}
@@ -240,184 +230,236 @@
}
-/* Function 0x0c */
+/* Function 12 */
NTSTATUS ElfrClearELFA(
- BINDING_HANDLE
- /* [in] */ LOGHANDLE Handle,
- /* [unique][in] */ PANSI_STRING BackupName)
-{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-
-/* Function 0x0d */
+ handle_t BindingHandle,
+ IELF_HANDLE LogHandle,
+ PRPC_STRING BackupFileName)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/* Function 13 */
NTSTATUS ElfrBackupELFA(
- BINDING_HANDLE
- /* [in] */ LOGHANDLE Handle,
- /* [in] */ PANSI_STRING BackupName)
-{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-
-/* Function 0x0e */
+ handle_t BindingHandle,
+ IELF_HANDLE LogHandle,
+ PRPC_STRING BackupFileName)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/* Function 14 */
NTSTATUS ElfrOpenELA(
- BINDING_HANDLE
- /* [unique][in] */ LPSTR ServerName,
- /* [in] */ PANSI_STRING LogName,
- /* [in] */ PANSI_STRING NullStr,
- /* [in] */ long MajorVer,
- /* [in] */ long MinorVer,
- /* [out] */ PLOGHANDLE Handle)
-{
- UNICODE_STRING logname = { 0, }, servername = { 0, }, StrNull = { 0, };
- NTSTATUS status;
-
- if (LogName && !RtlCreateUnicodeStringFromAsciiz(&logname, LogName))
+ handle_t BindingHandle,
+ EVENTLOG_HANDLE_A UNCServerName,
+ PRPC_STRING ModuleName,
+ PRPC_STRING RegModuleName,
+ DWORD MajorVersion,
+ DWORD MinorVersion,
+ IELF_HANDLE *LogHandle)
+{
+ UNICODE_STRING UNCServerNameW = { 0, };
+ UNICODE_STRING ModuleNameW = { 0, };
+ UNICODE_STRING RegModuleNameW = { 0, };
+ NTSTATUS Status;
+
+ if (UNCServerName &&
+ !RtlCreateUnicodeStringFromAsciiz(&UNCServerNameW, UNCServerName))
{
return STATUS_NO_MEMORY;
}
- if (ServerName &&
- !RtlCreateUnicodeStringFromAsciiz(&servername, ServerName))
- {
- RtlFreeUnicodeString(&logname);
+ if (ModuleName &&
+ !RtlAnsiStringToUnicodeString(&ModuleNameW, (PANSI_STRING)ModuleName, TRUE))
+ {
+ RtlFreeUnicodeString(&UNCServerNameW);
return STATUS_NO_MEMORY;
}
- status = ElfrOpenELW(BindingHandle, servername.Buffer, logname.Buffer,
- StrNull.Buffer, MajorVer, MinorVer, Handle);
-
- RtlFreeUnicodeString(&servername);
- RtlFreeUnicodeString(&logname);
-
- return status;
-}
-
-
-/* Function 0x0f */
+ if (RegModuleName &&
+ !RtlAnsiStringToUnicodeString(&RegModuleNameW, (PANSI_STRING)RegModuleName,
TRUE))
+ {
+ RtlFreeUnicodeString(&UNCServerNameW);
+ RtlFreeUnicodeString(&ModuleNameW);
+ return STATUS_NO_MEMORY;
+ }
+
+ Status = ElfrOpenELW(
+ BindingHandle,
+ UNCServerName ? UNCServerNameW.Buffer : NULL,
+ ModuleName ? (PRPC_UNICODE_STRING)&ModuleNameW : NULL,
+ RegModuleName ? (PRPC_UNICODE_STRING)&RegModuleNameW : NULL,
+ MajorVersion,
+ MinorVersion,
+ LogHandle);
+
+ RtlFreeUnicodeString(&UNCServerNameW);
+ RtlFreeUnicodeString(&ModuleNameW);
+ RtlFreeUnicodeString(&RegModuleNameW);
+
+ return Status;
+}
+
+
+/* Function 15 */
NTSTATUS ElfrRegisterEventSourceA(
- BINDING_HANDLE
- /* [unique][in] */ LPSTR ServerName,
- /* [in] */ PANSI_STRING LogName,
- /* [in] */ PANSI_STRING NullStr,
- /* [in] */ long MajorVer,
- /* [in] */ long MinorVer,
- /* [out] */ PLOGHANDLE Handle)
-{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-
-/* Function 0x10 */
+ handle_t BindingHandle,
+ EVENTLOG_HANDLE_A UNCServerName,
+ PRPC_STRING ModuleName,
+ PRPC_STRING RegModuleName,
+ DWORD MajorVersion,
+ DWORD MinorVersion,
+ IELF_HANDLE *LogHandle)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/* Function 16 */
NTSTATUS ElfrOpenBELA(
- BINDING_HANDLE
- /* [unique][in] */ LPSTR ServerName,
- /* [in] */ PANSI_STRING BakckupName,
- /* [in] */ long MajorVer,
- /* [in] */ long MinorVer,
- /* [out] */ PLOGHANDLE Handle)
-{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-
-/* Function 0x11 */
+ handle_t BindingHandle,
+ EVENTLOG_HANDLE_A UNCServerName,
+ PRPC_STRING BackupFileName,
+ DWORD MajorVersion,
+ DWORD MinorVersion,
+ IELF_HANDLE *LogHandle)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/* Function 17 */
NTSTATUS ElfrReadELA(
- BINDING_HANDLE
- /* [in] */ LOGHANDLE Handle,
- /* [in] */ long Flags,
- /* [in] */ long Offset,
- /* [in] */ long BufSize,
- /* [size_is][out] */unsigned char __RPC_FAR * Buffer,
- /* [out] */ long __RPC_FAR * BytesRead,
- /* [out] */ long __RPC_FAR * BytesNeeded)
-{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-
-/* Function 0x12 */
+ handle_t BindingHandle,
+ IELF_HANDLE LogHandle,
+ DWORD ReadFlags,
+ DWORD RecordOffset,
+ RULONG NumberOfBytesToRead,
+ BYTE *Buffer,
+ DWORD *NumberOfBytesRead,
+ DWORD *MinNumberOfBytesNeeded)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/* Function 18 */
NTSTATUS ElfrReportEventA(
- BINDING_HANDLE
- /* [in] */ LOGHANDLE Handle,
- /* [in] */ long Time,
- /* [in] */ short Type,
- /* [in] */ short Category,
- /* [in] */ long ID,
- /* [in] */ short NumStrings,
- /* [in] */ long DataSize,
- /* [in] */ PANSI_STRING ComputerName,
- /* [unique][in] */ unsigned char __RPC_FAR * SID,
- /* [unique][size_is][in] */ PANSI_STRING __RPC_FAR Strings[],
- /* [unique][size_is][in] */ unsigned char __RPC_FAR * Data,
- /* [in] */ short Flags,
- /* [unique][out][in] */ long __RPC_FAR * unknown1,
- /* [unique][out][in] */ long __RPC_FAR * unknown2)
-{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-
-/* Function 0x13 */
-NTSTATUS ElfrRegisterClusterSvc(void)
-{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-
-/* Function 0x14 */
-NTSTATUS ElfrDeregisterClusterSvc(void)
-{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-
-/* Function 0x15 */
-NTSTATUS ElfrWriteClusterEvents(void)
-{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-
-/* Function 0x16 */
+ handle_t BindingHandle,
+ IELF_HANDLE LogHandle,
+ DWORD Time,
+ USHORT EventType,
+ USHORT EventCategory,
+ DWORD EventID,
+ USHORT NumStrings,
+ DWORD DataSize,
+ PRPC_STRING ComputerName,
+ PRPC_SID UserSID,
+ PRPC_STRING Strings[],
+ BYTE *Data,
+ USHORT Flags,
+ DWORD *RecordNumber,
+ DWORD *TimeWritten)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/* Function 19 */
+NTSTATUS ElfrRegisterClusterSvc(
+ handle_t BindingHandle)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/* Function 20 */
+NTSTATUS ElfrDeregisterClusterSvc(
+ handle_t BindingHandle)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/* Function 21 */
+NTSTATUS ElfrWriteClusterEvents(
+ handle_t BindingHandle)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/* Function 22 */
NTSTATUS ElfrGetLogInformation(
- BINDING_HANDLE
- /* [in] */ LOGHANDLE Handle,
- /* [in] */ long InfoLevel,
- /* [size_is][out] */unsigned char __RPC_FAR * Buffer,
- /* [in] */ long BufSize,
- /* [out] */ long __RPC_FAR * BytesNeeded)
-{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-}
-
-
-/* Function 0x17 */
+ handle_t BindingHandle,
+ IELF_HANDLE LogHandle,
+ DWORD InfoLevel,
+ BYTE *Buffer,
+ DWORD cbBufSize,
+ DWORD *pcbBytesNeeded)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/* Function 23 */
NTSTATUS ElfrFlushEL(
- BINDING_HANDLE
- /* [in] */ LOGHANDLE Handle)
-{
- DbgPrint("EventLogFlush UNIMPLEMENTED\n");
- return STATUS_NOT_IMPLEMENTED;
-}
+ handle_t BindingHandle,
+ IELF_HANDLE LogHandle)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+
+/* Function 24 */
+NTSTATUS ElfrReportEventAndSourceW(
+ handle_t BindingHandle,
+ IELF_HANDLE LogHandle,
+ DWORD Time,
+ USHORT EventType,
+ USHORT EventCategory,
+ ULONG EventID,
+ PRPC_UNICODE_STRING SourceName,
+ USHORT NumStrings,
+ DWORD DataSize,
+ PRPC_UNICODE_STRING ComputerName,
+ PRPC_SID UserSID,
+ PRPC_UNICODE_STRING Strings[],
+ BYTE *Data,
+ USHORT Flags,
+ DWORD *RecordNumber,
+ DWORD *TimeWritten)
+{
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
void __RPC_FAR *__RPC_USER midl_user_allocate(size_t len)
{
return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
}
+
void __RPC_USER midl_user_free(void __RPC_FAR * ptr)
{
HeapFree(GetProcessHeap(), 0, ptr);
}
+
+
+void __RPC_USER IELF_HANDLE_rundown(IELF_HANDLE LogHandle)
+{
+}
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] Sun May 18 10:29:53
2008
@@ -30,7 +30,7 @@
typedef struct _LOG_INFO
{
RPC_BINDING_HANDLE BindingHandle;
- LOGHANDLE LogHandle;
+ IELF_HANDLE LogHandle;
BOOL bLocal;
} LOG_INFO, *PLOG_INFO;
@@ -44,11 +44,13 @@
{
PLOG_INFO pLog;
NTSTATUS Status;
- ANSI_STRING BackupFileName;
+ RPC_STRING BackupFileName;
TRACE("%p, %s\n", hEventLog, lpBackupFileName);
- RtlInitAnsiString(&BackupFileName, lpBackupFileName);
+ BackupFileName.Buffer = (LPSTR)lpBackupFileName;
+ BackupFileName.Length = BackupFileName.MaximumLength =
+ lpBackupFileName ? strlen(lpBackupFileName) : 0;
pLog = (PLOG_INFO)hEventLog;
if (!pLog)
@@ -59,7 +61,7 @@
Status = ElfrBackupELFA(
pLog->BindingHandle,
pLog->LogHandle,
- BackupFileName.Buffer);
+ &BackupFileName);
if (!NT_SUCCESS(Status))
{
@@ -83,11 +85,51 @@
{
PLOG_INFO pLog;
NTSTATUS Status;
- UNICODE_STRING BackupFileName;
+ RPC_UNICODE_STRING BackupFileName;
+
+ TRACE("%p, %s\n", hEventLog, debugstr_w(lpBackupFileName));
+
+ BackupFileName.Buffer = (LPWSTR)lpBackupFileName;
+ BackupFileName.Length = BackupFileName.MaximumLength =
+ lpBackupFileName ? wcslen(lpBackupFileName) * sizeof(WCHAR) : 0;
+
+ pLog = (PLOG_INFO)hEventLog;
+ if (!pLog)
+ {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+ Status = ElfrBackupELFW(
+ pLog->BindingHandle,
+ pLog->LogHandle,
+ &BackupFileName);
+
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastError(RtlNtStatusToDosError(Status));
+ return FALSE;
+ }
+ return TRUE;
+}
+
+
+/******************************************************************************
+ * ClearEventLogA [ADVAPI32.@]
+ */
+BOOL WINAPI
+ClearEventLogA(
+ IN HANDLE hEventLog,
+ IN LPCSTR lpBackupFileName)
+{
+ PLOG_INFO pLog;
+ NTSTATUS Status;
+ RPC_STRING BackupFileName;
TRACE("%p, %s\n", hEventLog, lpBackupFileName);
- RtlInitUnicodeString(&BackupFileName, lpBackupFileName);
+ BackupFileName.Buffer = (LPSTR)lpBackupFileName;
+ BackupFileName.Length = BackupFileName.MaximumLength =
+ lpBackupFileName ? strlen(lpBackupFileName) : 0;
pLog = (PLOG_INFO)hEventLog;
if (!pLog)
@@ -95,35 +137,37 @@
SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
- Status = ElfrBackupELFW(
+ Status = ElfrClearELFA(
pLog->BindingHandle,
pLog->LogHandle,
- BackupFileName.Buffer);
-
- if (!NT_SUCCESS(Status))
- {
- SetLastError(RtlNtStatusToDosError(Status));
- return FALSE;
- }
- return TRUE;
-}
-
-
-/******************************************************************************
- * ClearEventLogA [ADVAPI32.@]
- */
-BOOL WINAPI
-ClearEventLogA(
- IN HANDLE hEventLog,
- IN LPCSTR lpBackupFileName)
-{
- PLOG_INFO pLog;
- NTSTATUS Status;
- ANSI_STRING BackupFileName;
-
- TRACE("%p, %s\n", hEventLog, lpBackupFileName);
-
- RtlInitAnsiString(&BackupFileName, lpBackupFileName);
+ &BackupFileName);
+
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastError(RtlNtStatusToDosError(Status));
+ return FALSE;
+ }
+ return TRUE;
+}
+
+
+/******************************************************************************
+ * ClearEventLogW [ADVAPI32.@]
+ */
+BOOL WINAPI
+ClearEventLogW(
+ IN HANDLE hEventLog,
+ IN LPCWSTR lpBackupFileName)
+{
+ PLOG_INFO pLog;
+ NTSTATUS Status;
+ RPC_UNICODE_STRING BackupFileName;
+
+ TRACE("%p, %s\n", hEventLog, debugstr_w(lpBackupFileName));
+
+ BackupFileName.Buffer = (LPWSTR)lpBackupFileName;
+ BackupFileName.Length = BackupFileName.MaximumLength =
+ lpBackupFileName ? wcslen(lpBackupFileName) * sizeof(WCHAR) : 0;
pLog = (PLOG_INFO)hEventLog;
if (!pLog)
@@ -131,46 +175,10 @@
SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
- Status = ElfrClearELFA(
+ Status = ElfrClearELFW(
pLog->BindingHandle,
pLog->LogHandle,
- BackupFileName.Buffer);
-
- if (!NT_SUCCESS(Status))
- {
- SetLastError(RtlNtStatusToDosError(Status));
- return FALSE;
- }
- return TRUE;
-}
-
-
-/******************************************************************************
- * ClearEventLogW [ADVAPI32.@]
- */
-BOOL WINAPI
-ClearEventLogW(
- IN HANDLE hEventLog,
- IN LPCWSTR lpBackupFileName)
-{
- PLOG_INFO pLog;
- NTSTATUS Status;
- UNICODE_STRING BackupFileName;
-
- TRACE("%p, %s\n", hEventLog, lpBackupFileName);
-
- RtlInitUnicodeString(&BackupFileName, lpBackupFileName);
-
- pLog = (PLOG_INFO)hEventLog;
- if (!pLog)
- {
- SetLastError(ERROR_INVALID_HANDLE);
- return FALSE;
- }
- Status = ElfrClearELFW(
- pLog->BindingHandle,
- pLog->LogHandle,
- BackupFileName.Buffer);
+ &BackupFileName);
if (!NT_SUCCESS(Status))
{
@@ -191,7 +199,7 @@
PLOG_INFO pLog;
NTSTATUS Status;
- TRACE("%p", hEventLog);
+ TRACE("%p\n", hEventLog);
pLog = (PLOG_INFO)hEventLog;
if (!pLog)
@@ -271,7 +279,7 @@
{
PLOG_INFO pLog;
NTSTATUS Status;
- long Records;
+ DWORD Records;
TRACE("%p, %p\n", hEventLog, NumberOfRecords);
@@ -310,7 +318,7 @@
{
PLOG_INFO pLog;
NTSTATUS Status;
- long Oldest;
+ DWORD Oldest;
TRACE("%p, %p\n", hEventLog, OldestRecord);
@@ -405,13 +413,13 @@
{
PLOG_INFO pLog;
NTSTATUS Status;
- UNICODE_STRING UNCServerName;
- UNICODE_STRING FileName;
-
- TRACE("%s, %s\n", lpUNCServerName, lpFileName);
-
- RtlInitUnicodeString(&UNCServerName, lpUNCServerName);
- RtlInitUnicodeString(&FileName, lpFileName);
+ RPC_UNICODE_STRING FileName;
+
+ TRACE("%s, %s\n", debugstr_w(lpUNCServerName), debugstr_w(lpFileName));
+
+ FileName.Buffer = (LPWSTR)lpFileName;
+ FileName.Length = FileName.MaximumLength =
+ lpFileName ? wcslen(lpFileName) * sizeof(WCHAR) : 0;
pLog = HeapAlloc(GetProcessHeap(), 0, sizeof(LOG_INFO));
if (!pLog)
@@ -446,8 +454,8 @@
Status = ElfrOpenBELW(
pLog->BindingHandle,
- UNCServerName.Buffer,
- FileName.Buffer,
+ (LPWSTR)lpUNCServerName,
+ &FileName,
0,
0,
&pLog->LogHandle);
@@ -509,13 +517,13 @@
{
PLOG_INFO pLog;
NTSTATUS Status;
- UNICODE_STRING UNCServerName;
- UNICODE_STRING SourceName;
-
- TRACE("%s, %s\n", lpUNCServerName, lpSourceName);
-
- RtlInitUnicodeString(&UNCServerName, lpUNCServerName);
- RtlInitUnicodeString(&SourceName, lpSourceName);
+ RPC_UNICODE_STRING SourceName;
+
+ TRACE("%s, %s\n", debugstr_w(lpUNCServerName), debugstr_w(lpSourceName));
+
+ SourceName.Buffer = (LPWSTR)lpSourceName;
+ SourceName.Length = SourceName.MaximumLength =
+ lpSourceName ? wcslen(lpSourceName) * sizeof(WCHAR) : 0;
pLog = HeapAlloc(GetProcessHeap(), 0, sizeof(LOG_INFO));
if (!pLog)
@@ -550,8 +558,8 @@
Status = ElfrOpenELW(
pLog->BindingHandle,
- UNCServerName.Buffer,
- SourceName.Buffer,
+ (LPWSTR)lpUNCServerName,
+ &SourceName,
NULL,
0,
0,
@@ -582,7 +590,7 @@
{
PLOG_INFO pLog;
NTSTATUS Status;
- long bytesRead, minNumberOfBytesNeeded;
+ DWORD bytesRead, minNumberOfBytesNeeded;
TRACE("%p, %lu, %lu, %p, %lu, %p, %p\n",
hEventLog, dwReadFlags, dwRecordOffset, lpBuffer,
@@ -639,7 +647,7 @@
{
PLOG_INFO pLog;
NTSTATUS Status;
- long bytesRead, minNumberOfBytesNeeded;
+ DWORD bytesRead, minNumberOfBytesNeeded;
TRACE("%p, %lu, %lu, %p, %lu, %p, %p\n",
hEventLog, dwReadFlags, dwRecordOffset, lpBuffer,
@@ -726,13 +734,13 @@
{
PLOG_INFO pLog;
NTSTATUS Status;
- UNICODE_STRING UNCServerName;
- UNICODE_STRING SourceName;
-
- TRACE("%s, %s\n", lpUNCServerName, lpSourceName);
-
- RtlInitUnicodeString(&UNCServerName, lpUNCServerName);
- RtlInitUnicodeString(&SourceName, lpSourceName);
+ RPC_UNICODE_STRING SourceName;
+
+ TRACE("%s, %s\n", debugstr_w(lpUNCServerName), debugstr_w(lpSourceName));
+
+ SourceName.Buffer = (LPWSTR)lpSourceName;
+ SourceName.Length = SourceName.MaximumLength =
+ lpSourceName ? wcslen(lpSourceName) * sizeof(WCHAR) : 0;
pLog = HeapAlloc(GetProcessHeap(), 0, sizeof(LOG_INFO));
if (!pLog)
@@ -767,9 +775,9 @@
Status = ElfrRegisterEventSourceW(
pLog->BindingHandle,
- UNCServerName.Buffer,
- SourceName.Buffer,
- L"",
+ (LPWSTR)lpUNCServerName,
+ &SourceName,
+ NULL,
0,
0,
&pLog->LogHandle);
Modified: trunk/reactos/include/reactos/idl/eventlogrpc.idl
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/idl/eventl…
==============================================================================
--- trunk/reactos/include/reactos/idl/eventlogrpc.idl [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/idl/eventlogrpc.idl [iso-8859-1] Sun May 18 10:29:53
2008
@@ -1,306 +1,307 @@
/*
- * Copyright 2005 Saveliy Tretiakov
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Event Log RPC interface definition
*/
+#include <ms-dtyp.idl>
+
+cpp_quote("#if !defined(__EVENTLOG_H__) && !defined(__ADVAPI32_H)")
+typedef long NTSTATUS;
+cpp_quote("#endif")
+
+#define MAX_BATCH_BUFF 0x0007FFFF
+
+typedef [range(0, MAX_BATCH_BUFF)] unsigned long RULONG;
+typedef struct _RPC_STRING {
+ USHORT Length;
+ USHORT MaximumLength;
+ [size_is(MaximumLength), length_is(Length)] LPSTR Buffer;
+} RPC_STRING, *PRPC_STRING;
+
+typedef [context_handle] unsigned long IELF_HANDLE;
+typedef IELF_HANDLE *PIELF_HANDLE;
+typedef [handle, unique] LPWSTR EVENTLOG_HANDLE_W;
+typedef [handle, unique] LPSTR EVENTLOG_HANDLE_A;
+
+typedef struct _RPC_CLIENT_ID {
+ DWORD UniqueProcess;
+ DWORD UniqueThread;
+} RPC_CLIENT_ID, *PRPC_CLIENT_ID;
+
[
- uuid(82273FDC-E32A-18C3-3F78-827929DC23EA),
- version(0.0),
- pointer_default(unique)
-#ifndef __midl
- ,explicit_handle
+ uuid(82273FDC-E32A-18C3-3F78-827929DC23EA),
+ version(0.0),
+ pointer_default(unique)
+#ifndef __midl
+ ,explicit_handle
#endif
]
interface eventlog
{
- cpp_quote("#if 0")
-#ifdef __midl
- typedef [handle, unique] wchar_t *LPWSTR;
- typedef [handle, unique] char *LPSTR;
- typedef unsigned int NTSTATUS;
-#else
- #define LPWSTR wchar_t *
- #define LPSTR char *
- #define NTSTATUS long
-#endif
-
-#ifdef __midl
- typedef struct _UNICODE_STRING {
- unsigned short Length;
- unsigned short MaximumLength;
- [size_is(MaximumLength/2), unique] wchar_t *Buffer;
- } UNICODE_STRING, *PUNICODE_STRING;
-
- typedef struct _ANSI_STRING {
- unsigned short Length;
- unsigned short MaximumLength;
- [size_is(MaximumLength), unique] char *Buffer;
- } ANSI_STRING, *PANSI_STRING;
-#else
- #define PUNICODE_STRING wchar_t *
- #define PANSI_STRING char *
-#endif
- cpp_quote("#endif")
-
-#ifdef __midl
- typedef [context_handle] struct _LOGHANDLE {
- int pos;
- } *LOGHANDLE;
- typedef LOGHANDLE *PLOGHANDLE;
-#else
- #define LOGHANDLE unsigned int
- #define PLOGHANDLE unsigned int*
- cpp_quote("typedef unsigned int LOGHANDLE, *PLOGHANDLE;")
-#endif
-
- /* Function 0x00 */
- NTSTATUS ElfrClearELFW(
-#ifndef __midl
- handle_t BindingHandle,
-#endif
- [in] LOGHANDLE Handle,
- [in] PUNICODE_STRING BackupName);
-
- /* Function 0x01 */
- NTSTATUS ElfrBackupELFW(
-#ifndef __midl
- handle_t BindingHandle,
-#endif
- [in] LOGHANDLE Handle,
- [in] PUNICODE_STRING BackupName);
-
- /* Function 0x02 */
- NTSTATUS ElfrCloseEL(
-#ifndef __midl
- handle_t BindingHandle,
-#endif
- [in,out] PLOGHANDLE Handle);
-
- /* Function 0x03 */
- NTSTATUS ElfrDeregisterEventSource(
-#ifndef __midl
- handle_t BindingHandle,
-#endif
- [in,out] PLOGHANDLE Handle);
-
- /* Function 0x04 */
- NTSTATUS ElfrNumberOfRecords(
-#ifndef __midl
- handle_t BindingHandle,
-#endif
- [in] LOGHANDLE Handle,
- [out] long *NumberOfRecords);
-
- /* Function 0x05 */
- NTSTATUS ElfrOldestRecord(
-#ifndef __midl
- handle_t BindingHandle,
-#endif
- [in] LOGHANDLE LogHandle,
- [out] long *OldestRecNumber);
-
- /* Function 0x06 */
- //NTSTATUS ElfrChangeNotify(); // FIXME
-
- /* Function 0x07 */
- NTSTATUS ElfrOpenELW(
-#ifndef __midl
- handle_t BindingHandle,
-#endif
- [in, unique] LPWSTR ServerName,
- [in] PUNICODE_STRING FileName,
- [in] PUNICODE_STRING NullStr,
- [in] long MajorVer,
- [in] long MinorVer,
- [out] PLOGHANDLE Handle );
-
- /* Function 0x08 */
- NTSTATUS ElfrRegisterEventSourceW(
-#ifndef __midl
- handle_t BindingHandle,
-#endif
- [in, unique] LPWSTR ServerName,
- [in] PUNICODE_STRING LogName,
- [in] PUNICODE_STRING NullStr,
- [in] long MajorVer,
- [in] long MinorVer,
- [out] PLOGHANDLE Handle);
-
- /* Function 0x09 */
- NTSTATUS ElfrOpenBELW(
-#ifndef __midl
- handle_t BindingHandle,
-#endif
- [in, unique] LPWSTR ServerName,
- [in] PUNICODE_STRING BackupName,
- [in] long MajorVer,
- [in] long MinorVer,
- [out] PLOGHANDLE Handle);
-
- /* Function 0x0a */
- NTSTATUS ElfrReadELW(
-#ifndef __midl
- handle_t BindingHandle,
-#endif
- [in] LOGHANDLE Handle,
- [in] long Flags,
- [in] long Offset,
- [in] long BufSize,
- [out,size_is(BufSize)] unsigned char *Buffer,
- [out] long *BytesRead,
- [out] long *BytesNeeded);
-
- /* Function 0x0b */
- NTSTATUS ElfrReportEventW(
-#ifndef __midl
- handle_t BindingHandle,
-#endif
- [in] LOGHANDLE Handle,
- [in] long Time,
- [in] short Type,
- [in] short Category,
- [in] long ID,
- [in] short NumStrings,
- [in] long DataSize,
- [in] PUNICODE_STRING ComputerName,
- [in, unique] unsigned char *SID,
-#ifdef __midl
- [in, size_is(NumStrings), unique] PUNICODE_STRING Strings[*],
-#else
- [in, size_is(NumStrings), unique] PUNICODE_STRING *Strings,
-#endif
- [in, size_is(DataSize), unique] unsigned char *Data,
- [in] short Flags,
- [in,out,unique] long *unknown1,
- [in,out,unique] long *unknown2);
-
- /* Function 0x0c */
- NTSTATUS ElfrClearELFA(
-#ifndef __midl
- handle_t BindingHandle,
-#endif
- [in] LOGHANDLE Handle,
- [in,unique] PANSI_STRING BackupName);
-
- /* Function 0x0d */
- NTSTATUS ElfrBackupELFA(
-#ifndef __midl
- handle_t BindingHandle,
-#endif
- [in] LOGHANDLE Handle,
- [in] PANSI_STRING BackupName);
-
- /* Function 0x0e */
- NTSTATUS ElfrOpenELA(
-#ifndef __midl
- handle_t BindingHandle,
-#endif
- [in, unique] LPSTR ServerName,
- [in] PANSI_STRING LogName,
- [in] PANSI_STRING NullStr,
- [in] long MajorVer,
- [in] long MinorVer,
- [out] PLOGHANDLE Handle);
-
- /* Function 0x0f */
- NTSTATUS ElfrRegisterEventSourceA(
-#ifndef __midl
- handle_t BindingHandle,
-#endif
- [in, unique] LPSTR ServerName,
- [in] PANSI_STRING LogName,
- [in] PANSI_STRING NullStr,
- [in] long MajorVer,
- [in] long MinorVer,
- [out] PLOGHANDLE Handle);
-
- /* Function 0x10 */
- NTSTATUS ElfrOpenBELA(
-#ifndef __midl
- handle_t BindingHandle,
-#endif
- [in, unique] LPSTR ServerName,
- [in] PANSI_STRING BakckupName,
- [in] long MajorVer,
- [in] long MinorVer,
- [out] PLOGHANDLE Handle);
-
- /* Function 0x11 */
- NTSTATUS ElfrReadELA(
-#ifndef __midl
- handle_t BindingHandle,
-#endif
- [in] LOGHANDLE Handle,
- [in] long Flags,
- [in] long Offset,
- [in] long BufSize,
- [out,size_is(BufSize)] unsigned char *Buffer,
- [out] long *BytesRead,
- [out] long *BytesNeeded);
-
- /* Function 0x12 */
- NTSTATUS ElfrReportEventA(
-#ifndef __midl
- handle_t BindingHandle,
-#endif
- [in] LOGHANDLE Handle,
- [in] long Time,
- [in] short Type,
- [in] short Category,
- [in] long ID,
- [in] short NumStrings,
- [in] long DataSize,
- [in] PANSI_STRING ComputerName,
- [in, unique] unsigned char *SID,
-#ifdef __midl
- [in, size_is(NumStrings), unique] PANSI_STRING Strings[*],
-#else
- [in, size_is(NumStrings), unique] PANSI_STRING *Strings,
-#endif
- [in, size_is(DataSize), unique] unsigned char *Data,
- [in] short Flags,
- [in,out,unique] long *unknown1,
- [in,out,unique] long *unknown2);
-
- /* Function 0x13 */
- //NTSTATUS ElfrRegisterClusterSvc(); //FIXME
-
- /* Function 0x14 */
- //NTSTATUS ElfrDeregisterClusterSvc(); //FIXME
-
- /* Function 0x15 */
- //NTSTATUS ElfrWriteClusterEvents(); //FIXME
-
- /* Function 0x16 */
- NTSTATUS ElfrGetLogInformation(
-#ifndef __midl
- handle_t BindingHandle,
-#endif
- [in] LOGHANDLE Handle,
- [in] long InfoLevel,
- [out, size_is(BufSize)] unsigned char *Buffer,
- [in] long BufSize,
- [out] long *BytesNeeded);
-
- /* Function 0x17 */
- NTSTATUS ElfrFlushEL(
-#ifndef __midl
- handle_t BindingHandle,
-#endif
- [in] LOGHANDLE Handle);
-
+ /* Function 0 */
+ NTSTATUS ElfrClearELFW(
+#ifndef __midl
+ [in] handle_t BindingHandle,
+#endif
+ [in] IELF_HANDLE LogHandle,
+ [in, unique] PRPC_UNICODE_STRING BackupFileName);
+
+ /* Function 1 */
+ NTSTATUS ElfrBackupELFW(
+#ifndef __midl
+ [in] handle_t BindingHandle,
+#endif
+ [in] IELF_HANDLE LogHandle,
+ [in, unique] PRPC_UNICODE_STRING BackupFileName);
+
+ /* Function 2 */
+ NTSTATUS ElfrCloseEL(
+#ifndef __midl
+ [in] handle_t BindingHandle,
+#endif
+ [in, out] IELF_HANDLE *LogHandle);
+
+ /* Function 3 */
+ NTSTATUS ElfrDeregisterEventSource(
+#ifndef __midl
+ [in] handle_t BindingHandle,
+#endif
+ [in, out] IELF_HANDLE *LogHandle);
+
+ /* Function 4 */
+ NTSTATUS ElfrNumberOfRecords(
+#ifndef __midl
+ [in] handle_t BindingHandle,
+#endif
+ [in] IELF_HANDLE LogHandle,
+ [out] DWORD *NumberOfRecords);
+
+ /* Function 5 */
+ NTSTATUS ElfrOldestRecord(
+#ifndef __midl
+ handle_t BindingHandle,
+#endif
+ [in] IELF_HANDLE LogHandle,
+ [out] DWORD *OldestRecordNumber);
+
+ /* Function 6 */
+ NTSTATUS ElfrChangeNotify(
+#ifndef __midl
+ [in] handle_t BindingHandle,
+#endif
+ [in] IELF_HANDLE *LogHandle,
+ [in] RPC_CLIENT_ID ClientId,
+ [in] DWORD Event);
+
+ /* Function 7 */
+ NTSTATUS ElfrOpenELW(
+#ifndef __midl
+ [in] handle_t BindingHandle,
+#endif
+ [in] EVENTLOG_HANDLE_W UNCServerName,
+ [in] PRPC_UNICODE_STRING ModuleName,
+ [in] PRPC_UNICODE_STRING RegModuleName,
+ [in] DWORD MajorVersion,
+ [in] DWORD MinorVersion,
+ [out] IELF_HANDLE* LogHandle);
+
+ /* Function 8 */
+ NTSTATUS ElfrRegisterEventSourceW(
+#ifndef __midl
+ [in] handle_t BindingHandle,
+#endif
+ [in] EVENTLOG_HANDLE_W UNCServerName,
+ [in] PRPC_UNICODE_STRING ModuleName,
+ [in] PRPC_UNICODE_STRING RegModuleName,
+ [in] DWORD MajorVersion,
+ [in] DWORD MinorVersion,
+ [out] IELF_HANDLE* LogHandle);
+
+ /* Function 9 */
+ NTSTATUS ElfrOpenBELW(
+#ifndef __midl
+ [in] handle_t BindingHandle,
+#endif
+ [in] EVENTLOG_HANDLE_W UNCServerName,
+ [in] PRPC_UNICODE_STRING BackupFileName,
+ [in] DWORD MajorVersion,
+ [in] DWORD MinorVersion,
+ [out] IELF_HANDLE* LogHandle);
+
+ /* Function 10 */
+ NTSTATUS ElfrReadELW(
+#ifndef __midl
+ [in] handle_t BindingHandle,
+#endif
+ [in] IELF_HANDLE LogHandle,
+ [in] DWORD ReadFlags,
+ [in] DWORD RecordOffset,
+ [in] RULONG NumberOfBytesToRead,
+ [out, size_is(NumberOfBytesToRead)] BYTE *Buffer,
+ [out] DWORD *NumberOfBytesRead,
+ [out] DWORD *MinNumberOfBytesNeeded);
+
+ /* Function 11 */
+ NTSTATUS ElfrReportEventW(
+#ifndef __midl
+ [in] handle_t BindingHandle,
+#endif
+ [in] IELF_HANDLE LogHandle,
+ [in] DWORD Time,
+ [in] USHORT EventType,
+ [in] USHORT EventCategory,
+ [in] DWORD EventID,
+ [in, range(0, 256)] USHORT NumStrings,
+ [in, range(0, 61440)] DWORD DataSize,
+ [in] PRPC_UNICODE_STRING ComputerName,
+ [in, unique] PRPC_SID UserSID,
+ [in, size_is(NumStrings), unique] PRPC_UNICODE_STRING Strings[*],
+ [in, size_is(DataSize), unique] BYTE *Data,
+ [in] USHORT Flags,
+ [in, out, unique] DWORD *RecordNumber,
+ [in, out, unique] DWORD *TimeWritten);
+
+ /* Function 12 */
+ NTSTATUS ElfrClearELFA(
+#ifndef __midl
+ [in] handle_t BindingHandle,
+#endif
+ [in] IELF_HANDLE LogHandle,
+ [in, unique] PRPC_STRING BackupFileName);
+
+ /* Function 13 */
+ NTSTATUS ElfrBackupELFA(
+#ifndef __midl
+ [in] handle_t BindingHandle,
+#endif
+ [in] IELF_HANDLE LogHandle,
+ [in, unique] PRPC_STRING BackupFileName);
+
+ /* Function 14 */
+ NTSTATUS ElfrOpenELA(
+#ifndef __midl
+ [in] handle_t BindingHandle,
+#endif
+ [in] EVENTLOG_HANDLE_A UNCServerName,
+ [in] PRPC_STRING ModuleName,
+ [in] PRPC_STRING RegModuleName,
+ [in] DWORD MajorVersion,
+ [in] DWORD MinorVersion,
+ [out] IELF_HANDLE* LogHandle);
+
+ /* Function 15 */
+ NTSTATUS ElfrRegisterEventSourceA(
+#ifndef __midl
+ [in] handle_t BindingHandle,
+#endif
+ [in] EVENTLOG_HANDLE_A UNCServerName,
+ [in] PRPC_STRING ModuleName,
+ [in] PRPC_STRING RegModuleName,
+ [in] DWORD MajorVersion,
+ [in] DWORD MinorVersion,
+ [out] IELF_HANDLE* LogHandle);
+
+ /* Function 16 */
+ NTSTATUS ElfrOpenBELA(
+#ifndef __midl
+ [in] handle_t BindingHandle,
+#endif
+ [in] EVENTLOG_HANDLE_A UNCServerName,
+ [in] PRPC_STRING BackupFileName,
+ [in] DWORD MajorVersion,
+ [in] DWORD MinorVersion,
+ [out] IELF_HANDLE* LogHandle);
+
+ /* Function 17 */
+ NTSTATUS ElfrReadELA(
+#ifndef __midl
+ [in] handle_t BindingHandle,
+#endif
+ [in] IELF_HANDLE LogHandle,
+ [in] DWORD ReadFlags,
+ [in] DWORD RecordOffset,
+ [in] RULONG NumberOfBytesToRead,
+ [out, size_is(NumberOfBytesToRead)] BYTE *Buffer,
+ [out] DWORD *NumberOfBytesRead,
+ [out] DWORD *MinNumberOfBytesNeeded);
+
+ /* Function 18 */
+ NTSTATUS ElfrReportEventA(
+#ifndef __midl
+ [in] handle_t BindingHandle,
+#endif
+ [in] IELF_HANDLE LogHandle,
+ [in] DWORD Time,
+ [in] USHORT EventType,
+ [in] USHORT EventCategory,
+ [in] DWORD EventID,
+ [in, range(0, 256)] USHORT NumStrings,
+ [in, range(0, 61440)] DWORD DataSize,
+ [in] PRPC_STRING ComputerName,
+ [in, unique] PRPC_SID UserSID,
+ [in, size_is(NumStrings), unique] PRPC_STRING Strings[*],
+ [in, size_is(DataSize), unique] BYTE *Data,
+ [in] USHORT Flags,
+ [in, out, unique] DWORD *RecordNumber,
+ [in, out, unique] DWORD *TimeWritten);
+
+ /* Function 19 */
+ NTSTATUS ElfrRegisterClusterSvc(
+#ifndef __midl
+ [in] handle_t BindingHandle
+#endif
+ ); /* FIXME */
+
+ /* Function 20 */
+ NTSTATUS ElfrDeregisterClusterSvc(
+#ifndef __midl
+ [in] handle_t BindingHandle
+#endif
+ ); /* FIXME */
+
+ /* Function 21 */
+ NTSTATUS ElfrWriteClusterEvents(
+#ifndef __midl
+ [in] handle_t BindingHandle
+#endif
+ ); /* FIXME */
+
+ /* Function 22 */
+ NTSTATUS ElfrGetLogInformation(
+#ifndef __midl
+ [in] handle_t BindingHandle,
+#endif
+ [in] IELF_HANDLE LogHandle,
+ [in] DWORD InfoLevel,
+ [out, size_is(cbBufSize)] BYTE *Buffer,
+ [in, range(0, 1024)] DWORD cbBufSize,
+ [out] DWORD *pcbBytesNeeded);
+
+ /* Function 23 */
+ NTSTATUS ElfrFlushEL(
+#ifndef __midl
+ [in] handle_t BindingHandle,
+#endif
+ [in] IELF_HANDLE LogHandle);
+
+ /* Function 24 */
+ NTSTATUS ElfrReportEventAndSourceW(
+#ifndef __midl
+ [in] handle_t BindingHandle,
+#endif
+ [in] IELF_HANDLE LogHandle,
+ [in] DWORD Time,
+ [in] USHORT EventType,
+ [in] USHORT EventCategory,
+ [in] ULONG EventID,
+ [in] PRPC_UNICODE_STRING SourceName,
+ [in, range(0, 256)] USHORT NumStrings,
+ [in, range(0, 61440)] DWORD DataSize,
+ [in] PRPC_UNICODE_STRING ComputerName,
+ [in, unique] PRPC_SID UserSID,
+ [in, size_is(NumStrings), unique] PRPC_UNICODE_STRING Strings[*],
+ [in, size_is(DataSize), unique] BYTE *Data,
+ [in] USHORT Flags,
+ [in, out, unique] DWORD *RecordNumber,
+ [in, out, unique] DWORD *TimeWritten);
}