ICorProfilerInfo3::SetEnterLeaveFunctionHooks3 方法

指定分析工具實作函式,以在 FunctionEnter3FunctionLeave3FunctionTailcall3 函式中呼叫。

語法

HRESULT SetEnterLeaveFunctionHooks3(  
            [in] FunctionEnter3    *pFuncEnter3,  
            [in] FunctionLeave3    *pFuncLeave3,  
            [in] FunctionTailcall3 *pFuncTailcall3);  

參數

pFuncEnter3
[in] 要作為 FunctionEnter3 回呼的實作指標。

pFuncLeave3
[in] 要作為 FunctionLeave3 回呼的實作指標。

pFuncTailcall3
[in] 要作為 FunctionTailcall3 回呼的實作指標。

備註

FunctionEnter3FunctionLeave3FunctionTailcall3 掛勾不提供堆疊框架和引數檢查。 若要存取該資訊,則必須設定 COR_PRF_ENABLE_FUNCTION_ARGSCOR_PRF_ENABLE_FUNCTION_RETVAL 和/或 COR_PRF_ENABLE_FRAME_INFO 旗標。 分析工具可以使用 ICorProfilerInfo::SetEventMask 方法來設定事件旗標,然後使用 ICorProfilerInfo3::SetEnterLeaveFunctionHooks3WithInfo 方法來註冊此函式的實作。

一次只能有一組作用中的回呼,而且會優先使用最新版本。 因此,如果分析工具同時呼叫 SetEnterLeaveFunctionHooks2 方法SetEnterLeaveFunctionHooks3 方法,則會使用 SetEnterLeaveFunctionHooks3

SetEnterLeaveFunctionHooks3 方法只能從分析工具的 ICorProfilerCallback::Initialize 回呼來呼叫。

規格需求

平台:請參閱系統需求

標頭: CorProf.idl、CorProf.h

程式庫:CorGuids.lib

.NET Framework版本:自 4 起可用

另請參閱