Gets a pointer to the body of a method in Microsoft intermediate language (MSIL) code, starting at its header.
HRESULT GetILFunctionBody( [in] ModuleID moduleId, [in] mdMethodDef methodId, [out] LPCBYTE *ppMethodHeader, [out] ULONG *pcbMethodSize);
A method is scoped by the module in which it lives. Because the GetILFunctionBody method is designed to give a tool access to the MSIL code before it has been loaded by the common language runtime (CLR), it uses the metadata token of the method to find the desired instance.
GetILFunctionBody can return a CORPROF_E_FUNCTION_NOT_IL HRESULT if the methodId points to a method without any MSIL code (such as an abstract method, or a platform invoke (PInvoke) method).
Platforms: See .NET Framework System Requirements.
.NET Framework Versions: 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0