31#define ROUND_DOWN(n, align) (((ULONG)n) & ~((align) - 1l))
35#define ROUND_UP(n, align) ROUND_DOWN(((ULONG)n) + (align) - 1, (align))
43#define LOGFILE_SIGNATURE 0x654c664c
48#define ELF_LOGFILE_HEADER_DIRTY 1
49#define ELF_LOGFILE_HEADER_WRAP 2
50#define ELF_LOGFILE_LOGFULL_WRITTEN 4
51#define ELF_LOGFILE_ARCHIVE_SET 8
83#define EVENTLOG_SUCCESS 0
84#define EVENTLOG_ERROR_TYPE 1
85#define EVENTLOG_WARNING_TYPE 2
86#define EVENTLOG_INFORMATION_TYPE 4
87#define EVENTLOG_AUDIT_SUCCESS 8
88#define EVENTLOG_AUDIT_FAILURE 16
139#define EVENTLOGEOF_SIZE_FIXED (5 * sizeof(ULONG))
151#define TAG_ELF ' flE'
152#define TAG_ELF_BUF 'BflE'
_In_ PFCB _In_ LONGLONG FileOffset
NTSTATUS(NTAPI * PELF_FILE_FLUSH_ROUTINE)(IN struct _EVTLOGFILE *LogFile, IN PLARGE_INTEGER FileOffset, IN ULONG Length)
PVOID(NTAPI * PELF_ALLOCATE_ROUTINE)(IN SIZE_T Size, IN ULONG Flags, IN ULONG Tag)
NTSTATUS NTAPI ElfReCreateFile(IN PEVTLOGFILE LogFile)
VOID(NTAPI * PELF_FREE_ROUTINE)(IN PVOID Ptr, IN ULONG Flags, IN ULONG Tag)
struct _EVENT_OFFSET_INFO * PEVENT_OFFSET_INFO
VOID NTAPI ElfCloseFile(IN PEVTLOGFILE LogFile)
struct _EVENTLOGHEADER * PEVENTLOGHEADER
struct _EVENTLOGEOF EVENTLOGEOF
NTSTATUS(NTAPI * PELF_FILE_SET_SIZE_ROUTINE)(IN struct _EVTLOGFILE *LogFile, IN ULONG FileSize, IN ULONG OldFileSize)
NTSTATUS NTAPI ElfWriteRecord(IN PEVTLOGFILE LogFile, IN PEVENTLOGRECORD Record, IN SIZE_T BufSize)
ULONG NTAPI ElfGetOldestRecord(IN PEVTLOGFILE LogFile)
NTSTATUS NTAPI ElfFlushFile(IN PEVTLOGFILE LogFile)
NTSTATUS NTAPI ElfCreateFile(IN OUT PEVTLOGFILE LogFile, IN PUNICODE_STRING FileName OPTIONAL, IN ULONG FileSize, IN ULONG MaxSize, IN ULONG Retention, IN BOOLEAN CreateNew, IN BOOLEAN ReadOnly, IN PELF_ALLOCATE_ROUTINE Allocate, IN PELF_FREE_ROUTINE Free, IN PELF_FILE_SET_SIZE_ROUTINE FileSetSize, IN PELF_FILE_WRITE_ROUTINE FileWrite, IN PELF_FILE_READ_ROUTINE FileRead, IN PELF_FILE_FLUSH_ROUTINE FileFlush)
struct _EVTLOGFILE EVTLOGFILE
NTSTATUS NTAPI ElfBackupFile(IN PEVTLOGFILE LogFile, IN PEVTLOGFILE BackupLogFile)
ULONG NTAPI ElfGetCurrentRecord(IN PEVTLOGFILE LogFile)
ULONG NTAPI ElfGetFlags(IN PEVTLOGFILE LogFile)
NTSTATUS NTAPI ElfReadRecord(IN PEVTLOGFILE LogFile, IN ULONG RecordNumber, OUT PEVENTLOGRECORD Record, IN SIZE_T BufSize, OUT PSIZE_T BytesRead OPTIONAL, OUT PSIZE_T BytesNeeded OPTIONAL)
struct _EVENTLOGHEADER EVENTLOGHEADER
struct _EVENTLOGEOF * PEVENTLOGEOF
NTSTATUS(NTAPI * PELF_FILE_READ_ROUTINE)(IN struct _EVTLOGFILE *LogFile, IN PLARGE_INTEGER FileOffset, OUT PVOID Buffer, IN SIZE_T Length, OUT PSIZE_T ReadLength OPTIONAL)
struct _EVENTLOGRECORD EVENTLOGRECORD
#define EVENTLOGEOF_SIZE_FIXED
struct _EVENTLOGRECORD * PEVENTLOGRECORD
struct _EVTLOGFILE * PEVTLOGFILE
struct _EVENT_OFFSET_INFO EVENT_OFFSET_INFO
NTSTATUS(NTAPI * PELF_FILE_WRITE_ROUTINE)(IN struct _EVTLOGFILE *LogFile, IN PLARGE_INTEGER FileOffset, IN PVOID Buffer, IN SIZE_T Length, OUT PSIZE_T WrittenLength OPTIONAL)
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
_In_ ULONG _In_ ULONG _In_ ULONG Length
PULONG MinorVersion OPTIONAL
ULONG CurrentRecordNumber
ULONG RecordSizeBeginning
ULONG ClosingRecordNumber
PELF_ALLOCATE_ROUTINE Allocate
PELF_FILE_FLUSH_ROUTINE FileFlush
PELF_FILE_WRITE_ROUTINE FileWrite
PEVENT_OFFSET_INFO OffsetInfo
PELF_FILE_READ_ROUTINE FileRead
PELF_FILE_SET_SIZE_ROUTINE FileSetSize
#define FIELD_OFFSET(t, f)
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesRead
_Must_inspect_result_ _In_ ULONG Flags
_In_opt_ PALLOCATE_FUNCTION Allocate
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
_In_ struct _KBUGCHECK_REASON_CALLBACK_RECORD * Record