Trying to print the event ID using WIN32 API gives incorrect data.
UINT16 EventID;
EventID = pRenderedValues[EvtSystemEventID].UInt16Val;
eventIDString.Format(" [EventID : %hu] ", EventID);
dataBuffer += eventIDString;
Ref: https://learn.microsoft.com/en-us/windows/win32/wes/rendering-events
The code from reference
DWORD EventID = pRenderedValues[EvtSystemEventID].UInt16Val;
if (EvtVarTypeNull != pRenderedValues[EvtSystemQualifiers].Type)
{
EventID = MAKELONG(pRenderedValues[EvtSystemEventID].UInt16Val, pRenderedValues[EvtSystemQualifiers].UInt16Val);
}
wprintf(L"EventID: %lun", EventID);
How do I print event ID.