Επεξεργασία

Κοινή χρήση μέσω


PEReader Class

Definition

Provides a reader for Portable Executable format (PE) files.

public ref class PEReader sealed : IDisposable
public sealed class PEReader : IDisposable
type PEReader = class
    interface IDisposable
Public NotInheritable Class PEReader
Implements IDisposable
Inheritance
PEReader
Implements

Remarks

The implementation is thread-safe. That is, multiple threads can read data from the reader in parallel. Disposal of the reader is not thread-safe (see Dispose()).

Constructors

PEReader(Byte*, Int32, Boolean)

Creates a Portable Executable reader over a PE image stored in memory. A flag indicates whether the image has already been loaded into memory.

PEReader(Byte*, Int32)

Creates a Portable Executable reader over a PE image stored in memory.

PEReader(ImmutableArray<Byte>)

Creates a Portable Executable reader over a PE image stored in a byte array.

PEReader(Stream, PEStreamOptions, Int32)

Creates a Portable Executable reader over a PE image of the given size beginning at the stream's current position.

PEReader(Stream, PEStreamOptions)

Creates a Portable Executable reader over a PE image stored in a stream beginning at its current position and ending at the end of the stream.

PEReader(Stream)

Creates a Portable Executable reader over a PE image stored in a stream.

Properties

HasMetadata

Gets a value that indicates if the PE image contains CLI metadata.

IsEntireImageAvailable

Gets a value that indicates if the reader can access the entire PE image.

IsLoadedImage

Gets a value that indicates if the PE image has been loaded into memory by the OS loader.

PEHeaders

Gets the PE headers.

Methods

Dispose()

Disposes all memory allocated by the reader.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEntireImage()

Gets a PEMemoryBlock object containing the entire PE image.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetMetadata()

Loads a PE section that contains CLI metadata.

GetSectionData(Int32)

Loads the PE section that contains the specified relative virtual address into memory and returns a memory block that starts at that address and ends at the end of the containing section.

GetSectionData(String)

Loads the PE section with the specified name into memory and returns a memory block that spans the section.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ReadCodeViewDebugDirectoryData(DebugDirectoryEntry)

Reads the data pointed to by the specified Debug Directory entry and interprets it as CodeView.

ReadDebugDirectory()

Reads all Debug Directory table entries.

ReadEmbeddedPortablePdbDebugDirectoryData(DebugDirectoryEntry)

Reads the data pointed to by the specified Debug Directory entry and interprets it as an Embedded Portable PDB blob.

ReadPdbChecksumDebugDirectoryData(DebugDirectoryEntry)

Reads the data pointed to by the specified Debug Directory entry and interprets it as a PDB Checksum entry.

ToString()

Returns a string that represents the current object.

(Inherited from Object)
TryOpenAssociatedPortablePdb(String, Func<String,Stream>, MetadataReaderProvider, String)

Opens a Portable PDB associated with this PE image.

Extension Methods

GetMetadataReader(PEReader, MetadataReaderOptions, MetadataStringDecoder)

Gets a metadata reader with the specified metadata reading configuration and encoding configuration from a PEReader.

GetMetadataReader(PEReader, MetadataReaderOptions)

Gets a metadata reader with the specified metadata reading configuration from a PEReader.

GetMetadataReader(PEReader)

Gets a MetadataReader from a PEReader.

GetMethodBody(PEReader, Int32)

Returns a body block of a method with the specified Relative Virtual Address (RVA).

Applies to