PortableExecutableKinds 枚举
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
标识可执行文件中代码的特性。
此枚举支持其成员值的按位组合。
public enum class PortableExecutableKinds
C#
[System.Flags]
public enum PortableExecutableKinds
C#
[System.Flags]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public enum PortableExecutableKinds
[<System.Flags>]
type PortableExecutableKinds =
[<System.Flags>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type PortableExecutableKinds =
Public Enum PortableExecutableKinds
- 继承
- 属性
名称 | 值 | 说明 |
---|---|---|
ILOnly | 1 | 该可执行文件仅包含 Microsoft 中间语言 (MSIL),因此不特定于 32 位或 64 位平台。 |
NotAPortableExecutableImage | 0 | 该文件不是可移植的可执行 (PE) 文件格式。 |
PE32Plus | 4 | 该可执行文件需要 64 位平台。 |
Preferred32Bit | 16 | 该可执行文件与平台无光,但应尽可能在 32 位平台上运行。 |
Required32Bit | 2 | 该可执行文件可在 32 位平台上运行,或在 64 位平台上的 32 位 Windows on Windows (WOW) 环境中运行。 |
Unmanaged32Bit | 8 | 该可执行文件包含纯非托管代码。 |
若要获取模块的此值,请使用 Module.GetPEKind 方法。
备注
此枚举对应于 CorPEKind
非托管反射 API 中的枚举,该枚举由非托管 GetPEKind
函数访问。
产品 | 版本 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |