AudRecordLib
Functions
ETWEvents.h File Reference

Declares functions and macros for use by the Event Tracing for Windows reporting functionality. This file is shared between AudRecordLib and AudRecordCLI. More...

#include <stddef.h>
#include <strsafe.h>

Go to the source code of this file.

Functions

template<size_t N>
char * LogFormat (char(&buffer)[N], const char *pFormat,...)
void RegisterEventProvider ()
void UnregisterEventProvider ()
void LogDebugEvent (LPCSTR pszFile, DWORD line, LPCSTR pszFunction, LPCSTR pszData)
void LogSevereEvent (LPCSTR pszFile, DWORD line, LPCSTR pszFunction, LPCSTR pszData)

Detailed Description

Declares functions and macros for use by the Event Tracing for Windows reporting functionality. This file is shared between AudRecordLib and AudRecordCLI.


Function Documentation

void LogDebugEvent ( LPCSTR  pszFile,
DWORD  line,
LPCSTR  pszFunction,
LPCSTR  pszData 
)

Creates a debug event in the log

The function is equivalent to calling WriteEvent with FunctionFailureDebug as the event descriptor, but only if the event is enabled by the log consumer

Parameters:
pszFilethe file in which the event occurred
lineThe line on which it occurred on
pszFunctionNarrow string containing the name of the function it occurred in
pszdataNarrow string containing any additional text
template<size_t N>
char* LogFormat ( char(&)  buffer[N],
const char *  pFormat,
  ... 
)

Formats a string and the additional args in a sprintf manner

Template Parameters:
NThe inferred size of the buffer
Parameters:
bufferThe destination buffer for the printf result
pFormatPrintf-esque format string
...Additional parameters
Returns:
The buffer pointer
void LogSevereEvent ( LPCSTR  pszFile,
DWORD  line,
LPCSTR  pszFunction,
LPCSTR  pszData 
)

Creates a severe error event in the log

The function is equivalent to calling WriteEvent with FunctionError as the event descriptor, but only if the event is enabled by the log consumer

Parameters:
pszFilethe file in which the event occurred
lineThe line on which it occurred on
pszFunctionNarrow string containing the name of the function it occurred in
pszdataNarrow string containing any additional text
void RegisterEventProvider ( )

Registers a certain provider event source with ETW

It relies on a previously defined or existant ETW_PROVIDER_GUID value that contains the GUID of the provider.

void UnregisterEventProvider ( )

Unregisters a certain provider event source with ETW so it can no longer send events

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Defines