ICorDebugProcess2::SetDesiredNGENCompilerFlags 方法

设置必须在预编译映像中嵌入的标志,以便运行时将该映像加载到当前进程中。

Syntax

HRESULT SetDesiredNGENCompilerFlags (
    [in] DWORD    pdwFlags
);

参数

pdwFlags [in] CorDebugJITCompilerFlags 枚举的值,指定用于选择正确预编译映像的编译器标志。

注解

该方法 SetDesiredNGENCompilerFlags 指定必须在预编译映像中嵌入的标志,以便运行时将该映像加载到此过程。 此方法设置的标志仅用于选择正确的预编译映像。 如果不存在此类映像,运行时将改为加载公共中间语言 (CIL) 映像和实时 (JIT) 编译器。 在这种情况下,调试器仍必须使用 ICorDebugModule2::SetJITCompilerFlags 方法来根据需要为 JIT 编译设置标志。

如果加载映像,但该映像必须进行一些 JIT 编译(如果映像包含泛型,则会出现这种情况),则该方法指定的 SetDesiredNGENCompilerFlags 编译器标志将应用于额外的 JIT 编译。

SetDesiredNGENCompilerFlags必须在 ICorDebugManagedCallback::CreateProcess 回调期间调用该方法。 之后尝试调用 SetDesiredNGENCompilerFlags 该方法将失败。 此外,尝试设置未在枚举中 CorDebugJITCompilerFlags 定义的标志,或者对给定进程不合法将失败。

要求

平台: 请参阅 .NET 支持的作系统

页眉: CorDebug.idl、CorDebug.h

图书馆: CorGuids.lib

.NET 版本: 自 .NET Framework 2.0 起可用

另请参阅