Files
cool-source-archive/tier0/ValveETWProviderEvents.h
2022-06-15 19:04:06 +07:00

1701 lines
45 KiB
C

//**********************************************************************`
//* This is an include file generated by Message Compiler. *`
//* *`
//* Copyright (c) Microsoft Corporation. All Rights Reserved. *`
//**********************************************************************`
#pragma once
#include <wmistr.h>
#include <evntrace.h>
#include "evntprov.h"
//
// Initial Defs
//
#if !defined(ETW_INLINE)
#define ETW_INLINE DECLSPEC_NOINLINE __inline
#endif
#if defined(__cplusplus)
extern "C" {
#endif
//
// Allow Diasabling of code generation
//
#ifndef MCGEN_DISABLE_PROVIDER_CODE_GENERATION
#if !defined(McGenDebug)
#define McGenDebug(a,b)
#endif
#if !defined(MCGEN_TRACE_CONTEXT_DEF)
#define MCGEN_TRACE_CONTEXT_DEF
typedef struct _MCGEN_TRACE_CONTEXT
{
TRACEHANDLE RegistrationHandle;
TRACEHANDLE Logger;
ULONGLONG MatchAnyKeyword;
ULONGLONG MatchAllKeyword;
ULONG Flags;
ULONG IsEnabled;
UCHAR Level;
UCHAR Reserve;
} MCGEN_TRACE_CONTEXT, *PMCGEN_TRACE_CONTEXT;
#endif
#if !defined(MCGEN_EVENT_ENABLED_DEF)
#define MCGEN_EVENT_ENABLED_DEF
FORCEINLINE
BOOLEAN
McGenEventEnabled(
__in PMCGEN_TRACE_CONTEXT EnableInfo,
__in PCEVENT_DESCRIPTOR EventDescriptor
)
{
//
// Check if the event Level is lower than the level at which
// the channel is enabled.
// If the event Level is 0 or the channel is enabled at level 0,
// all levels are enabled.
//
if ((EventDescriptor->Level <= EnableInfo->Level) || // This also covers the case of Level == 0.
(EnableInfo->Level == 0)) {
//
// Check if Keyword is enabled
//
if ((EventDescriptor->Keyword == (ULONGLONG)0) ||
((EventDescriptor->Keyword & EnableInfo->MatchAnyKeyword) &&
((EventDescriptor->Keyword & EnableInfo->MatchAllKeyword) == EnableInfo->MatchAllKeyword))) {
return TRUE;
}
}
return FALSE;
}
#endif
//
// EnableCheckMacro
//
#ifndef MCGEN_ENABLE_CHECK
#define MCGEN_ENABLE_CHECK(Context, Descriptor) (Context.IsEnabled && McGenEventEnabled(&Context, &Descriptor))
#endif
#if !defined(MCGEN_CONTROL_CALLBACK)
#define MCGEN_CONTROL_CALLBACK
DECLSPEC_NOINLINE __inline
VOID
__stdcall
McGenControlCallbackV2(
__in LPCGUID SourceId,
__in ULONG ControlCode,
__in UCHAR Level,
__in ULONGLONG MatchAnyKeyword,
__in ULONGLONG MatchAllKeyword,
__in_opt PEVENT_FILTER_DESCRIPTOR FilterData,
__inout_opt PVOID CallbackContext
)
/*++
Routine Description:
This is the notification callback for Vista.
Arguments:
SourceId - The GUID that identifies the session that enabled the provider.
ControlCode - The parameter indicates whether the provider
is being enabled or disabled.
Level - The level at which the event is enabled.
MatchAnyKeyword - The bitmask of keywords that the provider uses to
determine the category of events that it writes.
MatchAllKeyword - This bitmask additionally restricts the category
of events that the provider writes.
FilterData - The provider-defined data.
CallbackContext - The context of the callback that is defined when the provider
called EtwRegister to register itself.
Remarks:
ETW calls this function to notify provider of enable/disable
--*/
{
PMCGEN_TRACE_CONTEXT Ctx = (PMCGEN_TRACE_CONTEXT)CallbackContext;
#ifndef MCGEN_PRIVATE_ENABLE_CALLBACK_V2
UNREFERENCED_PARAMETER(SourceId);
UNREFERENCED_PARAMETER(FilterData);
#endif
if (Ctx == NULL) {
return;
}
switch (ControlCode) {
case EVENT_CONTROL_CODE_ENABLE_PROVIDER:
Ctx->Level = Level;
Ctx->MatchAnyKeyword = MatchAnyKeyword;
Ctx->MatchAllKeyword = MatchAllKeyword;
Ctx->IsEnabled = EVENT_CONTROL_CODE_ENABLE_PROVIDER;
break;
case EVENT_CONTROL_CODE_DISABLE_PROVIDER:
Ctx->IsEnabled = EVENT_CONTROL_CODE_DISABLE_PROVIDER;
Ctx->Level = 0;
Ctx->MatchAnyKeyword = 0;
Ctx->MatchAllKeyword = 0;
break;
default:
break;
}
#ifdef MCGEN_PRIVATE_ENABLE_CALLBACK_V2
//
// Call user defined callback
//
MCGEN_PRIVATE_ENABLE_CALLBACK_V2(
SourceId,
ControlCode,
Level,
MatchAnyKeyword,
MatchAllKeyword,
FilterData,
CallbackContext
);
#endif
return;
}
#endif
#endif // MCGEN_DISABLE_PROVIDER_CODE_GENERATION
//+
// Provider Valve-Main Event Count 14
//+
EXTERN_C __declspec(selectany) const GUID VALVE_MAIN = {0x3fa9201e, 0x73b0, 0x43fe, {0x98, 0x21, 0x7e, 0x14, 0x53, 0x59, 0xbc, 0x6f}};
//
// Opcodes
//
#define _BeginOpcode 0xa
#define _EndOpcode 0xb
#define _StepOpcode 0xc
#define _MarkOpcode 0xd
#define _MarkOpcode1F 0xe
#define _MarkOpcode2F 0xf
#define _MarkOpcode3F 0x10
#define _MarkOpcode4F 0x11
#define _MarkOpcode1I 0x12
#define _MarkOpcode2I 0x13
#define _MarkOpcode3I 0x14
#define _MarkOpcode4I 0x15
#define _MarkOpcode1S 0x16
#define _MarkOpcode2S 0x17
#define _InformationOpcode 0x18
//
// Tasks
//
#define Block_Task 0x1
EXTERN_C __declspec(selectany) const GUID BlockId = {0xf15f363a, 0x49fd, 0x4de3, {0x96, 0x7c, 0x17, 0x32, 0x46, 0x49, 0x45, 0xff}};
#define ThreadID_Task 0x2
EXTERN_C __declspec(selectany) const GUID ThreadIDId = {0xf15f363a, 0x493d, 0x4dea, {0x96, 0x7c, 0x11, 0x23, 0x46, 0x49, 0x45, 0xff}};
//
// Event Descriptors
//
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR Start = {0x64, 0x0, 0x0, 0x0, 0xa, 0x1, 0x0};
#define Start_value 0x64
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR Stop = {0x65, 0x0, 0x0, 0x0, 0xb, 0x1, 0x0};
#define Stop_value 0x65
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR Mark = {0x66, 0x0, 0x0, 0x0, 0xd, 0x1, 0x0};
#define Mark_value 0x66
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR Mark1F = {0x67, 0x0, 0x0, 0x0, 0xe, 0x1, 0x0};
#define Mark1F_value 0x67
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR Mark2F = {0x68, 0x0, 0x0, 0x0, 0xf, 0x1, 0x0};
#define Mark2F_value 0x68
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR Mark3F = {0x69, 0x0, 0x0, 0x0, 0x10, 0x1, 0x0};
#define Mark3F_value 0x69
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR Mark4F = {0x6a, 0x0, 0x0, 0x0, 0x11, 0x1, 0x0};
#define Mark4F_value 0x6a
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR Mark1I = {0x6b, 0x0, 0x0, 0x0, 0x12, 0x1, 0x0};
#define Mark1I_value 0x6b
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR Mark2I = {0x6c, 0x0, 0x0, 0x0, 0x13, 0x1, 0x0};
#define Mark2I_value 0x6c
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR Mark3I = {0x6d, 0x0, 0x0, 0x0, 0x14, 0x1, 0x0};
#define Mark3I_value 0x6d
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR Mark4I = {0x6e, 0x0, 0x0, 0x0, 0x15, 0x1, 0x0};
#define Mark4I_value 0x6e
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR Mark1S = {0x6f, 0x0, 0x0, 0x0, 0x16, 0x1, 0x0};
#define Mark1S_value 0x6f
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR Mark2S = {0x70, 0x0, 0x0, 0x0, 0x17, 0x1, 0x0};
#define Mark2S_value 0x70
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR Thread_ID = {0x71, 0x0, 0x0, 0x4, 0x18, 0x2, 0x0};
#define Thread_ID_value 0x71
//
// Note on Generate Code from Manifest Windows Vista and above
//
//Structures : are handled as a size and pointer pairs. The macro for the event will have an extra
//parameter for the size in bytes of the structure. Make sure that your structures have no extra padding.
//
//Strings: There are several cases that can be described in the manifest. For array of variable length
//strings, the generated code will take the count of characters for the whole array as an input parameter.
//
//SID No support for array of SIDs, the macro will take a pointer to the SID and use appropriate
//GetLengthSid function to get the length.
//
//
// Allow Diasabling of code generation
//
#ifndef MCGEN_DISABLE_PROVIDER_CODE_GENERATION
//
// Globals
//
EXTERN_C __declspec(selectany) REGHANDLE Valve_MainHandle = (REGHANDLE)0;
EXTERN_C __declspec(selectany) MCGEN_TRACE_CONTEXT VALVE_MAIN_Context = {0};
#if !defined(McGenEventRegisterUnregister)
#define McGenEventRegisterUnregister
DECLSPEC_NOINLINE __inline
ULONG __stdcall
McGenEventRegister(
__in LPCGUID ProviderId,
__in_opt PENABLECALLBACK EnableCallback,
__in_opt PVOID CallbackContext,
__inout PREGHANDLE RegHandle
)
/*++
Routine Description:
This function register the provider with ETW USER mode.
Arguments:
ProviderId - Provider Id to be register with ETW.
EnableCallback - Callback to be used.
CallbackContext - Context for this provider.
RegHandle - Pointer to Registration handle.
Remarks:
If the handle != NULL will return ERROR_SUCCESS
--*/
{
ULONG Error;
if (*RegHandle) {
//
// already registered
//
return ERROR_SUCCESS;
}
Error = EventRegister( ProviderId, EnableCallback, CallbackContext, RegHandle);
return Error;
}
DECLSPEC_NOINLINE __inline
ULONG __stdcall
McGenEventUnregister(__inout PREGHANDLE RegHandle)
/*++
Routine Description:
Unregister from ETW USER mode
Arguments:
RegHandle this is the pointer to the provider context
Remarks:
If Provider has not register RegHandle = NULL,
return ERROR_SUCCESS
--*/
{
ULONG Error;
if(!(*RegHandle)) {
//
// Provider has not registerd
//
return ERROR_SUCCESS;
}
Error = EventUnregister(*RegHandle);
*RegHandle = (REGHANDLE)0;
return Error;
}
#endif
//
// Register with ETW Vista +
//
#ifndef EventRegisterValve_Main
#define EventRegisterValve_Main() McGenEventRegister(&VALVE_MAIN, McGenControlCallbackV2, &VALVE_MAIN_Context, &Valve_MainHandle)
#endif
//
// UnRegister with ETW
//
#ifndef EventUnregisterValve_Main
#define EventUnregisterValve_Main() McGenEventUnregister(&Valve_MainHandle)
#endif
//
// Event Macro for Start
//
#define EventWriteStart(Description, Depth)\
MCGEN_ENABLE_CHECK(VALVE_MAIN_Context, Start) ?\
Template_sd(Valve_MainHandle, &Start, Description, Depth)\
: ERROR_SUCCESS\
//
// Event Macro for Stop
//
#define EventWriteStop(Description, Depth, Duration__ms_)\
MCGEN_ENABLE_CHECK(VALVE_MAIN_Context, Stop) ?\
Template_sdf(Valve_MainHandle, &Stop, Description, Depth, Duration__ms_)\
: ERROR_SUCCESS\
//
// Event Macro for Mark
//
#define EventWriteMark(Description)\
MCGEN_ENABLE_CHECK(VALVE_MAIN_Context, Mark) ?\
Template_s(Valve_MainHandle, &Mark, Description)\
: ERROR_SUCCESS\
//
// Event Macro for Mark1F
//
#define EventWriteMark1F(Description, Data_1)\
MCGEN_ENABLE_CHECK(VALVE_MAIN_Context, Mark1F) ?\
Template_sf(Valve_MainHandle, &Mark1F, Description, Data_1)\
: ERROR_SUCCESS\
//
// Event Macro for Mark2F
//
#define EventWriteMark2F(Description, Data_1, Data_2)\
MCGEN_ENABLE_CHECK(VALVE_MAIN_Context, Mark2F) ?\
Template_sff(Valve_MainHandle, &Mark2F, Description, Data_1, Data_2)\
: ERROR_SUCCESS\
//
// Event Macro for Mark3F
//
#define EventWriteMark3F(Description, Data_1, Data_2, Data_3)\
MCGEN_ENABLE_CHECK(VALVE_MAIN_Context, Mark3F) ?\
Template_sfff(Valve_MainHandle, &Mark3F, Description, Data_1, Data_2, Data_3)\
: ERROR_SUCCESS\
//
// Event Macro for Mark4F
//
#define EventWriteMark4F(Description, Data_1, Data_2, Data_3, Data_4)\
MCGEN_ENABLE_CHECK(VALVE_MAIN_Context, Mark4F) ?\
Template_sffff(Valve_MainHandle, &Mark4F, Description, Data_1, Data_2, Data_3, Data_4)\
: ERROR_SUCCESS\
//
// Event Macro for Mark1I
//
#define EventWriteMark1I(Description, Data_1)\
MCGEN_ENABLE_CHECK(VALVE_MAIN_Context, Mark1I) ?\
Template_sd(Valve_MainHandle, &Mark1I, Description, Data_1)\
: ERROR_SUCCESS\
//
// Event Macro for Mark2I
//
#define EventWriteMark2I(Description, Data_1, Data_2)\
MCGEN_ENABLE_CHECK(VALVE_MAIN_Context, Mark2I) ?\
Template_sdd(Valve_MainHandle, &Mark2I, Description, Data_1, Data_2)\
: ERROR_SUCCESS\
//
// Event Macro for Mark3I
//
#define EventWriteMark3I(Description, Data_1, Data_2, Data_3)\
MCGEN_ENABLE_CHECK(VALVE_MAIN_Context, Mark3I) ?\
Template_sddd(Valve_MainHandle, &Mark3I, Description, Data_1, Data_2, Data_3)\
: ERROR_SUCCESS\
//
// Event Macro for Mark4I
//
#define EventWriteMark4I(Description, Data_1, Data_2, Data_3, Data_4)\
MCGEN_ENABLE_CHECK(VALVE_MAIN_Context, Mark4I) ?\
Template_sdddd(Valve_MainHandle, &Mark4I, Description, Data_1, Data_2, Data_3, Data_4)\
: ERROR_SUCCESS\
//
// Event Macro for Mark1S
//
#define EventWriteMark1S(Description, Data_1)\
MCGEN_ENABLE_CHECK(VALVE_MAIN_Context, Mark1S) ?\
Template_ss(Valve_MainHandle, &Mark1S, Description, Data_1)\
: ERROR_SUCCESS\
//
// Event Macro for Mark2S
//
#define EventWriteMark2S(Description, Data_1, Data_2)\
MCGEN_ENABLE_CHECK(VALVE_MAIN_Context, Mark2S) ?\
Template_sss(Valve_MainHandle, &Mark2S, Description, Data_1, Data_2)\
: ERROR_SUCCESS\
//
// Event Macro for Thread_ID
//
#define EventWriteThread_ID(ThreadID, ThreadName)\
MCGEN_ENABLE_CHECK(VALVE_MAIN_Context, Thread_ID) ?\
Template_ds(Valve_MainHandle, &Thread_ID, ThreadID, ThreadName)\
: ERROR_SUCCESS\
#endif // MCGEN_DISABLE_PROVIDER_CODE_GENERATION
//+
// Provider Valve-FrameRate Event Count 2
//+
EXTERN_C __declspec(selectany) const GUID VALVE_FRAMERATE = {0x47a9201e, 0x73b0, 0x42ce, {0x98, 0x21, 0x7e, 0x13, 0x43, 0x61, 0xbc, 0x6f}};
//
// Opcodes
//
#define _RenderFrameMarkOpcode 0xa
#define _SimFrameMarkOpcode 0xb
//
// Tasks
//
#define Frame_Task 0x1
EXTERN_C __declspec(selectany) const GUID FrameId = {0xf15f363a, 0x49fd, 0x4ffa, {0x96, 0x7c, 0x17, 0x39, 0x36, 0x49, 0x45, 0xff}};
//
// Event Descriptors
//
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR RenderFrameMark = {0xc8, 0x0, 0x0, 0x0, 0xa, 0x1, 0x0};
#define RenderFrameMark_value 0xc8
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR SimFrameMark = {0xc9, 0x0, 0x0, 0x0, 0xb, 0x1, 0x0};
#define SimFrameMark_value 0xc9
//
// Note on Generate Code from Manifest Windows Vista and above
//
//Structures : are handled as a size and pointer pairs. The macro for the event will have an extra
//parameter for the size in bytes of the structure. Make sure that your structures have no extra padding.
//
//Strings: There are several cases that can be described in the manifest. For array of variable length
//strings, the generated code will take the count of characters for the whole array as an input parameter.
//
//SID No support for array of SIDs, the macro will take a pointer to the SID and use appropriate
//GetLengthSid function to get the length.
//
//
// Allow Diasabling of code generation
//
#ifndef MCGEN_DISABLE_PROVIDER_CODE_GENERATION
//
// Globals
//
EXTERN_C __declspec(selectany) REGHANDLE Valve_FrameRateHandle = (REGHANDLE)0;
EXTERN_C __declspec(selectany) MCGEN_TRACE_CONTEXT VALVE_FRAMERATE_Context = {0};
#if !defined(McGenEventRegisterUnregister)
#define McGenEventRegisterUnregister
DECLSPEC_NOINLINE __inline
ULONG __stdcall
McGenEventRegister(
__in LPCGUID ProviderId,
__in_opt PENABLECALLBACK EnableCallback,
__in_opt PVOID CallbackContext,
__inout PREGHANDLE RegHandle
)
/*++
Routine Description:
This function register the provider with ETW USER mode.
Arguments:
ProviderId - Provider Id to be register with ETW.
EnableCallback - Callback to be used.
CallbackContext - Context for this provider.
RegHandle - Pointer to Registration handle.
Remarks:
If the handle != NULL will return ERROR_SUCCESS
--*/
{
ULONG Error;
if (*RegHandle) {
//
// already registered
//
return ERROR_SUCCESS;
}
Error = EventRegister( ProviderId, EnableCallback, CallbackContext, RegHandle);
return Error;
}
DECLSPEC_NOINLINE __inline
ULONG __stdcall
McGenEventUnregister(__inout PREGHANDLE RegHandle)
/*++
Routine Description:
Unregister from ETW USER mode
Arguments:
RegHandle this is the pointer to the provider context
Remarks:
If Provider has not register RegHandle = NULL,
return ERROR_SUCCESS
--*/
{
ULONG Error;
if(!(*RegHandle)) {
//
// Provider has not registerd
//
return ERROR_SUCCESS;
}
Error = EventUnregister(*RegHandle);
*RegHandle = (REGHANDLE)0;
return Error;
}
#endif
//
// Register with ETW Vista +
//
#ifndef EventRegisterValve_FrameRate
#define EventRegisterValve_FrameRate() McGenEventRegister(&VALVE_FRAMERATE, McGenControlCallbackV2, &VALVE_FRAMERATE_Context, &Valve_FrameRateHandle)
#endif
//
// UnRegister with ETW
//
#ifndef EventUnregisterValve_FrameRate
#define EventUnregisterValve_FrameRate() McGenEventUnregister(&Valve_FrameRateHandle)
#endif
//
// Event Macro for RenderFrameMark
//
#define EventWriteRenderFrameMark(Frame_number, Duration__ms_)\
MCGEN_ENABLE_CHECK(VALVE_FRAMERATE_Context, RenderFrameMark) ?\
Template_df(Valve_FrameRateHandle, &RenderFrameMark, Frame_number, Duration__ms_)\
: ERROR_SUCCESS\
//
// Event Macro for SimFrameMark
//
#define EventWriteSimFrameMark(Frame_number, Duration__ms_)\
MCGEN_ENABLE_CHECK(VALVE_FRAMERATE_Context, SimFrameMark) ?\
Template_df(Valve_FrameRateHandle, &SimFrameMark, Frame_number, Duration__ms_)\
: ERROR_SUCCESS\
#endif // MCGEN_DISABLE_PROVIDER_CODE_GENERATION
//+
// Provider Valve-ServerFrameRate Event Count 2
//+
EXTERN_C __declspec(selectany) const GUID VALVE_SERVERFRAMERATE = {0x58a9201e, 0x73b0, 0x42ce, {0x98, 0x21, 0x7e, 0x13, 0x43, 0x61, 0xbc, 0x70}};
//
// Opcodes
//
#define _ServerRenderFrameMarkOpcode 0xa
#define _ServerSimFrameMarkOpcode 0xb
//
// Tasks
//
#define Frame_Task 0x1
EXTERN_C __declspec(selectany) const GUID ServerFrameId = {0x025f363a, 0x49fd, 0x4ffa, {0x96, 0x7c, 0x17, 0x39, 0x36, 0x49, 0x45, 0x00}};
//
// Event Descriptors
//
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR ServerRenderFrameMark = {0x12c, 0x0, 0x0, 0x0, 0xa, 0x1, 0x0};
#define ServerRenderFrameMark_value 0x12c
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR ServerSimFrameMark = {0x12d, 0x0, 0x0, 0x0, 0xb, 0x1, 0x0};
#define ServerSimFrameMark_value 0x12d
//
// Note on Generate Code from Manifest Windows Vista and above
//
//Structures : are handled as a size and pointer pairs. The macro for the event will have an extra
//parameter for the size in bytes of the structure. Make sure that your structures have no extra padding.
//
//Strings: There are several cases that can be described in the manifest. For array of variable length
//strings, the generated code will take the count of characters for the whole array as an input parameter.
//
//SID No support for array of SIDs, the macro will take a pointer to the SID and use appropriate
//GetLengthSid function to get the length.
//
//
// Allow Diasabling of code generation
//
#ifndef MCGEN_DISABLE_PROVIDER_CODE_GENERATION
//
// Globals
//
EXTERN_C __declspec(selectany) REGHANDLE Valve_ServerFrameRateHandle = (REGHANDLE)0;
EXTERN_C __declspec(selectany) MCGEN_TRACE_CONTEXT VALVE_SERVERFRAMERATE_Context = {0};
#if !defined(McGenEventRegisterUnregister)
#define McGenEventRegisterUnregister
DECLSPEC_NOINLINE __inline
ULONG __stdcall
McGenEventRegister(
__in LPCGUID ProviderId,
__in_opt PENABLECALLBACK EnableCallback,
__in_opt PVOID CallbackContext,
__inout PREGHANDLE RegHandle
)
/*++
Routine Description:
This function register the provider with ETW USER mode.
Arguments:
ProviderId - Provider Id to be register with ETW.
EnableCallback - Callback to be used.
CallbackContext - Context for this provider.
RegHandle - Pointer to Registration handle.
Remarks:
If the handle != NULL will return ERROR_SUCCESS
--*/
{
ULONG Error;
if (*RegHandle) {
//
// already registered
//
return ERROR_SUCCESS;
}
Error = EventRegister( ProviderId, EnableCallback, CallbackContext, RegHandle);
return Error;
}
DECLSPEC_NOINLINE __inline
ULONG __stdcall
McGenEventUnregister(__inout PREGHANDLE RegHandle)
/*++
Routine Description:
Unregister from ETW USER mode
Arguments:
RegHandle this is the pointer to the provider context
Remarks:
If Provider has not register RegHandle = NULL,
return ERROR_SUCCESS
--*/
{
ULONG Error;
if(!(*RegHandle)) {
//
// Provider has not registerd
//
return ERROR_SUCCESS;
}
Error = EventUnregister(*RegHandle);
*RegHandle = (REGHANDLE)0;
return Error;
}
#endif
//
// Register with ETW Vista +
//
#ifndef EventRegisterValve_ServerFrameRate
#define EventRegisterValve_ServerFrameRate() McGenEventRegister(&VALVE_SERVERFRAMERATE, McGenControlCallbackV2, &VALVE_SERVERFRAMERATE_Context, &Valve_ServerFrameRateHandle)
#endif
//
// UnRegister with ETW
//
#ifndef EventUnregisterValve_ServerFrameRate
#define EventUnregisterValve_ServerFrameRate() McGenEventUnregister(&Valve_ServerFrameRateHandle)
#endif
//
// Event Macro for ServerRenderFrameMark
//
#define EventWriteServerRenderFrameMark(Frame_number, Duration__ms_)\
MCGEN_ENABLE_CHECK(VALVE_SERVERFRAMERATE_Context, ServerRenderFrameMark) ?\
Template_df(Valve_ServerFrameRateHandle, &ServerRenderFrameMark, Frame_number, Duration__ms_)\
: ERROR_SUCCESS\
//
// Event Macro for ServerSimFrameMark
//
#define EventWriteServerSimFrameMark(Frame_number, Duration__ms_)\
MCGEN_ENABLE_CHECK(VALVE_SERVERFRAMERATE_Context, ServerSimFrameMark) ?\
Template_df(Valve_ServerFrameRateHandle, &ServerSimFrameMark, Frame_number, Duration__ms_)\
: ERROR_SUCCESS\
#endif // MCGEN_DISABLE_PROVIDER_CODE_GENERATION
//+
// Provider Valve-Input Event Count 5
//+
EXTERN_C __declspec(selectany) const GUID VALVE_INPUT = {0x1432afee, 0x73b0, 0x42ce, {0x98, 0x21, 0x7e, 0x13, 0x43, 0x61, 0xb4, 0x33}};
//
// Opcodes
//
#define _MouseDownOpcode 0xa
#define _MouseUpOpcode 0xb
#define _KeyDownOpcode 0xc
#define _MouseMoveOpcode 0xd
#define _MouseWheelOpcode 0xe
//
// Tasks
//
#define Mouse_Task 0x1
EXTERN_C __declspec(selectany) const GUID MouseId = {0x363a49fd, 0xf15f, 0x4ffa, {0x96, 0x7c, 0x17, 0x39, 0x36, 0x49, 0x44, 0x33}};
#define Keyboard_Task 0x2
EXTERN_C __declspec(selectany) const GUID KeyboardId = {0x123a49fd, 0xf15f, 0x4ffa, {0x96, 0x7c, 0x17, 0x39, 0x36, 0x49, 0xbe, 0xad}};
//
// Event Descriptors
//
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR Mouse_down = {0x190, 0x0, 0x0, 0x0, 0xa, 0x1, 0x0};
#define Mouse_down_value 0x190
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR Mouse_up = {0x191, 0x0, 0x0, 0x0, 0xb, 0x1, 0x0};
#define Mouse_up_value 0x191
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR Key_down = {0x192, 0x0, 0x0, 0x0, 0xc, 0x2, 0x0};
#define Key_down_value 0x192
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR Mouse_Move = {0x193, 0x0, 0x0, 0x0, 0xd, 0x1, 0x0};
#define Mouse_Move_value 0x193
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR Mouse_Wheel = {0x194, 0x0, 0x0, 0x0, 0xe, 0x1, 0x0};
#define Mouse_Wheel_value 0x194
//
// Note on Generate Code from Manifest Windows Vista and above
//
//Structures : are handled as a size and pointer pairs. The macro for the event will have an extra
//parameter for the size in bytes of the structure. Make sure that your structures have no extra padding.
//
//Strings: There are several cases that can be described in the manifest. For array of variable length
//strings, the generated code will take the count of characters for the whole array as an input parameter.
//
//SID No support for array of SIDs, the macro will take a pointer to the SID and use appropriate
//GetLengthSid function to get the length.
//
//
// Allow Diasabling of code generation
//
#ifndef MCGEN_DISABLE_PROVIDER_CODE_GENERATION
//
// Globals
//
EXTERN_C __declspec(selectany) REGHANDLE Valve_InputHandle = (REGHANDLE)0;
EXTERN_C __declspec(selectany) MCGEN_TRACE_CONTEXT VALVE_INPUT_Context = {0};
#if !defined(McGenEventRegisterUnregister)
#define McGenEventRegisterUnregister
DECLSPEC_NOINLINE __inline
ULONG __stdcall
McGenEventRegister(
__in LPCGUID ProviderId,
__in_opt PENABLECALLBACK EnableCallback,
__in_opt PVOID CallbackContext,
__inout PREGHANDLE RegHandle
)
/*++
Routine Description:
This function register the provider with ETW USER mode.
Arguments:
ProviderId - Provider Id to be register with ETW.
EnableCallback - Callback to be used.
CallbackContext - Context for this provider.
RegHandle - Pointer to Registration handle.
Remarks:
If the handle != NULL will return ERROR_SUCCESS
--*/
{
ULONG Error;
if (*RegHandle) {
//
// already registered
//
return ERROR_SUCCESS;
}
Error = EventRegister( ProviderId, EnableCallback, CallbackContext, RegHandle);
return Error;
}
DECLSPEC_NOINLINE __inline
ULONG __stdcall
McGenEventUnregister(__inout PREGHANDLE RegHandle)
/*++
Routine Description:
Unregister from ETW USER mode
Arguments:
RegHandle this is the pointer to the provider context
Remarks:
If Provider has not register RegHandle = NULL,
return ERROR_SUCCESS
--*/
{
ULONG Error;
if(!(*RegHandle)) {
//
// Provider has not registerd
//
return ERROR_SUCCESS;
}
Error = EventUnregister(*RegHandle);
*RegHandle = (REGHANDLE)0;
return Error;
}
#endif
//
// Register with ETW Vista +
//
#ifndef EventRegisterValve_Input
#define EventRegisterValve_Input() McGenEventRegister(&VALVE_INPUT, McGenControlCallbackV2, &VALVE_INPUT_Context, &Valve_InputHandle)
#endif
//
// UnRegister with ETW
//
#ifndef EventUnregisterValve_Input
#define EventUnregisterValve_Input() McGenEventUnregister(&Valve_InputHandle)
#endif
//
// Event Macro for Mouse_down
//
#define EventWriteMouse_down(x, y, Button_Type)\
MCGEN_ENABLE_CHECK(VALVE_INPUT_Context, Mouse_down) ?\
Template_ddd(Valve_InputHandle, &Mouse_down, x, y, Button_Type)\
: ERROR_SUCCESS\
//
// Event Macro for Mouse_up
//
#define EventWriteMouse_up(x, y, Button_Type)\
MCGEN_ENABLE_CHECK(VALVE_INPUT_Context, Mouse_up) ?\
Template_ddd(Valve_InputHandle, &Mouse_up, x, y, Button_Type)\
: ERROR_SUCCESS\
//
// Event Macro for Key_down
//
#define EventWriteKey_down(Character, Scan_Code, Virtual_Code)\
MCGEN_ENABLE_CHECK(VALVE_INPUT_Context, Key_down) ?\
Template_sdd(Valve_InputHandle, &Key_down, Character, Scan_Code, Virtual_Code)\
: ERROR_SUCCESS\
//
// Event Macro for Mouse_Move
//
#define EventWriteMouse_Move(x, y)\
MCGEN_ENABLE_CHECK(VALVE_INPUT_Context, Mouse_Move) ?\
Template_dd(Valve_InputHandle, &Mouse_Move, x, y)\
: ERROR_SUCCESS\
//
// Event Macro for Mouse_Wheel
//
#define EventWriteMouse_Wheel(x, y, wheelDelta)\
MCGEN_ENABLE_CHECK(VALVE_INPUT_Context, Mouse_Wheel) ?\
Template_ddd(Valve_InputHandle, &Mouse_Wheel, x, y, wheelDelta)\
: ERROR_SUCCESS\
#endif // MCGEN_DISABLE_PROVIDER_CODE_GENERATION
//+
// Provider Valve-Network Event Count 3
//+
EXTERN_C __declspec(selectany) const GUID VALVE_NETWORK = {0x4372afee, 0x73b0, 0x42ce, {0x98, 0x21, 0x7e, 0x13, 0x43, 0x61, 0xb5, 0x19}};
//
// Opcodes
//
#define _SendOpcode 0xa
#define _ThrottledOpcode 0xb
#define _ReadOpcode 0xc
//
// Tasks
//
#define Transmit_Task 0x1
EXTERN_C __declspec(selectany) const GUID TransmitId = {0x932a49fd, 0xf15f, 0x4ffa, {0x96, 0x7c, 0x17, 0x39, 0x36, 0x49, 0x49, 0x01}};
#define Network_Task 0x2
EXTERN_C __declspec(selectany) const GUID ThrottledId = {0xa32a49fd, 0xf15f, 0x4ffa, {0x96, 0x7c, 0x17, 0x39, 0x36, 0x49, 0x49, 0x02}};
//
// Event Descriptors
//
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR SendPacket = {0x1f4, 0x0, 0x0, 0x0, 0xa, 0x1, 0x0};
#define SendPacket_value 0x1f4
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR Throttled = {0x1f5, 0x0, 0x0, 0x0, 0xb, 0x2, 0x0};
#define Throttled_value 0x1f5
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR ReadPacket = {0x1f6, 0x0, 0x0, 0x0, 0xc, 0x1, 0x0};
#define ReadPacket_value 0x1f6
//
// Note on Generate Code from Manifest Windows Vista and above
//
//Structures : are handled as a size and pointer pairs. The macro for the event will have an extra
//parameter for the size in bytes of the structure. Make sure that your structures have no extra padding.
//
//Strings: There are several cases that can be described in the manifest. For array of variable length
//strings, the generated code will take the count of characters for the whole array as an input parameter.
//
//SID No support for array of SIDs, the macro will take a pointer to the SID and use appropriate
//GetLengthSid function to get the length.
//
//
// Allow Diasabling of code generation
//
#ifndef MCGEN_DISABLE_PROVIDER_CODE_GENERATION
//
// Globals
//
EXTERN_C __declspec(selectany) REGHANDLE Valve_NetworkHandle = (REGHANDLE)0;
EXTERN_C __declspec(selectany) MCGEN_TRACE_CONTEXT VALVE_NETWORK_Context = {0};
#if !defined(McGenEventRegisterUnregister)
#define McGenEventRegisterUnregister
DECLSPEC_NOINLINE __inline
ULONG __stdcall
McGenEventRegister(
__in LPCGUID ProviderId,
__in_opt PENABLECALLBACK EnableCallback,
__in_opt PVOID CallbackContext,
__inout PREGHANDLE RegHandle
)
/*++
Routine Description:
This function register the provider with ETW USER mode.
Arguments:
ProviderId - Provider Id to be register with ETW.
EnableCallback - Callback to be used.
CallbackContext - Context for this provider.
RegHandle - Pointer to Registration handle.
Remarks:
If the handle != NULL will return ERROR_SUCCESS
--*/
{
ULONG Error;
if (*RegHandle) {
//
// already registered
//
return ERROR_SUCCESS;
}
Error = EventRegister( ProviderId, EnableCallback, CallbackContext, RegHandle);
return Error;
}
DECLSPEC_NOINLINE __inline
ULONG __stdcall
McGenEventUnregister(__inout PREGHANDLE RegHandle)
/*++
Routine Description:
Unregister from ETW USER mode
Arguments:
RegHandle this is the pointer to the provider context
Remarks:
If Provider has not register RegHandle = NULL,
return ERROR_SUCCESS
--*/
{
ULONG Error;
if(!(*RegHandle)) {
//
// Provider has not registerd
//
return ERROR_SUCCESS;
}
Error = EventUnregister(*RegHandle);
*RegHandle = (REGHANDLE)0;
return Error;
}
#endif
//
// Register with ETW Vista +
//
#ifndef EventRegisterValve_Network
#define EventRegisterValve_Network() McGenEventRegister(&VALVE_NETWORK, McGenControlCallbackV2, &VALVE_NETWORK_Context, &Valve_NetworkHandle)
#endif
//
// UnRegister with ETW
//
#ifndef EventUnregisterValve_Network
#define EventUnregisterValve_Network() McGenEventUnregister(&Valve_NetworkHandle)
#endif
//
// Event Macro for SendPacket
//
#define EventWriteSendPacket(To, WireSize, outSequenceNR, outSequenceNrAck, CumulativeWireSize)\
MCGEN_ENABLE_CHECK(VALVE_NETWORK_Context, SendPacket) ?\
Template_sdddd(Valve_NetworkHandle, &SendPacket, To, WireSize, outSequenceNR, outSequenceNrAck, CumulativeWireSize)\
: ERROR_SUCCESS\
//
// Event Macro for Throttled
//
#define EventWriteThrottled()\
MCGEN_ENABLE_CHECK(VALVE_NETWORK_Context, Throttled) ?\
TemplateEventDescriptor(Valve_NetworkHandle, &Throttled)\
: ERROR_SUCCESS\
//
// Event Macro for ReadPacket
//
#define EventWriteReadPacket(From, WireSize, inSequenceNR, outSequenceNrAck, CumulativeWireSize)\
MCGEN_ENABLE_CHECK(VALVE_NETWORK_Context, ReadPacket) ?\
Template_sdddd(Valve_NetworkHandle, &ReadPacket, From, WireSize, inSequenceNR, outSequenceNrAck, CumulativeWireSize)\
: ERROR_SUCCESS\
#endif // MCGEN_DISABLE_PROVIDER_CODE_GENERATION
//
// Allow Diasabling of code generation
//
#ifndef MCGEN_DISABLE_PROVIDER_CODE_GENERATION
//
// Template Functions
//
//
//Template from manifest : T_Start
//
#ifndef Template_sd_def
#define Template_sd_def
ETW_INLINE
ULONG
Template_sd(
__in REGHANDLE RegHandle,
__in PCEVENT_DESCRIPTOR Descriptor,
__in_opt LPCSTR Description,
__in const signed int Depth
)
{
#define ARGUMENT_COUNT_sd 2
EVENT_DATA_DESCRIPTOR EventData[ARGUMENT_COUNT_sd];
EventDataDescCreate(&EventData[0],
(Description != NULL) ? Description : "NULL",
(Description != NULL) ? (ULONG)((strlen(Description) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL"));
EventDataDescCreate(&EventData[1], &Depth, sizeof(const signed int) );
return EventWrite(RegHandle, Descriptor, ARGUMENT_COUNT_sd, EventData);
}
#endif
//
//Template from manifest : T_End
//
#ifndef Template_sdf_def
#define Template_sdf_def
ETW_INLINE
ULONG
Template_sdf(
__in REGHANDLE RegHandle,
__in PCEVENT_DESCRIPTOR Descriptor,
__in_opt LPCSTR Description,
__in const signed int Depth,
__in const float Duration__ms_
)
{
#define ARGUMENT_COUNT_sdf 3
EVENT_DATA_DESCRIPTOR EventData[ARGUMENT_COUNT_sdf];
EventDataDescCreate(&EventData[0],
(Description != NULL) ? Description : "NULL",
(Description != NULL) ? (ULONG)((strlen(Description) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL"));
EventDataDescCreate(&EventData[1], &Depth, sizeof(const signed int) );
EventDataDescCreate(&EventData[2], &Duration__ms_, sizeof(const float) );
return EventWrite(RegHandle, Descriptor, ARGUMENT_COUNT_sdf, EventData);
}
#endif
//
//Template from manifest : T_Mark
//
#ifndef Template_s_def
#define Template_s_def
ETW_INLINE
ULONG
Template_s(
__in REGHANDLE RegHandle,
__in PCEVENT_DESCRIPTOR Descriptor,
__in_opt LPCSTR Description
)
{
#define ARGUMENT_COUNT_s 1
EVENT_DATA_DESCRIPTOR EventData[ARGUMENT_COUNT_s];
EventDataDescCreate(&EventData[0],
(Description != NULL) ? Description : "NULL",
(Description != NULL) ? (ULONG)((strlen(Description) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL"));
return EventWrite(RegHandle, Descriptor, ARGUMENT_COUNT_s, EventData);
}
#endif
//
//Template from manifest : T_Mark1F
//
#ifndef Template_sf_def
#define Template_sf_def
ETW_INLINE
ULONG
Template_sf(
__in REGHANDLE RegHandle,
__in PCEVENT_DESCRIPTOR Descriptor,
__in_opt LPCSTR Description,
__in const float Data_1
)
{
#define ARGUMENT_COUNT_sf 2
EVENT_DATA_DESCRIPTOR EventData[ARGUMENT_COUNT_sf];
EventDataDescCreate(&EventData[0],
(Description != NULL) ? Description : "NULL",
(Description != NULL) ? (ULONG)((strlen(Description) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL"));
EventDataDescCreate(&EventData[1], &Data_1, sizeof(const float) );
return EventWrite(RegHandle, Descriptor, ARGUMENT_COUNT_sf, EventData);
}
#endif
//
//Template from manifest : T_Mark2F
//
#ifndef Template_sff_def
#define Template_sff_def
ETW_INLINE
ULONG
Template_sff(
__in REGHANDLE RegHandle,
__in PCEVENT_DESCRIPTOR Descriptor,
__in_opt LPCSTR Description,
__in const float Data_1,
__in const float Data_2
)
{
#define ARGUMENT_COUNT_sff 3
EVENT_DATA_DESCRIPTOR EventData[ARGUMENT_COUNT_sff];
EventDataDescCreate(&EventData[0],
(Description != NULL) ? Description : "NULL",
(Description != NULL) ? (ULONG)((strlen(Description) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL"));
EventDataDescCreate(&EventData[1], &Data_1, sizeof(const float) );
EventDataDescCreate(&EventData[2], &Data_2, sizeof(const float) );
return EventWrite(RegHandle, Descriptor, ARGUMENT_COUNT_sff, EventData);
}
#endif
//
//Template from manifest : T_Mark3F
//
#ifndef Template_sfff_def
#define Template_sfff_def
ETW_INLINE
ULONG
Template_sfff(
__in REGHANDLE RegHandle,
__in PCEVENT_DESCRIPTOR Descriptor,
__in_opt LPCSTR Description,
__in const float Data_1,
__in const float Data_2,
__in const float Data_3
)
{
#define ARGUMENT_COUNT_sfff 4
EVENT_DATA_DESCRIPTOR EventData[ARGUMENT_COUNT_sfff];
EventDataDescCreate(&EventData[0],
(Description != NULL) ? Description : "NULL",
(Description != NULL) ? (ULONG)((strlen(Description) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL"));
EventDataDescCreate(&EventData[1], &Data_1, sizeof(const float) );
EventDataDescCreate(&EventData[2], &Data_2, sizeof(const float) );
EventDataDescCreate(&EventData[3], &Data_3, sizeof(const float) );
return EventWrite(RegHandle, Descriptor, ARGUMENT_COUNT_sfff, EventData);
}
#endif
//
//Template from manifest : T_Mark4F
//
#ifndef Template_sffff_def
#define Template_sffff_def
ETW_INLINE
ULONG
Template_sffff(
__in REGHANDLE RegHandle,
__in PCEVENT_DESCRIPTOR Descriptor,
__in_opt LPCSTR Description,
__in const float Data_1,
__in const float Data_2,
__in const float Data_3,
__in const float Data_4
)
{
#define ARGUMENT_COUNT_sffff 5
EVENT_DATA_DESCRIPTOR EventData[ARGUMENT_COUNT_sffff];
EventDataDescCreate(&EventData[0],
(Description != NULL) ? Description : "NULL",
(Description != NULL) ? (ULONG)((strlen(Description) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL"));
EventDataDescCreate(&EventData[1], &Data_1, sizeof(const float) );
EventDataDescCreate(&EventData[2], &Data_2, sizeof(const float) );
EventDataDescCreate(&EventData[3], &Data_3, sizeof(const float) );
EventDataDescCreate(&EventData[4], &Data_4, sizeof(const float) );
return EventWrite(RegHandle, Descriptor, ARGUMENT_COUNT_sffff, EventData);
}
#endif
//
//Template from manifest : T_Mark2I
//
#ifndef Template_sdd_def
#define Template_sdd_def
ETW_INLINE
ULONG
Template_sdd(
__in REGHANDLE RegHandle,
__in PCEVENT_DESCRIPTOR Descriptor,
__in_opt LPCSTR Description,
__in const signed int Data_1,
__in const signed int Data_2
)
{
#define ARGUMENT_COUNT_sdd 3
EVENT_DATA_DESCRIPTOR EventData[ARGUMENT_COUNT_sdd];
EventDataDescCreate(&EventData[0],
(Description != NULL) ? Description : "NULL",
(Description != NULL) ? (ULONG)((strlen(Description) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL"));
EventDataDescCreate(&EventData[1], &Data_1, sizeof(const signed int) );
EventDataDescCreate(&EventData[2], &Data_2, sizeof(const signed int) );
return EventWrite(RegHandle, Descriptor, ARGUMENT_COUNT_sdd, EventData);
}
#endif
//
//Template from manifest : T_Mark3I
//
#ifndef Template_sddd_def
#define Template_sddd_def
ETW_INLINE
ULONG
Template_sddd(
__in REGHANDLE RegHandle,
__in PCEVENT_DESCRIPTOR Descriptor,
__in_opt LPCSTR Description,
__in const signed int Data_1,
__in const signed int Data_2,
__in const signed int Data_3
)
{
#define ARGUMENT_COUNT_sddd 4
EVENT_DATA_DESCRIPTOR EventData[ARGUMENT_COUNT_sddd];
EventDataDescCreate(&EventData[0],
(Description != NULL) ? Description : "NULL",
(Description != NULL) ? (ULONG)((strlen(Description) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL"));
EventDataDescCreate(&EventData[1], &Data_1, sizeof(const signed int) );
EventDataDescCreate(&EventData[2], &Data_2, sizeof(const signed int) );
EventDataDescCreate(&EventData[3], &Data_3, sizeof(const signed int) );
return EventWrite(RegHandle, Descriptor, ARGUMENT_COUNT_sddd, EventData);
}
#endif
//
//Template from manifest : T_Mark4I
//
#ifndef Template_sdddd_def
#define Template_sdddd_def
ETW_INLINE
ULONG
Template_sdddd(
__in REGHANDLE RegHandle,
__in PCEVENT_DESCRIPTOR Descriptor,
__in_opt LPCSTR Description,
__in const signed int Data_1,
__in const signed int Data_2,
__in const signed int Data_3,
__in const signed int Data_4
)
{
#define ARGUMENT_COUNT_sdddd 5
EVENT_DATA_DESCRIPTOR EventData[ARGUMENT_COUNT_sdddd];
EventDataDescCreate(&EventData[0],
(Description != NULL) ? Description : "NULL",
(Description != NULL) ? (ULONG)((strlen(Description) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL"));
EventDataDescCreate(&EventData[1], &Data_1, sizeof(const signed int) );
EventDataDescCreate(&EventData[2], &Data_2, sizeof(const signed int) );
EventDataDescCreate(&EventData[3], &Data_3, sizeof(const signed int) );
EventDataDescCreate(&EventData[4], &Data_4, sizeof(const signed int) );
return EventWrite(RegHandle, Descriptor, ARGUMENT_COUNT_sdddd, EventData);
}
#endif
//
//Template from manifest : T_Mark1S
//
#ifndef Template_ss_def
#define Template_ss_def
ETW_INLINE
ULONG
Template_ss(
__in REGHANDLE RegHandle,
__in PCEVENT_DESCRIPTOR Descriptor,
__in_opt LPCSTR Description,
__in_opt LPCSTR Data_1
)
{
#define ARGUMENT_COUNT_ss 2
EVENT_DATA_DESCRIPTOR EventData[ARGUMENT_COUNT_ss];
EventDataDescCreate(&EventData[0],
(Description != NULL) ? Description : "NULL",
(Description != NULL) ? (ULONG)((strlen(Description) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL"));
EventDataDescCreate(&EventData[1],
(Data_1 != NULL) ? Data_1 : "NULL",
(Data_1 != NULL) ? (ULONG)((strlen(Data_1) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL"));
return EventWrite(RegHandle, Descriptor, ARGUMENT_COUNT_ss, EventData);
}
#endif
//
//Template from manifest : T_Mark2S
//
#ifndef Template_sss_def
#define Template_sss_def
ETW_INLINE
ULONG
Template_sss(
__in REGHANDLE RegHandle,
__in PCEVENT_DESCRIPTOR Descriptor,
__in_opt LPCSTR Description,
__in_opt LPCSTR Data_1,
__in_opt LPCSTR Data_2
)
{
#define ARGUMENT_COUNT_sss 3
EVENT_DATA_DESCRIPTOR EventData[ARGUMENT_COUNT_sss];
EventDataDescCreate(&EventData[0],
(Description != NULL) ? Description : "NULL",
(Description != NULL) ? (ULONG)((strlen(Description) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL"));
EventDataDescCreate(&EventData[1],
(Data_1 != NULL) ? Data_1 : "NULL",
(Data_1 != NULL) ? (ULONG)((strlen(Data_1) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL"));
EventDataDescCreate(&EventData[2],
(Data_2 != NULL) ? Data_2 : "NULL",
(Data_2 != NULL) ? (ULONG)((strlen(Data_2) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL"));
return EventWrite(RegHandle, Descriptor, ARGUMENT_COUNT_sss, EventData);
}
#endif
//
//Template from manifest : T_ThreadID
//
#ifndef Template_ds_def
#define Template_ds_def
ETW_INLINE
ULONG
Template_ds(
__in REGHANDLE RegHandle,
__in PCEVENT_DESCRIPTOR Descriptor,
__in const signed int ThreadID,
__in_opt LPCSTR ThreadName
)
{
#define ARGUMENT_COUNT_ds 2
EVENT_DATA_DESCRIPTOR EventData[ARGUMENT_COUNT_ds];
EventDataDescCreate(&EventData[0], &ThreadID, sizeof(const signed int) );
EventDataDescCreate(&EventData[1],
(ThreadName != NULL) ? ThreadName : "NULL",
(ThreadName != NULL) ? (ULONG)((strlen(ThreadName) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL"));
return EventWrite(RegHandle, Descriptor, ARGUMENT_COUNT_ds, EventData);
}
#endif
//
//Template from manifest : T_FrameMark
//
#ifndef Template_df_def
#define Template_df_def
ETW_INLINE
ULONG
Template_df(
__in REGHANDLE RegHandle,
__in PCEVENT_DESCRIPTOR Descriptor,
__in const signed int Frame_number,
__in const float Duration__ms_
)
{
#define ARGUMENT_COUNT_df 2
EVENT_DATA_DESCRIPTOR EventData[ARGUMENT_COUNT_df];
EventDataDescCreate(&EventData[0], &Frame_number, sizeof(const signed int) );
EventDataDescCreate(&EventData[1], &Duration__ms_, sizeof(const float) );
return EventWrite(RegHandle, Descriptor, ARGUMENT_COUNT_df, EventData);
}
#endif
//
//Template from manifest : T_MouseClick
//
#ifndef Template_ddd_def
#define Template_ddd_def
ETW_INLINE
ULONG
Template_ddd(
__in REGHANDLE RegHandle,
__in PCEVENT_DESCRIPTOR Descriptor,
__in const signed int x,
__in const signed int y,
__in const signed int Button_Type
)
{
#define ARGUMENT_COUNT_ddd 3
EVENT_DATA_DESCRIPTOR EventData[ARGUMENT_COUNT_ddd];
EventDataDescCreate(&EventData[0], &x, sizeof(const signed int) );
EventDataDescCreate(&EventData[1], &y, sizeof(const signed int) );
EventDataDescCreate(&EventData[2], &Button_Type, sizeof(const signed int) );
return EventWrite(RegHandle, Descriptor, ARGUMENT_COUNT_ddd, EventData);
}
#endif
//
//Template from manifest : T_MouseMove
//
#ifndef Template_dd_def
#define Template_dd_def
ETW_INLINE
ULONG
Template_dd(
__in REGHANDLE RegHandle,
__in PCEVENT_DESCRIPTOR Descriptor,
__in const signed int x,
__in const signed int y
)
{
#define ARGUMENT_COUNT_dd 2
EVENT_DATA_DESCRIPTOR EventData[ARGUMENT_COUNT_dd];
EventDataDescCreate(&EventData[0], &x, sizeof(const signed int) );
EventDataDescCreate(&EventData[1], &y, sizeof(const signed int) );
return EventWrite(RegHandle, Descriptor, ARGUMENT_COUNT_dd, EventData);
}
#endif
//
//Template from manifest : T_Throttled
//
#ifndef TemplateEventDescriptor_def
#define TemplateEventDescriptor_def
ETW_INLINE
ULONG
TemplateEventDescriptor(
__in REGHANDLE RegHandle,
__in PCEVENT_DESCRIPTOR Descriptor
)
{
return EventWrite(RegHandle, Descriptor, 0, NULL);
}
#endif
#endif // MCGEN_DISABLE_PROVIDER_CODE_GENERATION
#if defined(__cplusplus)
};
#endif