WinStd
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
Classes | Functions | Variables
ETW.h File Reference

Integrates WinStd classes with Event Tracing for Windows API. More...

#include "Common.h"
#include <assert.h>
#include <evntprov.h>
#include <evntcons.h>
#include <stdarg.h>
#include <tdh.h>
#include <memory>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

class  winstd::event_data
 EVENT_DATA_DESCRIPTOR wrapper. More...
 
class  winstd::event_rec
 EVENT_RECORD wrapper. More...
 
class  winstd::event_provider
 ETW event provider. More...
 
class  winstd::event_session
 ETW session. More...
 
class  winstd::event_trace
 ETW trace. More...
 
class  winstd::event_trace_enabler
 Helper class to enable event provider in constructor and disables it in destructor. More...
 
class  winstd::event_fn_auto
 Helper class to write an event on entry/exit of scope. More...
 
class  winstd::event_fn_auto_ret< T >
 Helper template to write an event on entry/exit of scope with one parameter (typically result). More...
 

Functions

template<class _Ty , class _Ax >
static ULONG TdhGetProperty (PEVENT_RECORD pEvent, ULONG TdhContextCount, PTDH_CONTEXT pTdhContext, ULONG PropertyDataCount, PPROPERTY_DATA_DESCRIPTOR pPropertyData, std::vector< _Ty, _Ax > &aData)
 Retrieves a property value from the event data. More...
 
static ULONG TdhGetEventInformation (PEVENT_RECORD pEvent, ULONG TdhContextCount, PTDH_CONTEXT pTdhContext, std::unique_ptr< TRACE_EVENT_INFO > &info)
 Retrieves metadata about an event. More...
 
static ULONG TdhGetEventMapInformation (PEVENT_RECORD pEvent, LPWSTR pMapName, std::unique_ptr< EVENT_MAP_INFO > &info)
 Retrieves information about the event map contained in the event. More...
 

Variables

static const event_data winstd::blank_event_data
 Blank event data used as terminator.
 

Detailed Description

Integrates WinStd classes with Event Tracing for Windows API.