Share via


ICorProfilerCallback::ManagedToUnmanagedTransition Method

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

HRESULT ManagedToUnmanagedTransition(
       [in] FunctionID functionId,
    [in] COR_PRF_TRANSITION_REASON reason);

Parameters

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

  • reason
    [in] A value of the COR_PRF_TRANSITION_REASON 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.

Remarks

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 by using 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).

Requirements

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

Header: CorProf.idl

Library: CorGuids.lib

.NET Framework Version: 2.0

See Also

Concepts

ICorProfilerCallback Interface

ICorProfilerCallback::UnmanagedToManagedTransition Method

Using Explicit PInvoke in C++ (DllImport Attribute)