[EVENTLOG] Use the STDCALL calling convention for all remote procedure calls.

This commit is contained in:
Eric Kohl 2017-11-12 15:54:22 +01:00
parent 7dd8ebcbbd
commit 52fa3479f3
2 changed files with 100 additions and 25 deletions

View file

@ -285,6 +285,7 @@ ElfDeleteEventLogHandle(PIELF_HANDLE LogHandle)
/* Function 0 */ /* Function 0 */
NTSTATUS NTSTATUS
WINAPI
ElfrClearELFW( ElfrClearELFW(
IELF_HANDLE LogHandle, IELF_HANDLE LogHandle,
PRPC_UNICODE_STRING BackupFileName) PRPC_UNICODE_STRING BackupFileName)
@ -308,6 +309,7 @@ ElfrClearELFW(
/* Function 1 */ /* Function 1 */
NTSTATUS NTSTATUS
WINAPI
ElfrBackupELFW( ElfrBackupELFW(
IELF_HANDLE LogHandle, IELF_HANDLE LogHandle,
PRPC_UNICODE_STRING BackupFileName) PRPC_UNICODE_STRING BackupFileName)
@ -327,6 +329,7 @@ ElfrBackupELFW(
/* Function 2 */ /* Function 2 */
NTSTATUS NTSTATUS
WINAPI
ElfrCloseEL( ElfrCloseEL(
PIELF_HANDLE LogHandle) PIELF_HANDLE LogHandle)
{ {
@ -336,6 +339,7 @@ ElfrCloseEL(
/* Function 3 */ /* Function 3 */
NTSTATUS NTSTATUS
WINAPI
ElfrDeregisterEventSource( ElfrDeregisterEventSource(
PIELF_HANDLE LogHandle) PIELF_HANDLE LogHandle)
{ {
@ -345,6 +349,7 @@ ElfrDeregisterEventSource(
/* Function 4 */ /* Function 4 */
NTSTATUS NTSTATUS
WINAPI
ElfrNumberOfRecords( ElfrNumberOfRecords(
IELF_HANDLE LogHandle, IELF_HANDLE LogHandle,
PULONG NumberOfRecords) PULONG NumberOfRecords)
@ -393,6 +398,7 @@ ElfrNumberOfRecords(
/* Function 5 */ /* Function 5 */
NTSTATUS NTSTATUS
WINAPI
ElfrOldestRecord( ElfrOldestRecord(
IELF_HANDLE LogHandle, IELF_HANDLE LogHandle,
PULONG OldestRecordNumber) PULONG OldestRecordNumber)
@ -423,6 +429,7 @@ ElfrOldestRecord(
/* Function 6 */ /* Function 6 */
NTSTATUS NTSTATUS
WINAPI
ElfrChangeNotify( ElfrChangeNotify(
IELF_HANDLE LogHandle, IELF_HANDLE LogHandle,
RPC_CLIENT_ID ClientId, RPC_CLIENT_ID ClientId,
@ -435,6 +442,7 @@ ElfrChangeNotify(
/* Function 7 */ /* Function 7 */
NTSTATUS NTSTATUS
WINAPI
ElfrOpenELW( ElfrOpenELW(
EVENTLOG_HANDLE_W UNCServerName, EVENTLOG_HANDLE_W UNCServerName,
PRPC_UNICODE_STRING ModuleName, PRPC_UNICODE_STRING ModuleName,
@ -462,6 +470,7 @@ ElfrOpenELW(
/* Function 8 */ /* Function 8 */
NTSTATUS NTSTATUS
WINAPI
ElfrRegisterEventSourceW( ElfrRegisterEventSourceW(
EVENTLOG_HANDLE_W UNCServerName, EVENTLOG_HANDLE_W UNCServerName,
PRPC_UNICODE_STRING ModuleName, PRPC_UNICODE_STRING ModuleName,
@ -493,6 +502,7 @@ ElfrRegisterEventSourceW(
/* Function 9 */ /* Function 9 */
NTSTATUS NTSTATUS
WINAPI
ElfrOpenBELW( ElfrOpenBELW(
EVENTLOG_HANDLE_W UNCServerName, EVENTLOG_HANDLE_W UNCServerName,
PRPC_UNICODE_STRING BackupFileName, PRPC_UNICODE_STRING BackupFileName,
@ -516,6 +526,7 @@ ElfrOpenBELW(
/* Function 10 */ /* Function 10 */
NTSTATUS NTSTATUS
WINAPI
ElfrReadELW( ElfrReadELW(
IELF_HANDLE LogHandle, IELF_HANDLE LogHandle,
ULONG ReadFlags, ULONG ReadFlags,
@ -709,6 +720,7 @@ ElfrIntReportEventW(
/* Function 11 */ /* Function 11 */
NTSTATUS NTSTATUS
WINAPI
ElfrReportEventW( ElfrReportEventW(
IELF_HANDLE LogHandle, IELF_HANDLE LogHandle,
ULONG Time, ULONG Time,
@ -746,6 +758,7 @@ ElfrReportEventW(
/* Function 12 */ /* Function 12 */
NTSTATUS NTSTATUS
WINAPI
ElfrClearELFA( ElfrClearELFA(
IELF_HANDLE LogHandle, IELF_HANDLE LogHandle,
PRPC_STRING BackupFileName) PRPC_STRING BackupFileName)
@ -770,6 +783,7 @@ ElfrClearELFA(
/* Function 13 */ /* Function 13 */
NTSTATUS NTSTATUS
WINAPI
ElfrBackupELFA( ElfrBackupELFA(
IELF_HANDLE LogHandle, IELF_HANDLE LogHandle,
PRPC_STRING BackupFileName) PRPC_STRING BackupFileName)
@ -794,6 +808,7 @@ ElfrBackupELFA(
/* Function 14 */ /* Function 14 */
NTSTATUS NTSTATUS
WINAPI
ElfrOpenELA( ElfrOpenELA(
EVENTLOG_HANDLE_A UNCServerName, EVENTLOG_HANDLE_A UNCServerName,
PRPC_STRING ModuleName, PRPC_STRING ModuleName,
@ -830,6 +845,7 @@ ElfrOpenELA(
/* Function 15 */ /* Function 15 */
NTSTATUS NTSTATUS
WINAPI
ElfrRegisterEventSourceA( ElfrRegisterEventSourceA(
EVENTLOG_HANDLE_A UNCServerName, EVENTLOG_HANDLE_A UNCServerName,
PRPC_STRING ModuleName, PRPC_STRING ModuleName,
@ -877,6 +893,7 @@ ElfrRegisterEventSourceA(
/* Function 16 */ /* Function 16 */
NTSTATUS NTSTATUS
WINAPI
ElfrOpenBELA( ElfrOpenBELA(
EVENTLOG_HANDLE_A UNCServerName, EVENTLOG_HANDLE_A UNCServerName,
PRPC_STRING BackupFileName, PRPC_STRING BackupFileName,
@ -919,6 +936,7 @@ ElfrOpenBELA(
/* Function 17 */ /* Function 17 */
NTSTATUS NTSTATUS
WINAPI
ElfrReadELA( ElfrReadELA(
IELF_HANDLE LogHandle, IELF_HANDLE LogHandle,
ULONG ReadFlags, ULONG ReadFlags,
@ -970,6 +988,7 @@ ElfrReadELA(
/* Function 18 */ /* Function 18 */
NTSTATUS NTSTATUS
WINAPI
ElfrReportEventA( ElfrReportEventA(
IELF_HANDLE LogHandle, IELF_HANDLE LogHandle,
ULONG Time, ULONG Time,
@ -1088,6 +1107,7 @@ Done:
/* Function 19 */ /* Function 19 */
NTSTATUS NTSTATUS
WINAPI
ElfrRegisterClusterSvc( ElfrRegisterClusterSvc(
handle_t BindingHandle) handle_t BindingHandle)
{ {
@ -1098,6 +1118,7 @@ ElfrRegisterClusterSvc(
/* Function 20 */ /* Function 20 */
NTSTATUS NTSTATUS
WINAPI
ElfrDeregisterClusterSvc( ElfrDeregisterClusterSvc(
handle_t BindingHandle) handle_t BindingHandle)
{ {
@ -1108,6 +1129,7 @@ ElfrDeregisterClusterSvc(
/* Function 21 */ /* Function 21 */
NTSTATUS NTSTATUS
WINAPI
ElfrWriteClusterEvents( ElfrWriteClusterEvents(
handle_t BindingHandle) handle_t BindingHandle)
{ {
@ -1118,6 +1140,7 @@ ElfrWriteClusterEvents(
/* Function 22 */ /* Function 22 */
NTSTATUS NTSTATUS
WINAPI
ElfrGetLogInformation( ElfrGetLogInformation(
IELF_HANDLE LogHandle, IELF_HANDLE LogHandle,
ULONG InfoLevel, ULONG InfoLevel,
@ -1169,6 +1192,7 @@ ElfrGetLogInformation(
/* Function 23 */ /* Function 23 */
NTSTATUS NTSTATUS
WINAPI
ElfrFlushEL( ElfrFlushEL(
IELF_HANDLE LogHandle) IELF_HANDLE LogHandle)
{ {
@ -1196,6 +1220,7 @@ ElfrFlushEL(
/* Function 24 */ /* Function 24 */
NTSTATUS NTSTATUS
WINAPI
ElfrReportEventAndSourceW( ElfrReportEventAndSourceW(
IELF_HANDLE LogHandle, IELF_HANDLE LogHandle,
ULONG Time, ULONG Time,

View file

@ -42,41 +42,57 @@ typedef struct _RPC_CLIENT_ID {
interface eventlog interface eventlog
{ {
/* Function 0 */ /* Function 0 */
NTSTATUS ElfrClearELFW( NTSTATUS
__stdcall
ElfrClearELFW(
[in] IELF_HANDLE LogHandle, [in] IELF_HANDLE LogHandle,
[in, unique] PRPC_UNICODE_STRING BackupFileName); [in, unique] PRPC_UNICODE_STRING BackupFileName);
/* Function 1 */ /* Function 1 */
NTSTATUS ElfrBackupELFW( NTSTATUS
__stdcall
ElfrBackupELFW(
[in] IELF_HANDLE LogHandle, [in] IELF_HANDLE LogHandle,
[in, unique] PRPC_UNICODE_STRING BackupFileName); [in, unique] PRPC_UNICODE_STRING BackupFileName);
/* Function 2 */ /* Function 2 */
NTSTATUS ElfrCloseEL( NTSTATUS
__stdcall
ElfrCloseEL(
[in, out] PIELF_HANDLE LogHandle); [in, out] PIELF_HANDLE LogHandle);
/* Function 3 */ /* Function 3 */
NTSTATUS ElfrDeregisterEventSource( NTSTATUS
__stdcall
ElfrDeregisterEventSource(
[in, out] PIELF_HANDLE LogHandle); [in, out] PIELF_HANDLE LogHandle);
/* Function 4 */ /* Function 4 */
NTSTATUS ElfrNumberOfRecords( NTSTATUS
__stdcall
ElfrNumberOfRecords(
[in] IELF_HANDLE LogHandle, [in] IELF_HANDLE LogHandle,
[out] PULONG NumberOfRecords); [out] PULONG NumberOfRecords);
/* Function 5 */ /* Function 5 */
NTSTATUS ElfrOldestRecord( NTSTATUS
__stdcall
ElfrOldestRecord(
[in] IELF_HANDLE LogHandle, [in] IELF_HANDLE LogHandle,
[out] PULONG OldestRecordNumber); [out] PULONG OldestRecordNumber);
/* Function 6 */ /* Function 6 */
NTSTATUS ElfrChangeNotify( NTSTATUS
__stdcall
ElfrChangeNotify(
[in] IELF_HANDLE LogHandle, [in] IELF_HANDLE LogHandle,
[in] RPC_CLIENT_ID ClientId, [in] RPC_CLIENT_ID ClientId,
[in] ULONG Event); [in] ULONG Event);
/* Function 7 */ /* Function 7 */
NTSTATUS ElfrOpenELW( NTSTATUS
__stdcall
ElfrOpenELW(
[in, unique] EVENTLOG_HANDLE_W UNCServerName, /* FIXME */ [in, unique] EVENTLOG_HANDLE_W UNCServerName, /* FIXME */
[in] PRPC_UNICODE_STRING ModuleName, [in] PRPC_UNICODE_STRING ModuleName,
[in] PRPC_UNICODE_STRING RegModuleName, [in] PRPC_UNICODE_STRING RegModuleName,
@ -85,7 +101,9 @@ interface eventlog
[out] PIELF_HANDLE LogHandle); [out] PIELF_HANDLE LogHandle);
/* Function 8 */ /* Function 8 */
NTSTATUS ElfrRegisterEventSourceW( NTSTATUS
__stdcall
ElfrRegisterEventSourceW(
[in, unique] EVENTLOG_HANDLE_W UNCServerName, /* FIXME */ [in, unique] EVENTLOG_HANDLE_W UNCServerName, /* FIXME */
[in] PRPC_UNICODE_STRING ModuleName, [in] PRPC_UNICODE_STRING ModuleName,
[in] PRPC_UNICODE_STRING RegModuleName, [in] PRPC_UNICODE_STRING RegModuleName,
@ -94,7 +112,9 @@ interface eventlog
[out] PIELF_HANDLE LogHandle); [out] PIELF_HANDLE LogHandle);
/* Function 9 */ /* Function 9 */
NTSTATUS ElfrOpenBELW( NTSTATUS
__stdcall
ElfrOpenBELW(
[in, unique] EVENTLOG_HANDLE_W UNCServerName, /* FIXME */ [in, unique] EVENTLOG_HANDLE_W UNCServerName, /* FIXME */
[in] PRPC_UNICODE_STRING BackupFileName, [in] PRPC_UNICODE_STRING BackupFileName,
[in] ULONG MajorVersion, [in] ULONG MajorVersion,
@ -102,7 +122,9 @@ interface eventlog
[out] PIELF_HANDLE LogHandle); [out] PIELF_HANDLE LogHandle);
/* Function 10 */ /* Function 10 */
NTSTATUS ElfrReadELW( NTSTATUS
__stdcall
ElfrReadELW(
[in] IELF_HANDLE LogHandle, [in] IELF_HANDLE LogHandle,
[in] ULONG ReadFlags, [in] ULONG ReadFlags,
[in] ULONG RecordOffset, [in] ULONG RecordOffset,
@ -112,7 +134,9 @@ interface eventlog
[out] PULONG MinNumberOfBytesNeeded); [out] PULONG MinNumberOfBytesNeeded);
/* Function 11 */ /* Function 11 */
NTSTATUS ElfrReportEventW( NTSTATUS
__stdcall
ElfrReportEventW(
[in] IELF_HANDLE LogHandle, [in] IELF_HANDLE LogHandle,
[in] ULONG Time, [in] ULONG Time,
[in] USHORT EventType, [in] USHORT EventType,
@ -129,17 +153,23 @@ interface eventlog
[in, out, unique] PULONG TimeWritten); [in, out, unique] PULONG TimeWritten);
/* Function 12 */ /* Function 12 */
NTSTATUS ElfrClearELFA( NTSTATUS
__stdcall
ElfrClearELFA(
[in] IELF_HANDLE LogHandle, [in] IELF_HANDLE LogHandle,
[in, unique] PRPC_STRING BackupFileName); [in, unique] PRPC_STRING BackupFileName);
/* Function 13 */ /* Function 13 */
NTSTATUS ElfrBackupELFA( NTSTATUS
__stdcall
ElfrBackupELFA(
[in] IELF_HANDLE LogHandle, [in] IELF_HANDLE LogHandle,
[in, unique] PRPC_STRING BackupFileName); [in, unique] PRPC_STRING BackupFileName);
/* Function 14 */ /* Function 14 */
NTSTATUS ElfrOpenELA( NTSTATUS
__stdcall
ElfrOpenELA(
[in, unique] EVENTLOG_HANDLE_A UNCServerName, /* FIXME */ [in, unique] EVENTLOG_HANDLE_A UNCServerName, /* FIXME */
[in] PRPC_STRING ModuleName, [in] PRPC_STRING ModuleName,
[in] PRPC_STRING RegModuleName, [in] PRPC_STRING RegModuleName,
@ -148,7 +178,9 @@ interface eventlog
[out] PIELF_HANDLE LogHandle); [out] PIELF_HANDLE LogHandle);
/* Function 15 */ /* Function 15 */
NTSTATUS ElfrRegisterEventSourceA( NTSTATUS
__stdcall
ElfrRegisterEventSourceA(
[in, unique] EVENTLOG_HANDLE_A UNCServerName, /* FIXME */ [in, unique] EVENTLOG_HANDLE_A UNCServerName, /* FIXME */
[in] PRPC_STRING ModuleName, [in] PRPC_STRING ModuleName,
[in] PRPC_STRING RegModuleName, [in] PRPC_STRING RegModuleName,
@ -157,7 +189,9 @@ interface eventlog
[out] PIELF_HANDLE LogHandle); [out] PIELF_HANDLE LogHandle);
/* Function 16 */ /* Function 16 */
NTSTATUS ElfrOpenBELA( NTSTATUS
__stdcall
ElfrOpenBELA(
[in, unique] EVENTLOG_HANDLE_A UNCServerName, /* FIXME */ [in, unique] EVENTLOG_HANDLE_A UNCServerName, /* FIXME */
[in] PRPC_STRING BackupFileName, [in] PRPC_STRING BackupFileName,
[in] ULONG MajorVersion, [in] ULONG MajorVersion,
@ -165,7 +199,9 @@ interface eventlog
[out] PIELF_HANDLE LogHandle); [out] PIELF_HANDLE LogHandle);
/* Function 17 */ /* Function 17 */
NTSTATUS ElfrReadELA( NTSTATUS
__stdcall
ElfrReadELA(
[in] IELF_HANDLE LogHandle, [in] IELF_HANDLE LogHandle,
[in] ULONG ReadFlags, [in] ULONG ReadFlags,
[in] ULONG RecordOffset, [in] ULONG RecordOffset,
@ -175,7 +211,9 @@ interface eventlog
[out] PULONG MinNumberOfBytesNeeded); [out] PULONG MinNumberOfBytesNeeded);
/* Function 18 */ /* Function 18 */
NTSTATUS ElfrReportEventA( NTSTATUS
__stdcall
ElfrReportEventA(
[in] IELF_HANDLE LogHandle, [in] IELF_HANDLE LogHandle,
[in] ULONG Time, [in] ULONG Time,
[in] USHORT EventType, [in] USHORT EventType,
@ -192,19 +230,27 @@ interface eventlog
[in, out, unique] PULONG TimeWritten); [in, out, unique] PULONG TimeWritten);
/* Function 19 */ /* Function 19 */
NTSTATUS ElfrRegisterClusterSvc( NTSTATUS
__stdcall
ElfrRegisterClusterSvc(
[in] handle_t BindingHandle); [in] handle_t BindingHandle);
/* Function 20 */ /* Function 20 */
NTSTATUS ElfrDeregisterClusterSvc( NTSTATUS
__stdcall
ElfrDeregisterClusterSvc(
[in] handle_t BindingHandle); [in] handle_t BindingHandle);
/* Function 21 */ /* Function 21 */
NTSTATUS ElfrWriteClusterEvents( NTSTATUS
__stdcall
ElfrWriteClusterEvents(
[in] handle_t BindingHandle); [in] handle_t BindingHandle);
/* Function 22 */ /* Function 22 */
NTSTATUS ElfrGetLogInformation( NTSTATUS
__stdcall
ElfrGetLogInformation(
[in] IELF_HANDLE LogHandle, [in] IELF_HANDLE LogHandle,
[in] ULONG InfoLevel, [in] ULONG InfoLevel,
[out, size_is(cbBufSize)] PBYTE Buffer, [out, size_is(cbBufSize)] PBYTE Buffer,
@ -212,11 +258,15 @@ interface eventlog
[out] PULONG pcbBytesNeeded); [out] PULONG pcbBytesNeeded);
/* Function 23 */ /* Function 23 */
NTSTATUS ElfrFlushEL( NTSTATUS
__stdcall
ElfrFlushEL(
[in] IELF_HANDLE LogHandle); [in] IELF_HANDLE LogHandle);
/* Function 24 */ /* Function 24 */
NTSTATUS ElfrReportEventAndSourceW( NTSTATUS
__stdcall
ElfrReportEventAndSourceW(
[in] IELF_HANDLE LogHandle, [in] IELF_HANDLE LogHandle,
[in] ULONG Time, [in] ULONG Time,
[in] USHORT EventType, [in] USHORT EventType,