PortableExecutableKinds 枚举


标识可执行文件中代码的特性。Identifies the nature of the code in an executable file.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class PortableExecutableKinds
public enum PortableExecutableKinds
type PortableExecutableKinds = 
Public Enum PortableExecutableKinds


ILOnly 1

该可执行文件仅包含 Microsoft 中间语言 (MSIL),因此不特定于 32 位或 64 位平台。The executable contains only Microsoft intermediate language (MSIL), and is therefore neutral with respect to 32-bit or 64-bit platforms.

NotAPortableExecutableImage 0

该文件不是可移植的可执行 (PE) 文件格式。The file is not in portable executable (PE) file format.

PE32Plus 4

该可执行文件需要 64 位平台。The executable requires a 64-bit platform.

Preferred32Bit 16

该可执行文件与平台无光,但应尽可能在 32 位平台上运行。The executable is platform-agnostic but should be run on a 32-bit platform whenever possible.

Required32Bit 2

该可执行文件可在 32 位平台上运行,或在 64 位平台上的 32 位 Windows on Windows (WOW) 环境中运行。The executable can be run on a 32-bit platform, or in the 32-bit Windows on Windows (WOW) environment on a 64-bit platform.

Unmanaged32Bit 8

该可执行文件包含纯非托管代码。The executable contains pure unmanaged code.


若要获取模块的此值, 请使用Module.GetPEKind方法。To obtain this value for a module, use the Module.GetPEKind method.


此枚举对应于非CorPEKind托管反射 API 中的枚举, 该枚举由非托管GetPEKind函数访问。This enumeration corresponds to the CorPEKind enumeration in the unmanaged reflection API, which is accessed by the unmanaged GetPEKind function.