mirror of
https://github.com/reactos/reactos.git
synced 2025-01-13 01:22:03 +00:00
Make eventlog RPC interface more compatible with MS Windows
svn path=/trunk/; revision=33585
This commit is contained in:
parent
8163d0f36b
commit
6d51a10a1b
3 changed files with 504 additions and 453 deletions
|
@ -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 @@ DWORD STDCALL RpcThreadRoutine(LPVOID lpParameter)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Function 0x00 */
|
||||
|
||||
/* Function 0 */
|
||||
NTSTATUS ElfrClearELFW(
|
||||
BINDING_HANDLE
|
||||
/* [in] */ LOGHANDLE Handle,
|
||||
/* [in] */ PUNICODE_STRING BackupName)
|
||||
handle_t BindingHandle,
|
||||
IELF_HANDLE LogHandle,
|
||||
PRPC_UNICODE_STRING BackupFileName)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* Function 0x01 */
|
||||
|
||||
/* Function 1 */
|
||||
NTSTATUS ElfrBackupELFW(
|
||||
BINDING_HANDLE
|
||||
/* [in] */ LOGHANDLE Handle,
|
||||
/* [in] */ PUNICODE_STRING BackupName)
|
||||
handle_t BindingHandle,
|
||||
IELF_HANDLE LogHandle,
|
||||
PRPC_UNICODE_STRING BackupFileName)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
/* Function 0x02 */
|
||||
/* Function 2 */
|
||||
NTSTATUS ElfrCloseEL(
|
||||
BINDING_HANDLE
|
||||
/* [out][in] */ PLOGHANDLE Handle)
|
||||
handle_t BindingHandle,
|
||||
IELF_HANDLE *LogHandle)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
/* Function 0x03 */
|
||||
/* 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)
|
||||
handle_t BindingHandle,
|
||||
IELF_HANDLE LogHandle,
|
||||
DWORD *NumberOfRecords)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
/* Function 0x05 */
|
||||
/* Function 5 */
|
||||
NTSTATUS ElfrOldestRecord(
|
||||
BINDING_HANDLE
|
||||
/* [in] */ LOGHANDLE LogHandle,
|
||||
/* [out] */ long __RPC_FAR * OldestRecNumber)
|
||||
handle_t BindingHandle,
|
||||
IELF_HANDLE LogHandle,
|
||||
DWORD *OldestRecordNumber)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
/* Function 0x06 */
|
||||
NTSTATUS ElfrChangeNotify(void)
|
||||
/* Function 6 */
|
||||
NTSTATUS ElfrChangeNotify(
|
||||
handle_t BindingHandle,
|
||||
IELF_HANDLE *LogHandle,
|
||||
RPC_CLIENT_ID ClientId,
|
||||
DWORD Event)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
/* Function 0x07 */
|
||||
/* 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)
|
||||
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 0x08 */
|
||||
/* 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)
|
||||
handle_t BindingHandle,
|
||||
EVENTLOG_HANDLE_W UNCServerName,
|
||||
PRPC_UNICODE_STRING ModuleName,
|
||||
PRPC_UNICODE_STRING RegModuleName,
|
||||
DWORD MajorVersion,
|
||||
DWORD MinorVersion,
|
||||
IELF_HANDLE *LogHandle)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
*Handle = 1;
|
||||
*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)
|
||||
handle_t BindingHandle,
|
||||
EVENTLOG_HANDLE_W UNCServerName,
|
||||
PRPC_UNICODE_STRING BackupFileName,
|
||||
DWORD MajorVersion,
|
||||
DWORD MinorVersion,
|
||||
IELF_HANDLE *LogHandle)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
/* Function 0x0a */
|
||||
/* 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)
|
||||
handle_t BindingHandle,
|
||||
IELF_HANDLE LogHandle,
|
||||
DWORD ReadFlags,
|
||||
DWORD RecordOffset,
|
||||
RULONG NumberOfBytesToRead,
|
||||
BYTE *Buffer,
|
||||
DWORD *NumberOfBytesRead,
|
||||
DWORD *MinNumberOfBytesNeeded)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
/* Function 0x0b */
|
||||
/* 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)
|
||||
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)
|
||||
{
|
||||
short i;
|
||||
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 @@ NTSTATUS ElfrReportEventW(
|
|||
break;
|
||||
|
||||
default:
|
||||
DPRINT1("Type %hu: %S\n", Type, Strings[i]);
|
||||
DPRINT1("Type %hu: %S\n", EventType, Strings[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -240,184 +230,236 @@ NTSTATUS ElfrReportEventW(
|
|||
}
|
||||
|
||||
|
||||
/* Function 0x0c */
|
||||
/* Function 12 */
|
||||
NTSTATUS ElfrClearELFA(
|
||||
BINDING_HANDLE
|
||||
/* [in] */ LOGHANDLE Handle,
|
||||
/* [unique][in] */ PANSI_STRING BackupName)
|
||||
handle_t BindingHandle,
|
||||
IELF_HANDLE LogHandle,
|
||||
PRPC_STRING BackupFileName)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
/* Function 0x0d */
|
||||
/* Function 13 */
|
||||
NTSTATUS ElfrBackupELFA(
|
||||
BINDING_HANDLE
|
||||
/* [in] */ LOGHANDLE Handle,
|
||||
/* [in] */ PANSI_STRING BackupName)
|
||||
handle_t BindingHandle,
|
||||
IELF_HANDLE LogHandle,
|
||||
PRPC_STRING BackupFileName)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
/* Function 0x0e */
|
||||
/* 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)
|
||||
handle_t BindingHandle,
|
||||
EVENTLOG_HANDLE_A UNCServerName,
|
||||
PRPC_STRING ModuleName,
|
||||
PRPC_STRING RegModuleName,
|
||||
DWORD MajorVersion,
|
||||
DWORD MinorVersion,
|
||||
IELF_HANDLE *LogHandle)
|
||||
{
|
||||
UNICODE_STRING logname = { 0, }, servername = { 0, }, StrNull = { 0, };
|
||||
NTSTATUS status;
|
||||
UNICODE_STRING UNCServerNameW = { 0, };
|
||||
UNICODE_STRING ModuleNameW = { 0, };
|
||||
UNICODE_STRING RegModuleNameW = { 0, };
|
||||
NTSTATUS Status;
|
||||
|
||||
if (LogName && !RtlCreateUnicodeStringFromAsciiz(&logname, LogName))
|
||||
if (UNCServerName &&
|
||||
!RtlCreateUnicodeStringFromAsciiz(&UNCServerNameW, UNCServerName))
|
||||
{
|
||||
return STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
if (ServerName &&
|
||||
!RtlCreateUnicodeStringFromAsciiz(&servername, ServerName))
|
||||
if (ModuleName &&
|
||||
!RtlAnsiStringToUnicodeString(&ModuleNameW, (PANSI_STRING)ModuleName, TRUE))
|
||||
{
|
||||
RtlFreeUnicodeString(&logname);
|
||||
RtlFreeUnicodeString(&UNCServerNameW);
|
||||
return STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
status = ElfrOpenELW(BindingHandle, servername.Buffer, logname.Buffer,
|
||||
StrNull.Buffer, MajorVer, MinorVer, Handle);
|
||||
if (RegModuleName &&
|
||||
!RtlAnsiStringToUnicodeString(&RegModuleNameW, (PANSI_STRING)RegModuleName, TRUE))
|
||||
{
|
||||
RtlFreeUnicodeString(&UNCServerNameW);
|
||||
RtlFreeUnicodeString(&ModuleNameW);
|
||||
return STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
RtlFreeUnicodeString(&servername);
|
||||
RtlFreeUnicodeString(&logname);
|
||||
Status = ElfrOpenELW(
|
||||
BindingHandle,
|
||||
UNCServerName ? UNCServerNameW.Buffer : NULL,
|
||||
ModuleName ? (PRPC_UNICODE_STRING)&ModuleNameW : NULL,
|
||||
RegModuleName ? (PRPC_UNICODE_STRING)&RegModuleNameW : NULL,
|
||||
MajorVersion,
|
||||
MinorVersion,
|
||||
LogHandle);
|
||||
|
||||
return status;
|
||||
RtlFreeUnicodeString(&UNCServerNameW);
|
||||
RtlFreeUnicodeString(&ModuleNameW);
|
||||
RtlFreeUnicodeString(&RegModuleNameW);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
/* Function 0x0f */
|
||||
/* 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)
|
||||
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 0x10 */
|
||||
/* Function 16 */
|
||||
NTSTATUS ElfrOpenBELA(
|
||||
BINDING_HANDLE
|
||||
/* [unique][in] */ LPSTR ServerName,
|
||||
/* [in] */ PANSI_STRING BakckupName,
|
||||
/* [in] */ long MajorVer,
|
||||
/* [in] */ long MinorVer,
|
||||
/* [out] */ PLOGHANDLE Handle)
|
||||
handle_t BindingHandle,
|
||||
EVENTLOG_HANDLE_A UNCServerName,
|
||||
PRPC_STRING BackupFileName,
|
||||
DWORD MajorVersion,
|
||||
DWORD MinorVersion,
|
||||
IELF_HANDLE *LogHandle)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
/* Function 0x11 */
|
||||
/* 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)
|
||||
handle_t BindingHandle,
|
||||
IELF_HANDLE LogHandle,
|
||||
DWORD ReadFlags,
|
||||
DWORD RecordOffset,
|
||||
RULONG NumberOfBytesToRead,
|
||||
BYTE *Buffer,
|
||||
DWORD *NumberOfBytesRead,
|
||||
DWORD *MinNumberOfBytesNeeded)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
/* Function 0x12 */
|
||||
/* 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)
|
||||
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 0x13 */
|
||||
NTSTATUS ElfrRegisterClusterSvc(void)
|
||||
/* Function 19 */
|
||||
NTSTATUS ElfrRegisterClusterSvc(
|
||||
handle_t BindingHandle)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
/* Function 0x14 */
|
||||
NTSTATUS ElfrDeregisterClusterSvc(void)
|
||||
/* Function 20 */
|
||||
NTSTATUS ElfrDeregisterClusterSvc(
|
||||
handle_t BindingHandle)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
/* Function 0x15 */
|
||||
NTSTATUS ElfrWriteClusterEvents(void)
|
||||
/* Function 21 */
|
||||
NTSTATUS ElfrWriteClusterEvents(
|
||||
handle_t BindingHandle)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
/* Function 0x16 */
|
||||
/* 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)
|
||||
handle_t BindingHandle,
|
||||
IELF_HANDLE LogHandle,
|
||||
DWORD InfoLevel,
|
||||
BYTE *Buffer,
|
||||
DWORD cbBufSize,
|
||||
DWORD *pcbBytesNeeded)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
/* Function 0x17 */
|
||||
/* Function 23 */
|
||||
NTSTATUS ElfrFlushEL(
|
||||
BINDING_HANDLE
|
||||
/* [in] */ LOGHANDLE Handle)
|
||||
handle_t BindingHandle,
|
||||
IELF_HANDLE LogHandle)
|
||||
{
|
||||
DbgPrint("EventLogFlush UNIMPLEMENTED\n");
|
||||
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)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ WINE_DECLARE_DEBUG_CHANNEL(eventlog);
|
|||
typedef struct _LOG_INFO
|
||||
{
|
||||
RPC_BINDING_HANDLE BindingHandle;
|
||||
LOGHANDLE LogHandle;
|
||||
IELF_HANDLE LogHandle;
|
||||
BOOL bLocal;
|
||||
} LOG_INFO, *PLOG_INFO;
|
||||
|
||||
|
@ -44,11 +44,13 @@ BackupEventLogA(
|
|||
{
|
||||
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 @@ BackupEventLogA(
|
|||
Status = ElfrBackupELFA(
|
||||
pLog->BindingHandle,
|
||||
pLog->LogHandle,
|
||||
BackupFileName.Buffer);
|
||||
&BackupFileName);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
|
@ -83,11 +85,13 @@ BackupEventLogW(
|
|||
{
|
||||
PLOG_INFO pLog;
|
||||
NTSTATUS Status;
|
||||
UNICODE_STRING BackupFileName;
|
||||
RPC_UNICODE_STRING BackupFileName;
|
||||
|
||||
TRACE("%p, %s\n", hEventLog, lpBackupFileName);
|
||||
TRACE("%p, %s\n", hEventLog, debugstr_w(lpBackupFileName));
|
||||
|
||||
RtlInitUnicodeString(&BackupFileName, lpBackupFileName);
|
||||
BackupFileName.Buffer = (LPWSTR)lpBackupFileName;
|
||||
BackupFileName.Length = BackupFileName.MaximumLength =
|
||||
lpBackupFileName ? wcslen(lpBackupFileName) * sizeof(WCHAR) : 0;
|
||||
|
||||
pLog = (PLOG_INFO)hEventLog;
|
||||
if (!pLog)
|
||||
|
@ -98,7 +102,7 @@ BackupEventLogW(
|
|||
Status = ElfrBackupELFW(
|
||||
pLog->BindingHandle,
|
||||
pLog->LogHandle,
|
||||
BackupFileName.Buffer);
|
||||
&BackupFileName);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
|
@ -119,11 +123,13 @@ ClearEventLogA(
|
|||
{
|
||||
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)
|
||||
|
@ -134,7 +140,7 @@ ClearEventLogA(
|
|||
Status = ElfrClearELFA(
|
||||
pLog->BindingHandle,
|
||||
pLog->LogHandle,
|
||||
BackupFileName.Buffer);
|
||||
&BackupFileName);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
|
@ -155,11 +161,13 @@ ClearEventLogW(
|
|||
{
|
||||
PLOG_INFO pLog;
|
||||
NTSTATUS Status;
|
||||
UNICODE_STRING BackupFileName;
|
||||
RPC_UNICODE_STRING BackupFileName;
|
||||
|
||||
TRACE("%p, %s\n", hEventLog, lpBackupFileName);
|
||||
TRACE("%p, %s\n", hEventLog, debugstr_w(lpBackupFileName));
|
||||
|
||||
RtlInitUnicodeString(&BackupFileName, lpBackupFileName);
|
||||
BackupFileName.Buffer = (LPWSTR)lpBackupFileName;
|
||||
BackupFileName.Length = BackupFileName.MaximumLength =
|
||||
lpBackupFileName ? wcslen(lpBackupFileName) * sizeof(WCHAR) : 0;
|
||||
|
||||
pLog = (PLOG_INFO)hEventLog;
|
||||
if (!pLog)
|
||||
|
@ -170,7 +178,7 @@ ClearEventLogW(
|
|||
Status = ElfrClearELFW(
|
||||
pLog->BindingHandle,
|
||||
pLog->LogHandle,
|
||||
BackupFileName.Buffer);
|
||||
&BackupFileName);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
|
@ -191,7 +199,7 @@ CloseEventLog(
|
|||
PLOG_INFO pLog;
|
||||
NTSTATUS Status;
|
||||
|
||||
TRACE("%p", hEventLog);
|
||||
TRACE("%p\n", hEventLog);
|
||||
|
||||
pLog = (PLOG_INFO)hEventLog;
|
||||
if (!pLog)
|
||||
|
@ -271,7 +279,7 @@ GetNumberOfEventLogRecords(
|
|||
{
|
||||
PLOG_INFO pLog;
|
||||
NTSTATUS Status;
|
||||
long Records;
|
||||
DWORD Records;
|
||||
|
||||
TRACE("%p, %p\n", hEventLog, NumberOfRecords);
|
||||
|
||||
|
@ -310,7 +318,7 @@ GetOldestEventLogRecord(
|
|||
{
|
||||
PLOG_INFO pLog;
|
||||
NTSTATUS Status;
|
||||
long Oldest;
|
||||
DWORD Oldest;
|
||||
|
||||
TRACE("%p, %p\n", hEventLog, OldestRecord);
|
||||
|
||||
|
@ -405,13 +413,13 @@ OpenBackupEventLogW(
|
|||
{
|
||||
PLOG_INFO pLog;
|
||||
NTSTATUS Status;
|
||||
UNICODE_STRING UNCServerName;
|
||||
UNICODE_STRING FileName;
|
||||
RPC_UNICODE_STRING FileName;
|
||||
|
||||
TRACE("%s, %s\n", lpUNCServerName, lpFileName);
|
||||
TRACE("%s, %s\n", debugstr_w(lpUNCServerName), debugstr_w(lpFileName));
|
||||
|
||||
RtlInitUnicodeString(&UNCServerName, lpUNCServerName);
|
||||
RtlInitUnicodeString(&FileName, 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 @@ OpenBackupEventLogW(
|
|||
|
||||
Status = ElfrOpenBELW(
|
||||
pLog->BindingHandle,
|
||||
UNCServerName.Buffer,
|
||||
FileName.Buffer,
|
||||
(LPWSTR)lpUNCServerName,
|
||||
&FileName,
|
||||
0,
|
||||
0,
|
||||
&pLog->LogHandle);
|
||||
|
@ -509,13 +517,13 @@ OpenEventLogW(
|
|||
{
|
||||
PLOG_INFO pLog;
|
||||
NTSTATUS Status;
|
||||
UNICODE_STRING UNCServerName;
|
||||
UNICODE_STRING SourceName;
|
||||
RPC_UNICODE_STRING SourceName;
|
||||
|
||||
TRACE("%s, %s\n", lpUNCServerName, lpSourceName);
|
||||
TRACE("%s, %s\n", debugstr_w(lpUNCServerName), debugstr_w(lpSourceName));
|
||||
|
||||
RtlInitUnicodeString(&UNCServerName, lpUNCServerName);
|
||||
RtlInitUnicodeString(&SourceName, 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 @@ OpenEventLogW(
|
|||
|
||||
Status = ElfrOpenELW(
|
||||
pLog->BindingHandle,
|
||||
UNCServerName.Buffer,
|
||||
SourceName.Buffer,
|
||||
(LPWSTR)lpUNCServerName,
|
||||
&SourceName,
|
||||
NULL,
|
||||
0,
|
||||
0,
|
||||
|
@ -582,7 +590,7 @@ ReadEventLogA(
|
|||
{
|
||||
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 @@ ReadEventLogW(
|
|||
{
|
||||
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 @@ RegisterEventSourceW(
|
|||
{
|
||||
PLOG_INFO pLog;
|
||||
NTSTATUS Status;
|
||||
UNICODE_STRING UNCServerName;
|
||||
UNICODE_STRING SourceName;
|
||||
RPC_UNICODE_STRING SourceName;
|
||||
|
||||
TRACE("%s, %s\n", lpUNCServerName, lpSourceName);
|
||||
TRACE("%s, %s\n", debugstr_w(lpUNCServerName), debugstr_w(lpSourceName));
|
||||
|
||||
RtlInitUnicodeString(&UNCServerName, lpUNCServerName);
|
||||
RtlInitUnicodeString(&SourceName, 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 @@ RegisterEventSourceW(
|
|||
|
||||
Status = ElfrRegisterEventSourceW(
|
||||
pLog->BindingHandle,
|
||||
UNCServerName.Buffer,
|
||||
SourceName.Buffer,
|
||||
L"",
|
||||
(LPWSTR)lpUNCServerName,
|
||||
&SourceName,
|
||||
NULL,
|
||||
0,
|
||||
0,
|
||||
&pLog->LogHandle);
|
||||
|
|
|
@ -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)
|
||||
uuid(82273FDC-E32A-18C3-3F78-827929DC23EA),
|
||||
version(0.0),
|
||||
pointer_default(unique)
|
||||
#ifndef __midl
|
||||
,explicit_handle
|
||||
,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(
|
||||
/* Function 0 */
|
||||
NTSTATUS ElfrClearELFW(
|
||||
#ifndef __midl
|
||||
handle_t BindingHandle,
|
||||
[in] handle_t BindingHandle,
|
||||
#endif
|
||||
[in] LOGHANDLE Handle,
|
||||
[in] PUNICODE_STRING BackupName);
|
||||
[in] IELF_HANDLE LogHandle,
|
||||
[in, unique] PRPC_UNICODE_STRING BackupFileName);
|
||||
|
||||
/* Function 0x01 */
|
||||
NTSTATUS ElfrBackupELFW(
|
||||
/* Function 1 */
|
||||
NTSTATUS ElfrBackupELFW(
|
||||
#ifndef __midl
|
||||
handle_t BindingHandle,
|
||||
[in] handle_t BindingHandle,
|
||||
#endif
|
||||
[in] LOGHANDLE Handle,
|
||||
[in] PUNICODE_STRING BackupName);
|
||||
[in] IELF_HANDLE LogHandle,
|
||||
[in, unique] PRPC_UNICODE_STRING BackupFileName);
|
||||
|
||||
/* Function 0x02 */
|
||||
NTSTATUS ElfrCloseEL(
|
||||
/* Function 2 */
|
||||
NTSTATUS ElfrCloseEL(
|
||||
#ifndef __midl
|
||||
handle_t BindingHandle,
|
||||
[in] handle_t BindingHandle,
|
||||
#endif
|
||||
[in,out] PLOGHANDLE Handle);
|
||||
[in, out] IELF_HANDLE *LogHandle);
|
||||
|
||||
/* Function 0x03 */
|
||||
NTSTATUS ElfrDeregisterEventSource(
|
||||
/* Function 3 */
|
||||
NTSTATUS ElfrDeregisterEventSource(
|
||||
#ifndef __midl
|
||||
handle_t BindingHandle,
|
||||
[in] handle_t BindingHandle,
|
||||
#endif
|
||||
[in,out] PLOGHANDLE Handle);
|
||||
[in, out] IELF_HANDLE *LogHandle);
|
||||
|
||||
/* Function 0x04 */
|
||||
NTSTATUS ElfrNumberOfRecords(
|
||||
/* Function 4 */
|
||||
NTSTATUS ElfrNumberOfRecords(
|
||||
#ifndef __midl
|
||||
handle_t BindingHandle,
|
||||
[in] handle_t BindingHandle,
|
||||
#endif
|
||||
[in] LOGHANDLE Handle,
|
||||
[out] long *NumberOfRecords);
|
||||
[in] IELF_HANDLE LogHandle,
|
||||
[out] DWORD *NumberOfRecords);
|
||||
|
||||
/* Function 0x05 */
|
||||
NTSTATUS ElfrOldestRecord(
|
||||
/* Function 5 */
|
||||
NTSTATUS ElfrOldestRecord(
|
||||
#ifndef __midl
|
||||
handle_t BindingHandle,
|
||||
handle_t BindingHandle,
|
||||
#endif
|
||||
[in] LOGHANDLE LogHandle,
|
||||
[out] long *OldestRecNumber);
|
||||
[in] IELF_HANDLE LogHandle,
|
||||
[out] DWORD *OldestRecordNumber);
|
||||
|
||||
/* Function 0x06 */
|
||||
//NTSTATUS ElfrChangeNotify(); // FIXME
|
||||
|
||||
/* Function 0x07 */
|
||||
NTSTATUS ElfrOpenELW(
|
||||
/* Function 6 */
|
||||
NTSTATUS ElfrChangeNotify(
|
||||
#ifndef __midl
|
||||
handle_t BindingHandle,
|
||||
[in] 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 );
|
||||
[in] IELF_HANDLE *LogHandle,
|
||||
[in] RPC_CLIENT_ID ClientId,
|
||||
[in] DWORD Event);
|
||||
|
||||
/* Function 0x08 */
|
||||
NTSTATUS ElfrRegisterEventSourceW(
|
||||
/* Function 7 */
|
||||
NTSTATUS ElfrOpenELW(
|
||||
#ifndef __midl
|
||||
handle_t BindingHandle,
|
||||
[in] 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);
|
||||
[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 0x09 */
|
||||
NTSTATUS ElfrOpenBELW(
|
||||
/* Function 8 */
|
||||
NTSTATUS ElfrRegisterEventSourceW(
|
||||
#ifndef __midl
|
||||
handle_t BindingHandle,
|
||||
[in] handle_t BindingHandle,
|
||||
#endif
|
||||
[in, unique] LPWSTR ServerName,
|
||||
[in] PUNICODE_STRING BackupName,
|
||||
[in] long MajorVer,
|
||||
[in] long MinorVer,
|
||||
[out] PLOGHANDLE Handle);
|
||||
[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 0x0a */
|
||||
NTSTATUS ElfrReadELW(
|
||||
/* Function 9 */
|
||||
NTSTATUS ElfrOpenBELW(
|
||||
#ifndef __midl
|
||||
handle_t BindingHandle,
|
||||
[in] 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);
|
||||
[in] EVENTLOG_HANDLE_W UNCServerName,
|
||||
[in] PRPC_UNICODE_STRING BackupFileName,
|
||||
[in] DWORD MajorVersion,
|
||||
[in] DWORD MinorVersion,
|
||||
[out] IELF_HANDLE* LogHandle);
|
||||
|
||||
/* Function 0x0b */
|
||||
NTSTATUS ElfrReportEventW(
|
||||
/* Function 10 */
|
||||
NTSTATUS ElfrReadELW(
|
||||
#ifndef __midl
|
||||
handle_t BindingHandle,
|
||||
[in] 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);
|
||||
[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 0x0c */
|
||||
NTSTATUS ElfrClearELFA(
|
||||
/* Function 11 */
|
||||
NTSTATUS ElfrReportEventW(
|
||||
#ifndef __midl
|
||||
handle_t BindingHandle,
|
||||
[in] handle_t BindingHandle,
|
||||
#endif
|
||||
[in] LOGHANDLE Handle,
|
||||
[in,unique] PANSI_STRING BackupName);
|
||||
[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 0x0d */
|
||||
NTSTATUS ElfrBackupELFA(
|
||||
/* Function 12 */
|
||||
NTSTATUS ElfrClearELFA(
|
||||
#ifndef __midl
|
||||
handle_t BindingHandle,
|
||||
[in] handle_t BindingHandle,
|
||||
#endif
|
||||
[in] LOGHANDLE Handle,
|
||||
[in] PANSI_STRING BackupName);
|
||||
[in] IELF_HANDLE LogHandle,
|
||||
[in, unique] PRPC_STRING BackupFileName);
|
||||
|
||||
/* Function 0x0e */
|
||||
NTSTATUS ElfrOpenELA(
|
||||
/* Function 13 */
|
||||
NTSTATUS ElfrBackupELFA(
|
||||
#ifndef __midl
|
||||
handle_t BindingHandle,
|
||||
[in] 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);
|
||||
[in] IELF_HANDLE LogHandle,
|
||||
[in, unique] PRPC_STRING BackupFileName);
|
||||
|
||||
/* Function 0x0f */
|
||||
NTSTATUS ElfrRegisterEventSourceA(
|
||||
/* Function 14 */
|
||||
NTSTATUS ElfrOpenELA(
|
||||
#ifndef __midl
|
||||
handle_t BindingHandle,
|
||||
[in] 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);
|
||||
[in] EVENTLOG_HANDLE_A UNCServerName,
|
||||
[in] PRPC_STRING ModuleName,
|
||||
[in] PRPC_STRING RegModuleName,
|
||||
[in] DWORD MajorVersion,
|
||||
[in] DWORD MinorVersion,
|
||||
[out] IELF_HANDLE* LogHandle);
|
||||
|
||||
/* Function 0x10 */
|
||||
NTSTATUS ElfrOpenBELA(
|
||||
/* Function 15 */
|
||||
NTSTATUS ElfrRegisterEventSourceA(
|
||||
#ifndef __midl
|
||||
handle_t BindingHandle,
|
||||
[in] handle_t BindingHandle,
|
||||
#endif
|
||||
[in, unique] LPSTR ServerName,
|
||||
[in] PANSI_STRING BakckupName,
|
||||
[in] long MajorVer,
|
||||
[in] long MinorVer,
|
||||
[out] PLOGHANDLE Handle);
|
||||
[in] EVENTLOG_HANDLE_A UNCServerName,
|
||||
[in] PRPC_STRING ModuleName,
|
||||
[in] PRPC_STRING RegModuleName,
|
||||
[in] DWORD MajorVersion,
|
||||
[in] DWORD MinorVersion,
|
||||
[out] IELF_HANDLE* LogHandle);
|
||||
|
||||
/* Function 0x11 */
|
||||
NTSTATUS ElfrReadELA(
|
||||
/* Function 16 */
|
||||
NTSTATUS ElfrOpenBELA(
|
||||
#ifndef __midl
|
||||
handle_t BindingHandle,
|
||||
[in] 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);
|
||||
[in] EVENTLOG_HANDLE_A UNCServerName,
|
||||
[in] PRPC_STRING BackupFileName,
|
||||
[in] DWORD MajorVersion,
|
||||
[in] DWORD MinorVersion,
|
||||
[out] IELF_HANDLE* LogHandle);
|
||||
|
||||
/* Function 0x12 */
|
||||
NTSTATUS ElfrReportEventA(
|
||||
/* Function 17 */
|
||||
NTSTATUS ElfrReadELA(
|
||||
#ifndef __midl
|
||||
handle_t BindingHandle,
|
||||
[in] 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);
|
||||
[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 0x13 */
|
||||
//NTSTATUS ElfrRegisterClusterSvc(); //FIXME
|
||||
|
||||
/* Function 0x14 */
|
||||
//NTSTATUS ElfrDeregisterClusterSvc(); //FIXME
|
||||
|
||||
/* Function 0x15 */
|
||||
//NTSTATUS ElfrWriteClusterEvents(); //FIXME
|
||||
|
||||
/* Function 0x16 */
|
||||
NTSTATUS ElfrGetLogInformation(
|
||||
/* Function 18 */
|
||||
NTSTATUS ElfrReportEventA(
|
||||
#ifndef __midl
|
||||
handle_t BindingHandle,
|
||||
[in] handle_t BindingHandle,
|
||||
#endif
|
||||
[in] LOGHANDLE Handle,
|
||||
[in] long InfoLevel,
|
||||
[out, size_is(BufSize)] unsigned char *Buffer,
|
||||
[in] long BufSize,
|
||||
[out] long *BytesNeeded);
|
||||
[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 0x17 */
|
||||
NTSTATUS ElfrFlushEL(
|
||||
/* Function 19 */
|
||||
NTSTATUS ElfrRegisterClusterSvc(
|
||||
#ifndef __midl
|
||||
handle_t BindingHandle,
|
||||
[in] handle_t BindingHandle
|
||||
#endif
|
||||
[in] LOGHANDLE Handle);
|
||||
); /* 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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue