다음을 통해 공유


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 콜백으로 사용할 함수를 지정합니다.

한 번에 하나의 콜백 집합만 활성화될 수 있습니다. 따라서 프로파일러가 ICorProfilerInfo::SetEnterLeaveFunctionHooksSetEnterLeaveFunctionHooks2를 모두 호출하면 SetEnterLeaveFunctionHooks2가 사용됩니다.

SetEnterLeaveFunctionHooks2 메서드는 프로파일러의 ICorProfilerCallback::Initialize 콜백에서만 호출할 수 있습니다.

요구 사항

플랫폼:시스템 요구 사항을 참조하세요.

헤더: CorProf.idl, CorProf.h

라이브러리: CorGuids.lib

.NET Framework 버전: 2.0부터 사용 가능

참고 항목