Notifies the profiler that control is being passed to a function and provides information about the stack frame and function arguments. This function supersedes the FunctionEnter function.
void __stdcall FunctionEnter2 ( [in] FunctionID funcId, [in] UINT_PTR clientData, [in] COR_PRF_FRAME_INFO func, [in] COR_PRF_FUNCTION_ARGUMENT_INFO *argumentInfo );
The values of the func and argumentInfo parameters are not valid after the FunctionEnter2 function returns because the values may change or be destroyed.
The FunctionEnter2 function is a callback; you must implement it. The implementation must use the __declspec(naked) storage-class attribute.
The execution engine does not save any registers before calling this function.
On entry, you must save all registers that you use, including those in the floating-point unit (FPU).
On exit, you must restore the stack by popping off all the parameters that were pushed by its caller.
The implementation of FunctionEnter2 should not block because it will delay garbage collection. The implementation should not attempt a garbage collection because the stack may not be in a garbage collection-friendly state. If a garbage collection is attempted, the runtime will block until FunctionEnter2 returns.
Also, the FunctionEnter2 function must not call into managed code or in any way cause a managed memory allocation.
Platforms: See .NET Framework System Requirements.
.NET Framework Versions: 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0