Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

ICorProfilerInfo::GetCodeInfo Method

Gets the extent of native code associated with the specified function ID.

This method is obsolete. Use the ICorProfilerInfo2::GetCodeInfo2 method instead.

HRESULT GetCodeInfo(
    [in]  FunctionID functionId,
    [out] LPCBYTE    *pStart,
    [out] ULONG      *pcSize);


[in] The ID of the function with which the native code is associated.


[out] A pointer to an array of bytes that compose the native code of the function.


[out] A pointer to an integer that specifies the size, in bytes, of the native code.

To optimize performance, the runtime in the .NET Framework version 2.0 splits the precompiled, native code of a function into multiple regions. Consequently, the GetCodeInfo method is obsolete in the .NET Framework 2.0 because it is unable to handle the extent of a function's native code. Profilers should switch to using the more general ICorProfilerInfo2::GetCodeInfo2 method instead.

This function uses caller-allocated buffers. For more information, see Caller-Allocated Buffers.

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

Header: CorProf.idl

Library: CorGuids.lib

.NET Framework Version: 1.0

Community Additions

© 2015 Microsoft