WinStd Additional templates and function helpers for Microsoft Windows using Standard C++ classes

Public Member Functions | Protected Attributes | List of all members
winstd::event_trace_enabler Class Reference
Event Tracing for Windows API

Helper class to enable event provider in constructor and disables it in destructor. More...

`#include <ETW.h>`

## Public Member Functions
| event_trace_enabler (_In_opt_ LPCGUID SourceId, _In_ TRACEHANDLE TraceHandle, _In_ LPCGUID ProviderId, _In_ UCHAR Level, _In_opt_ ULONGLONG MatchAnyKeyword=0, _In_opt_ ULONGLONG MatchAllKeyword=0, _In_opt_ ULONG EnableProperty=0, _In_opt_ PEVENT_FILTER_DESCRIPTOR EnableFilterDesc=NULL)
| Enables event trace. More...
| event_trace_enabler (_In_ const event_session &session, _In_ LPCGUID ProviderId, _In_ UCHAR Level, _In_opt_ ULONGLONG MatchAnyKeyword=0, _In_opt_ ULONGLONG MatchAllKeyword=0, _In_opt_ ULONG EnableProperty=0, _In_opt_ PEVENT_FILTER_DESCRIPTOR EnableFilterDesc=NULL)
| Enables event trace. More...
ULONG | status () const
| Return result of `EnableTraceEx()` call. More...
virtual | ~event_trace_enabler ()
| Disables event trace. More...

## Protected Attributes
ULONG | m_status
| Result of EnableTraceEx call.
LPCGUID | m_provider_id
| Provider ID.
LPCGUID | m_source_id
| Session ID.
TRACEHANDLE | m_trace_handle
| Trace handle.
UCHAR | m_level
| Logging level.
ULONGLONG | m_match_any_keyword
| Keyword match mask (any)
ULONGLONG | m_match_all_keyword
| Keyword match mask (all)
ULONG | m_enable_property
| Enable property.
PEVENT_FILTER_DESCRIPTOR | m_enable_filter_desc
| Event filter descriptor.

## Detailed Description

Helper class to enable event provider in constructor and disables it in destructor.

## Constructor & Destructor Documentation

## ◆ event_trace_enabler() [1/2]

winstd::event_trace_enabler::event_trace_enabler | ( | _In_opt_ LPCGUID | SourceId,
|  | _In_ TRACEHANDLE | TraceHandle,
|  | _In_ LPCGUID | ProviderId,
|  | _In_ UCHAR | Level,
|  | _In_opt_ ULONGLONG | MatchAnyKeyword = `0`,
|  | _In_opt_ ULONGLONG | MatchAllKeyword = `0`,
|  | _In_opt_ ULONG | EnableProperty = `0`,
|  | _In_opt_ PEVENT_FILTER_DESCRIPTOR | EnableFilterDesc = `NULL`
| ) |  |
| inline

Enables event trace.

See also
  EnableTraceEx function

## ◆ event_trace_enabler() [2/2]

winstd::event_trace_enabler::event_trace_enabler | ( | _In_ const event_session & | session,
|  | _In_ LPCGUID | ProviderId,
|  | _In_ UCHAR | Level,
|  | _In_opt_ ULONGLONG | MatchAnyKeyword = `0`,
|  | _In_opt_ ULONGLONG | MatchAllKeyword = `0`,
|  | _In_opt_ ULONG | EnableProperty = `0`,
|  | _In_opt_ PEVENT_FILTER_DESCRIPTOR | EnableFilterDesc = `NULL`
| ) |  |
| inline

Enables event trace.

See also
  EnableTraceEx function

## ◆ ~event_trace_enabler()

virtual winstd::event_trace_enabler::~event_trace_enabler | ( |  | ) |
| inline virtual

Disables event trace.

See also
  EnableTraceEx function

## Member Function Documentation

## ◆ status()

ULONG winstd::event_trace_enabler::status | ( |  | ) | const
| inline

Return result of `EnableTraceEx()` call.

See also
  EnableTraceEx function

The documentation for this class was generated from the following file:

- include/WinStd/ETW.h