ICorProfilerInfo::SetEnterLeaveFunctionHooks 方法

可指定要在受控函式的 「enter」、「leave」 和 「tailcall」 勾點上呼叫分析工具實作的函式。

語法

HRESULT SetEnterLeaveFunctionHooks(  
    [in] FunctionEnter    *pFuncEnter,  
    [in] FunctionLeave    *pFuncLeave,  
    [in] FunctionTailcall *pFuncTailcall);  

參數

pFuncEnter
[in] 要作為 FunctionEnter 回呼的實作指標。

pFuncLeave
[in] 要作為 FunctionLeave 回呼的實作指標。

pFuncTailcall
[in] 要作為 FunctionTailcall 回呼的實作指標。

備註

在 .NET Framework 1.0 版中,每個函式指標可以是 null,以停用該對應的回呼。

一次只能有一組作用中的回呼。 因此,如果分析工具同時呼叫 SetEnterLeaveFunctionHooksICorProfilerInfo2::SetEnterLeaveFunctionHooks2,則會以 SetEnterLeaveFunctionHooks2 為優先。

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

規格需求

平台:請參閱系統需求

標頭: CorProf.idl、CorProf.h

程式庫:CorGuids.lib

.NET Framework版本:自 1.1 起提供

另請參閱