137 String m_sListeningChannel;
138 void* m_pSubscriptionHandle;
141 static void RegisterChannelIfNew(
const String& sChannelName);
143 static DWORD WINAPI Win32EvtSubscribeCallback(EVT_SUBSCRIBE_NOTIFY_ACTION action, PVOID pUserContext, EVT_HANDLE hEvent);
146 static void FormatEtwEventXml(EVT_HANDLE hEvt,
EtwEvent& evt);
147 static void FormatEtwEventMessage(EVT_HANDLE hEvt,
EtwEvent& evt);
148 static EtwEvent ProcessSingleEtwEvent(EVT_HANDLE hContext, EVT_HANDLE hEvt,
const String& sChannelName);
152 static unsigned long long FastQueryLevelCount(
const std::wstring& wChannel,
const wchar_t* pwszFilter);
153 static void CountWin32EventsByLevel(
const std::wstring& wChannel,
EtwEventLevelCounts& counts);
Encapsulates a delegate method that has parameters and returns void.
Defines common cross-platform macros, export decorators, and fundamental types.
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Represents a strongly typed list of objects that can be accessed by index mirroring ....
Base object class for DotNetDupe mirroring .NET System.Object.
Provides reference-counted and weak pointer memory management primitives ensuring zero raw ownership.
High-performance UTF-8 / UTF-16 string manipulation class mirroring .NET System.String.
Encapsulates a method that has parameters and does not return a value.
Represents a strongly typed list of objects accessible by index.
Represents a point in time, typically expressed as a date and time of day, relative to Coordinated Un...
EtwLogReader()
Initializes a new instance of EtwLogReader.
void StopListening()
Terminates active real-time event listening and closes subscription handles.
static Collections::Generic::List< String > GetEventChannels()
Enumerates all registered ETW and Windows Event Log channel paths.
static EtwEventLevelCounts GetChannelEventLevelCounts(const String &sChannelName)
Aggregates the count of events in a channel broken down by severity level.
static Collections::Generic::List< EtwEvent > ReadEvents(const String &sChannelName)
Reads all available events from the specified channel.
void StartListening(const String &sChannelName, Action< const EtwEvent & > fnCallback)
Initiates an asynchronous real-time subscription to events on the specified channel.
static unsigned long long GetChannelEventCount(const String &sChannelName)
Retrieves total number of recorded events in a channel.
String GetListeningChannel() const
Retrieves the name of the channel currently being listened to.
bool IsListening() const
Indicates whether an active subscription is running.
Supports all classes in the DotNetDupe class hierarchy.
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
EtwEventLevel
Filter levels corresponding to standard Windows ETW severity classifications.
@ Info
Normal operational informational events.
@ All
All events regardless of level.
@ Verbose
Detailed developer or diagnostic trace information.
Represents an individual Event Tracing for Windows (ETW) event record.
int iLevel
Severity level of the event.
String sMessage
Formatted textual description of the event.
String sRawXml
Raw XML representation of the ETW payload.
int iEventId
Numeric identifier for the event type.
DateTimeOffset dtTimeCreated
Precise timestamp when the event was generated.
String sChannelName
Name of the event log channel (e.g. "Application", "System").
String sProviderName
Name or GUID of the publishing event provider.
Aggregate counts of events partitioned by severity level within a channel.
unsigned long long uVerboseCount
Number of Verbose level events.
unsigned long long uCriticalCount
Number of Critical level events.
unsigned long long uErrorCount
Number of Error level events.
unsigned long long uInfoCount
Number of Information level events.
unsigned long long uWarningCount
Number of Warning level events.