ETW_OPEN_TRACE_OPTIONS structure (evntrace.h)

Provides configuration parameters to OpenTraceFromBufferStream, OpenTraceFromFile, OpenTraceFromRealTimeLogger, OpenTraceFromRealTimeLoggerWithAllocationOptions functions.

Syntax

typedef struct ETW_OPEN_TRACE_OPTIONS {
  ETW_PROCESS_TRACE_MODES ProcessTraceModes;
  PEVENT_RECORD_CALLBACK  EventCallback;
  void                    *EventCallbackContext;
  PETW_BUFFER_CALLBACK    BufferCallback;
  void                    *BufferCallbackContext;
} ETW_OPEN_TRACE_OPTIONS;

Members

ProcessTraceModes

A bitfield enum providing further configurations for the processing sessions. Current supported values:

  • ETW_PROCESS_TRACE_MODE_NONE
  • ETW_PROCESS_TRACE_MODE_RAW_TIMESTAMP – Timestamps in the EVENT_RECORD provided to the EventCallback will not be converted to file time as they are by default. Instead, they will remain in the clock type of the original event (e.g. QueryPerformanceCounter, CPU timestamp counter, or GetSystemTimeAsFileTime).

EventCallback

Function pointer of type PEVENT_RECORD_CALLBACK. Called for each event in time order. If NULL then all event playback processing will be bypassed for improved performance.

EventCallbackContext

User defined context that will be available in EVENT_RECORD.UserContext inside the EventCallback.

BufferCallback

Called for each buffer once processing on that buffer is complete. If NULL then no buffer callback will be executed.

BufferCallbackContext

User defined context that will be passed to the BufferCallback as the CallbackContext parameter.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Header evntrace.h