static void zbx_get_message_files(const wchar_t *szLogName, const wchar_t *szSourceName, wchar_t **pEventMessageFile,
#include "zbx_item_constants.h"
static const wchar_t *RENDER_ITEMS[] = {
L"/Event/System/Provider/@Name",
L"/Event/System/Provider/@EventSourceName",
L"/Event/System/EventRecordID",
L"/Event/System/EventID",
L"/Event/System/Keywords",
L"/Event/System/TimeCreated/@SystemTime",
#define RENDER_ITEMS_COUNT (sizeof(RENDER_ITEMS) / sizeof(const wchar_t *))
#define VAR_PROVIDER_NAME(p) (p[0].StringVal)
#define VAR_SOURCE_NAME(p) (p[1].StringVal)
#define VAR_RECORD_NUMBER(p) (p[2].UInt64Val)
#define VAR_EVENT_ID(p) (p[3].UInt16Val)
#define VAR_LEVEL(p) (p[4].ByteVal)
#define VAR_KEYWORDS(p) (p[5].UInt64Val)
#define VAR_TIME_CREATED(p) (p[6].FileTimeVal)
#define VAR_EVENT_DATA_STRING(p) (p[7].StringVal)
#define VAR_EVENT_DATA_STRING_ARRAY(p, i) (p[7].StringArr[i])
#define VAR_EVENT_DATA_TYPE(p) (p[7].Type)
#define VAR_EVENT_DATA_COUNT(p) (p[7].Count)
#define EVENTLOG_REG_PATH TEXT("SYSTEM\\CurrentControlSet\\Services\\EventLog\\")
# define INFORMATION_TYPE "Information"
# define WARNING_TYPE "Warning"
# define ERROR_TYPE "Error"
# define AUDIT_FAILURE "Failure Audit"
# define AUDIT_SUCCESS "Success Audit"
# define CRITICAL_TYPE "Critical"
# define VERBOSE_TYPE "Verbose"
extern int CONFIG_EVENTLOG_MAX_LINES_PER_SECOND;
LONG WINAPI DelayLoadDllExceptionFilter(PEXCEPTION_POINTERS excpointers)
LONG disposition = EXCEPTION_EXECUTE_HANDLER;
PDelayLoadInfo delayloadinfo = (PDelayLoadInfo)(excpointers->ExceptionRecord->ExceptionInformation[0]);
switch (excpointers->ExceptionRecord->ExceptionCode)