This documentation is archived and is not being maintained.

ICorProfilerCallback::ManagedToUnmanagedTransition Method

Notifies the profiler that a transition from managed code to unmanaged code has occurred.

HRESULT ManagedToUnmanagedTransition(
    [in] FunctionID                functionId,


Parameter Description


[in] The ID of the function that is being called.


[in] A value of the COR_PRF_TRANSITION_REASON Enumeration enumeration that indicates whether the transition occurred because of a call into unmanaged code from managed code, or because of a return from a managed function called by an unmanaged one.

If the value of reason is COR_PRF_TRANSITION_CALL, the function ID is that of the unmanaged function, which will never have been compiled using the just-in-time compiler. Unmanaged functions have basic information associated with them, such as a name and some metadata. If the unmanaged function was called via implicit platform invoke (PInvoke), the runtime cannot determine the destination of the call and the value of functionId will be NULL. For more information on implicit PInvoke, see Using C++ Interop (Implicit PInvoke).

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: CorProf.idl

Library: CorGuids.lib

.NET Framework Version: 2.0