|
AudRecordLib
|
Includes the common functions for ETW error reporting This file isn't compiled as normal, it's included by those who wish to use its error reporting. More...
#include "ETWEvents.h"Defines | |
| #define | ODS_PRINT(format,...) |
Functions | |
| C_ASSERT (sizeof(ETW_PROVIDER_GUID)==sizeof(GUID)) | |
| void | RegisterEventProvider () |
| void | UnregisterEventProvider () |
| void | WriteEvent (LPCSTR pszFile, DWORD line, LPCSTR pszFunction, LPCSTR pszData, const EVENT_DESCRIPTOR &evDesc) |
| void | LogDebugEvent (LPCSTR pszFile, DWORD line, LPCSTR pszFunction, LPCSTR pszData) |
| void | LogSevereEvent (LPCSTR pszFile, DWORD line, LPCSTR pszFunction, LPCSTR pszData) |
Includes the common functions for ETW error reporting This file isn't compiled as normal, it's included by those who wish to use its error reporting.
| #define ODS_PRINT | ( | format, | |
| ... | |||
| ) |
{ \
char buffer[300]; \
LogFormat(buffer, __FUNCTION__ " " format, __VA_ARGS__); \
OutputDebugStringA(buffer); \
}
Formats format and any additional args using LogFormat() before outputting the result using OutputDebugStringA(). This is a macro so we can pass the variable args to LogFormat
| 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
| pszFile | the file in which the event occurred |
| line | The line on which it occurred on |
| pszFunction | Narrow string containing the name of the function it occurred in |
| pszdata | Narrow string containing any additional text |
| 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
| pszFile | the file in which the event occurred |
| line | The line on which it occurred on |
| pszFunction | Narrow string containing the name of the function it occurred in |
| pszdata | Narrow 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
| void WriteEvent | ( | LPCSTR | pszFile, |
| DWORD | line, | ||
| LPCSTR | pszFunction, | ||
| LPCSTR | pszData, | ||
| const EVENT_DESCRIPTOR & | evDesc | ||
| ) |
Send an event to ant listeners
Descriptors are created for each parameter passed into the event, before it is written using the supplied description
| pszFile | the file in which the event occurred |
| line | The line on which it occurred on |
| pszFunction | Narrow string containing the name of the function it occurred in |
| pszdata | Narrow string containing any additional text |
| evDesc | Description of the event to raise |
1.7.5.1