Edit

Share via


evntrace.h header

This header is used by multiple technologies. For more information, see:

evntrace.h contains the following programming interfaces:

Functions

 
CloseTrace

The CloseTrace function closes a trace processing session that was created with OpenTrace.
ControlTraceA

The ControlTraceA (ANSI) function (evntrace.h) flushes, queries, updates, or stops the specified event tracing session.
ControlTraceW

The ControlTraceW (Unicode) function (evntrace.h) flushes, queries, updates, or stops the specified event tracing session.
CreateTraceInstanceId

A RegisterTraceGuids-based ("Classic") event provider uses the CreateTraceInstanceId function to create a unique transaction identifier and map it to a registration handle. The provider can then use the transaction identifier when calling the TraceEventInstance function.
EnableTrace

A trace session controller calls EnableTrace to configure how an ETW event provider logs events to a trace session. The EnableTraceEx2 function supersedes this function.
EnableTraceEx

A trace session controller calls EnableTraceEx to configure how an ETW event provider logs events to a trace session. The EnableTraceEx2 function supersedes this function.
EnableTraceEx2

A trace session controller calls EnableTraceEx2 to configure how an ETW event provider logs events to a trace session.
EnumerateTraceGuids

Retrieves information about event trace providers that are currently running on the computer. The EnumerateTraceGuidsEx function supersedes this function.
EnumerateTraceGuidsEx

Retrieves information about event trace providers that are currently running on the computer.
FlushTraceA

The FlushTraceA (ANSI) function (evntrace.h) causes an event tracing session to immediately deliver buffered events for the specified session.
FlushTraceW

The FlushTraceW (Unicode) function (evntrace.h) causes an event tracing session to immediately deliver buffered events for the specified session.
GetTraceEnableFlags

A RegisterTraceGuids-based ("Classic") event provider uses the GetTraceEnableFlags function to retrieve the enable flags specified by the trace controller to indicate which category of events to trace. Providers call this function from their ControlCallback function.
GetTraceEnableLevel

A RegisterTraceGuids-based ("Classic") event provider uses the GetTraceEnableLevel function to retrieve the enable level specified by the trace controller to indicate which level of events to trace. Providers call this function from their ControlCallback function.
GetTraceLoggerHandle

A RegisterTraceGuids-based ("Classic") event provider uses the GetTraceLoggerHandle function to retrieve the handle of the event tracing session to which it should write events. Providers call this function from their ControlCallback function.
OpenTraceA

The OpenTraceA (ANSI) function (evntrace.h) opens an ETW trace processing handle for consuming events from an ETW real-time trace session or an ETW log file.
OpenTraceFromBufferStream

Creates a trace processing session that is not directly attached to any file or active session.
OpenTraceFromFile

Creates a trace processing session to process a Tracelog .etl file.
OpenTraceFromRealTimeLogger

Opens an ETW trace processing handle for consuming events from an ETW real-time trace session or an ETW log file.
OpenTraceFromRealTimeLoggerWithAllocationOptions

Creates a trace processing session attached to an active real-time ETW session.
OpenTraceW

The OpenTraceW (Unicode) function (evntrace.h) opens an ETW trace processing handle for consuming events from an ETW real-time trace session or an ETW log file.
ProcessTrace

Delivers events from one or more trace processing sessions to the consumer.
ProcessTraceAddBufferToBufferStream

Provides an ETW trace buffer to a processing session created by OpenTraceFromBufferStream.
ProcessTraceBufferDecrementReference

Releases a reference to a Buffer that was added by ProcessTraceBufferIncrementReference.
ProcessTraceBufferIncrementReference

Called during the BufferCallback on the provided Buffer to prevent it from being freed until the caller is done with it.
QueryAllTracesA

The QueryAllTracesA (ANSI) function (evntrace.h) function retrieves the properties and statistics for all event tracing sessions that the caller can query.
QueryAllTracesW

The QueryAllTracesW (Unicode) function (evntrace.h) function retrieves the properties and statistics for all event tracing sessions that the caller can query.
QueryTraceA

The QueryTraceA (ANSI) function (evntrace.h) retrieves the property settings and session statistics for the specified event tracing session.
QueryTraceProcessingHandle

Retrieves information about an ETW trace processing session opened by OpenTrace.
QueryTraceW

The QueryTraceW (Unicode) function (evntrace.h) retrieves the property settings and session statistics for the specified event tracing session.
RegisterTraceGuidsA

The RegisterTraceGuidsA (ANSI) function (evntrace.h) is an obsolete function, and new code should use the provided alternative.
RegisterTraceGuidsW

The RegisterTraceGuidsW (Unicode) function (evntrace.h) is an obsolete function, and new code should use the provided alternative.
RemoveTraceCallback

The RemoveTraceCallback function stops an EventCallback function from receiving events for an event trace class. This function is obsolete.
SetTraceCallback

The SetTraceCallback function specifies an EventCallback function to process events for the specified event trace class. This function is obsolete.
StartTraceA

The StartTrace function starts an event tracing session. (ANSI)
StartTraceW

The StartTrace function starts an event tracing session. (Unicode)
StopTraceA

The StopTraceA (ANSI) function (evntrace.h) stops the specified event tracing session. The ControlTrace function supersedes this function.
StopTraceW

The StopTraceW (Unicode) function (evntrace.h) stops the specified event tracing session. The ControlTrace function supersedes this function.
TraceEvent

A RegisterTraceGuids-based ("Classic") event provider uses the TraceEvent function to send a structured event to an event tracing session.
TraceEventInstance

A RegisterTraceGuids-based ("Classic") event provider uses the TraceEventInstance function to send a structured event to an event tracing session with an instance identifier.
TraceMessage

A RegisterTraceGuids-based ("Classic") event provider uses the TraceMessage function to send a message-based (TMF-based WPP) event to an event tracing session.
TraceMessageVa

A RegisterTraceGuids-based ("Classic") event provider uses the TraceMessageVa function to send a message-based (TMF-based WPP) event to an event tracing session using va_list parameters.
TraceQueryInformation

Provides information about an event tracing session.
TraceSetInformation

Configures event tracing session settings.
UnregisterTraceGuids

Unregisters a "Classic" (Windows 2000-style) ETW event trace provider that was registered using RegisterTraceGuids.
UpdateTraceA

The UpdateTraceA (ANSI) function (evntrace.h) updates the property setting of the specified event tracing session.
UpdateTraceW

The UpdateTraceW (Unicode) function (evntrace.h) updates the property setting of the specified event tracing session.

Callback functions

 
PETW_BUFFER_CALLBACK

Function definition for the BufferCallback that will be invoked by ProcessTrace.
PETW_BUFFER_COMPLETION_CALLBACK

Function definition for the callback that will be fired when ProcessTraceAddBufferToBufferStream is finished with a buffer. This callback should typically free the buffer as appropriate
PEVENT_CALLBACK

ETW event consumers implement this callback to receive events from a trace processing session. The EventRecordCallback callback supersedes this callback.
PEVENT_RECORD_CALLBACK

ETW event consumers implement this callback to receive events from a trace processing session. The PEVENT_RECORD_CALLBACK type defines a pointer to this callback function. EventRecordCallback is a placeholder for the application-defined function name.
PEVENT_TRACE_BUFFER_CALLBACKA

The PEVENT_TRACE_BUFFER_CALLBACKA (ANSI) (evntrace.h) function gets statistics about each buffer of events that ETW sends during a trace processing session.
PEVENT_TRACE_BUFFER_CALLBACKW

The PEVENT_TRACE_BUFFER_CALLBACKW (Unicode) (evntrace.h) function gets statistics about each buffer of events that ETW sends during a trace processing session.
WMIDPREQUEST

A RegisterTraceGuids-based ("Classic") event provider implements this function to receive notifications from controllers. The WMIDPREQUEST type defines a pointer to this callback function. ControlCallback is a placeholder for the application-defined function name.

Structures

 
CLASSIC_EVENT_ID

Identifies the kernel event for which you want to enable call stack tracing.
ENABLE_TRACE_PARAMETERS

Contains information used to enable a provider via EnableTraceEx2.
ENABLE_TRACE_PARAMETERS_V1

Contains information used to enable a provider via EnableTraceEx2. This structure is obsolete.
ETW_BUFFER_CALLBACK_INFORMATION

Provided to the BufferCallback as the ConsumerInfo parameter and provides details on the current processing session.
ETW_BUFFER_CONTEXT

Provides context information about the event.
ETW_BUFFER_HEADER

The header structure of an ETW buffer.
ETW_OPEN_TRACE_OPTIONS

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

Contains partition information pulled from an ETW trace.
EVENT_INSTANCE_HEADER

The EVENT_INSTANCE_HEADER structure contains standard event tracing information common to all events written by TraceEventInstance.
EVENT_INSTANCE_INFO

The EVENT_INSTANCE_INFO structure maps a unique transaction identifier to a registered event trace class for TraceEventInstance.
EVENT_TRACE

The EVENT_TRACE structure is used to deliver event information to an event trace consumer.
EVENT_TRACE_HEADER

The EVENT_TRACE_HEADER structure contains standard event tracing information common to all events written by TraceEvent.
EVENT_TRACE_LOGFILEA

The EVENT_TRACE_LOGFILEA (ANSI) structure (evntrace.h) stores information about a trace data source.
EVENT_TRACE_LOGFILEW

The EVENT_TRACE_LOGFILEW (Unicode) structure (evntrace.h) stores information about a trace data source.
EVENT_TRACE_PROPERTIES

The EVENT_TRACE_PROPERTIES structure contains information about an event tracing session and is used with APIs such as StartTrace and ControlTrace.
EVENT_TRACE_PROPERTIES_V2

The EVENT_TRACE_PROPERTIES_V2 structure contains information about an event tracing session and is used with APIs such as StartTrace and ControlTrace.
MOF_FIELD

You may use the MOF_FIELD structures to append event data to the EVENT_TRACE_HEADER or EVENT_INSTANCE_HEADER structures.
TRACE_CONTEXT_REGISTER_INFO

Identifies the set of registers to be logged when enabling Context Register Tracing.
TRACE_ENABLE_INFO

Defines the session and the information that the session used to enable the provider.
TRACE_GUID_INFO

Returned by EnumerateTraceGuidsEx. Defines the header to the list of sessions that enabled a provider.
TRACE_GUID_PROPERTIES

Returned by EnumerateTraceGuids. Contains information about an event trace provider.
TRACE_GUID_REGISTRATION

Used with RegisterTraceGuids to register event trace classes.
TRACE_LOGFILE_HEADER

The TRACE_LOGFILE_HEADER structure contains information about an event tracing session and its events.
TRACE_PERIODIC_CAPTURE_STATE_INFO

Used with TraceQueryInformation and TraceSetInformation to get or set information relating to a periodic capture state.
TRACE_PROVIDER_INSTANCE_INFO

Defines an instance of the provider GUID.
TRACE_VERSION_INFO

Determines the version information of the TraceLogging session.

Enumerations

 
ETW_CONTEXT_REGISTER_TYPES

Specifies the set of registers to be collected when Context Register Tracing is enabled.
ETW_PROCESS_HANDLE_INFO_TYPE

Specifies the operation that will be performed on a trace processing session.
ETW_PROCESS_TRACE_MODES

Specifies the supported process trace modes.
TRACE_QUERY_INFO_CLASS

Used with EnumerateTraceGuidsEx and TraceSetInformation to specify a type of trace information.