ICorProfilerInfo5::GetEventMask2 方法ICorProfilerInfo5::GetEventMask2 Method

[.NET Framework 4.5.2 與更新版本提供支援][Supported in the .NET Framework 4.5.2 and later versions]

取得分析工具想要從 Common Language Runtime (CLR) 接收通知的目前事件分類。Gets the current event categories for which the profiler wants to receive notifications from the common language runtime (CLR). 它提供 ICorProfilerInfo:: GetEventMask 方法未提供的功能。It provides functionality not provided by the ICorProfilerInfo::GetEventMask method.

語法Syntax

HRESULT GetEventMask2(  
        [out] DWORD* pdwEventsLow,  
        [out] DWORD* pdwEventsHigh  
);  

參數Parameters

pdwEventsLow
[out] 指定事件分類的 4 位元組值的指標。[out] A pointer to a 4-byte value that specifies the categories of events. 每個位元各控制事件的不同功能、行為或類型。Each bit controls a different capability, behavior, or type of event. COR_PRF_MONITOR列舉中會說明這些位。The bits are described in the COR_PRF_MONITOR enumeration.

pdwEventsHigh
[out] 指定事件分類的 4 位元組值的指標。[out] A pointer to a 4-byte value that specifies the categories of events. 每個位元各控制事件的不同功能、行為或類型。Each bit controls a different capability, behavior, or type of event. COR_PRF_HIGH_MONITOR列舉中會說明這些位。The bits are described in the COR_PRF_HIGH_MONITOR enumeration.

備註Remarks

GetEventMask2 方法可用於判斷分析工具已訂閱哪些回呼。The GetEventMask2 method is used to determine which callbacks the profiler has subscribed to. 一般來說,您會執行和值的邏輯 OR, pdwEventsLow pdwEventsHigh 以及您想要設定的任何新位,然後呼叫 SetEventMask2 方法。Typically, you perform a logical OR of the pdwEventsLow and pdwEventsHigh values and any new bits you want to set, and then call the SetEventMask2 method.

這是 GetEventMask 方法的建議替代方法。This method is the recommended alternative to the GetEventMask method.

需求Requirements

平台: 請參閱 系統需求Platforms: See System Requirements.

標頭: CorProf.idl、CorProf.hHeader: CorProf.idl, CorProf.h

程式庫: CorGuids.libLibrary: CorGuids.lib

.NET Framework 版本:自 4.5.2 起可用Available since 4.5.2.NET Framework Versions: 自 4.5.2 起可用Available since 4.5.2

另請參閱See also