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

ICorProfilerInfo4::RequestRevert Method

.NET Framework 4.6 and 4.5

Reverts all instances of the specified functions to their original versions.

HRESULT RequestRevert (
   [in] ULONG    cFunctions,
   [in, size_is(cFunctions)]  ModuleID    moduleIds[],
   [in, size_is(cFunctions)]  mdMethodDef methodIds[],
   [out, size_is(cFunctions)]  HRESULT status[]);


[in] The number of functions to revert.


[in] Specifies the moduleId portion of the (module, methodDef) pairs that identify the functions to be reverted.


[in] Specifies the methodId portion of the (module, methodDef) pairs that identify the functions to be reverted.


[out] An array of HRESULTs listed in the "Status HRESULTs" section later in this topic. Each HRESULT indicates the success or failure of trying to revert each function specified in the parallel arrays moduleIds and methodIds.

This method returns the following specific HRESULTs as well as HRESULT errors that indicate method failure.




An attempt was made to revert all requests; however, the returned status array must be checked to determine which functions were successfully reverted.


The profiler must implement the ICorProfilerCallback4 interface for this call to be supported.


JIT recompilation has not been enabled. You must enable JIT recompilation during initialization by using the ICorProfilerInfo::SetEventMask method to set the COR_PRF_ENABLE_REJIT flag.


cFunctions is 0, or moduleIds or methodIds is NULL.


The CLR was unable to complete the request because it ran out of memory.

Status array HRESULT



The corresponding function was successfully reverted.


The moduleID or methodDef parameter is NULL.


The module is not fully loaded yet, or it is in the process of being unloaded.


The specified module was dynamically generated (for example by Reflection.Emit). Therefore, it is not supported by this method.


The CLR could not revert the specified function, because a corresponding active recompilation request was not found. Either the recompilation was never requested or the function was already reverted.


The operating system returned a failure outside the control of the CLR. For example, if a system call to change the access protection of a page of memory fails, the operating system error will be displayed.

The next time any of the revereted function instances are called, the original versions of the functions will be run. If a function is already running, it will finish executing the version that is running.

Platforms: See .NET Framework System Requirements.

Header: CorProf.idl, CorProf.h

Library: CorGuids.lib

.NET Framework Versions: 4.6 RC, 4.5.2, 4.5.1, 4.5

© 2015 Microsoft