PEStreamOptions 枚举

定义

提供指定如何从流中读取 PE 映像各部分的选项。Provides options that specify how sections of a PE image are read from a stream.

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

public enum class PEStreamOptions
[System.Flags]
public enum PEStreamOptions
type PEStreamOptions = 
Public Enum PEStreamOptions
继承
PEStreamOptions
属性

字段

Default 0

默认情况下,释放 PEReader 并且延迟读取 PE 映像的各部分时,系统才会释放该流。By default, the stream is disposed when the PEReader is disposed, and sections of the PE image are read lazily.

IsLoadedImage 8

指示基础 PE 映像已由 OS 加载程序加载到内存中。Indicates that the underlying PE image has been loaded into memory by the OS loader.

LeaveOpen 1

在释放 PEReader 时将流保持为开放状态。Keeps the stream open when the PEReader is disposed.

PrefetchEntireImage 4

立即将整个映像读入内存中。Reads the entire image into memory right away. 除非指定了 LeaveOpen,否则 PEReader 会在构造函数返回时自动关闭流。PEReader closes the stream automatically by the time the constructor returns unless LeaveOpen is specified.

PrefetchMetadata 2

立即将元数据部分读入内存中。Reads the metadata section into memory right away.

不允许从文件的其他部分进行读取(InvalidOperationExceptionPEReader 引发)。Reading from other sections of the file is not allowed (InvalidOperationException is thrown by the PEReader).

除非指定了 LeaveOpen,否则 PEReader 会在构造函数返回时自动关闭流。PEReader closes the stream automatically by the time the constructor returns unless LeaveOpen is specified. 构造 PEReader 之后,基础文件可能会关闭,甚至被删除。The underlying file may be closed and even deleted after PEReader is constructed.

适用于