定义现有提供程序上的 EventPipe 事件。 此提供程序可用于编写其他侦听器可以接收的 EventPipe 事件。
语法
HRESULT EventPipeDefineEvent(
[in] EVENTPIPE_PROVIDER provider,
[in, string] const WCHAR *eventName,
[in] UINT32 eventID,
[in] UINT64 keywords,
[in] UINT32 eventVersion,
[in] UINT32 level,
[in] UINT8 opcode,
[in] BOOL needStack,
[in] UINT32 cParamDescs,
[in, size_is(cParamDescs)]
COR_PRF_EVENTPIPE_PARAM_DESC pParamDescs[],
[out] EVENTPIPE_EVENT *pEvent);
参数
provider
[in]要定义事件的提供程序的 ID。
eventName
[in]指向包含事件名称的 null 终止宽字符字符串的指针。
eventID
[in]要定义的事件的 ID。
keywords
[in]要定义的事件的关键字。
eventVersion
[in]要定义的事件的版本。
level
[in]要定义的事件的级别。
opcode
[in]要定义的事件的作码。
needStack
[in]指示 BOOL
每次触发此事件时是否应收集托管堆栈。
cParamDescs
[in]中 pParamDescs
参数数的计数。
pParamDescs
[in]定义要定义的事件的参数类型的数组 COR_PRF_EVENTPIPE_PARAM_DESC
。
pEvent
[out]调用方提供的指针将填充函数返回时定义的事件的 ID。
要求
平台: 请参阅 .NET 支持的作系统。
页眉: CorProf.idl、CorProf.h
.NET 版本: 自 .NET 5.0 起可用