ICorProfilerFunctionControl::SetILFunctionBody Method
Replaces the Common Intermediate Language (CIL) body of the method.
Syntax
HRESULT SetILFunctionBody(
[in] ULONG cbNewILMethodHeader,
[in, size_is(cbNewILMethodHeader)] LPCBYTE pbNewILMethodHeader);
Parameters
cbNewILMethodHeader
[in] The total size of the new CIL, including the header and any structures that come after the body.
pbNewILMethodHeader
[in] A pointer to the new CIL header.
Return Value
This method returns the following specific HRESULTs.
HRESULT | Description |
---|---|
S_OK | The replacement was successful. |
Remarks
Unlike the ICorProfilerInfo::SetILFunctionBody method, the SetILFunctionBody
method manages the memory required for the new CIL body. This means that the CIL body provided by the profiler does not have to be allocated by using the IMethodMalloc interface or allocated within a particular range. It can be allocated on any heap. The profiler can free the memory used for its CIL body after SetILFunctionBody
returns.
Requirements
Platforms: See System Requirements.
Header: CorProf.idl, CorProf.h
Library: CorGuids.lib
.NET Framework Versions: Available since 4.5
See also
משוב
https://aka.ms/ContentUserFeedback.
בקרוב: במהלך 2024, נפתור בעיות GitHub כמנגנון המשוב לתוכן ונחליף אותו במערכת משוב חדשה. לקבלת מידע נוסף, ראה:שלח והצג משוב עבור