Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ICorProfilerInfo::SetILFunctionBody Method

Replaces the body of the specified function in the specified module.


HRESULT SetILFunctionBody(
    [in] ModuleID    moduleId,
    [in] mdMethodDef methodid,
    [in] LPCBYTE     pbNewILMethodHeader);

Parameters

Parameter Description

moduleId

[in] The ID of the module in which the function resides.

methodid

[in] The token of the function for which to replace the body.

pbNewILMethodHeader

[in] The new header for the function.

The SetILFunctionBody method replaces the relative virtual address of the function in the metadata so that it points to the new function body, and adjusts any internal data structures as required.

The SetILFunctionBody method can be called on only those functions that have never been compiled by a just-in-time (JIT) compiler.

Use ICorProfilerInfo::GetILFunctionBodyAllocator Method to allocate space for the new method to ensure that the buffer is compatible.

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

Header: CorProf.idl

Library: CorGuids.lib

.NET Framework Version: 2.0

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.