Share via


ICorProfilerInfo2::SetEnterLeaveFunctionHooks2 メソッド

マネージド関数の "enter"、"leave"、および "tailcall" フックの更新バージョンで呼び出されるプロファイラー実装関数を指定します。

構文

HRESULT SetEnterLeaveFunctionHooks2(  
    [in] FunctionEnter2    *pFuncEnter,  
    [in] FunctionLeave2    *pFuncLeave,  
    [in] FunctionTailcall2 *pFuncTailcall);  

パラメーター

pFuncEnter
[in] FunctionEnter2 コールバックとして使用される実装へのポインター。

pFuncLeave
[in] FunctionLeave2 コールバックとして使用される実装へのポインター。

pFuncTailcall
[in] FunctionTailcall2 コールバックとして使用される実装へのポインター。

解説

SetEnterLeaveFunctionHooks2 メソッドは ICorProfilerInfo::SetEnterLeaveFunctionHooks メソッドに似ています。 新しいバージョンの enter/leave/tailcall コールバックとして使用される関数を指定する場合は前者を使用し、以前のバージョンの enter/leave/tailcall コールバックとして使用される関数を指定する場合は後者を使用してください。

コールバックのセットは一度に 1 つしかアクティブにできません。 そのため、プロファイラーで ICorProfilerInfo::SetEnterLeaveFunctionHooksSetEnterLeaveFunctionHooks2 の両方が呼び出された場合は、SetEnterLeaveFunctionHooks2 が使用されます。

SetEnterLeaveFunctionHooks2 メソッドを呼び出すことができるのは、プロファイラーの ICorProfilerCallback::Initialize コールバックだけです。

必要条件

:システム要件」を参照してください。

ヘッダー : CorProf.idl、CorProf.h

ライブラリ: CorGuids.lib

.NET Framework のバージョン: 2.0 以降で使用可能

関連項目