PEReader PEReader PEReader 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
PEReaderPEReaderPEReaderPEReader
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) PEReader(Byte*, Int32) PEReader(Byte*, Int32) PEReader(Byte*, Int32)

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

PEReader(Byte*, Int32, Boolean) PEReader(Byte*, Int32, Boolean) PEReader(Byte*, Int32, Boolean) 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(ImmutableArray<Byte>) PEReader(ImmutableArray<Byte>) PEReader(ImmutableArray<Byte>) PEReader(ImmutableArray<Byte>)

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

PEReader(Stream) PEReader(Stream) PEReader(Stream) PEReader(Stream)

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

PEReader(Stream, PEStreamOptions) PEReader(Stream, PEStreamOptions) PEReader(Stream, PEStreamOptions) 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, PEStreamOptions, Int32) PEReader(Stream, PEStreamOptions, Int32) PEReader(Stream, PEStreamOptions, Int32) PEReader(Stream, PEStreamOptions, Int32)

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

Properties

HasMetadata HasMetadata HasMetadata HasMetadata

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

IsEntireImageAvailable IsEntireImageAvailable IsEntireImageAvailable IsEntireImageAvailable

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

IsLoadedImage IsLoadedImage IsLoadedImage IsLoadedImage

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

PEHeaders PEHeaders PEHeaders PEHeaders

Gets the PE headers.

Methods

Dispose() Dispose() Dispose() Dispose()

Disposes all memory allocated by the reader.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

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

(Inherited from Object)
GetEntireImage() GetEntireImage() GetEntireImage() GetEntireImage()

Gets a PEMemoryBlock object containing the entire PE image.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetMetadata() GetMetadata() GetMetadata() GetMetadata()

Loads a PE section that contains CLI metadata.

GetSectionData(Int32) GetSectionData(Int32) GetSectionData(Int32) 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) GetSectionData(String) GetSectionData(String) GetSectionData(String)

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

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ReadCodeViewDebugDirectoryData(DebugDirectoryEntry) ReadCodeViewDebugDirectoryData(DebugDirectoryEntry) ReadCodeViewDebugDirectoryData(DebugDirectoryEntry) ReadCodeViewDebugDirectoryData(DebugDirectoryEntry)

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

ReadDebugDirectory() ReadDebugDirectory() ReadDebugDirectory() ReadDebugDirectory()

Reads all Debug Directory table entries.

ReadEmbeddedPortablePdbDebugDirectoryData(DebugDirectoryEntry) ReadEmbeddedPortablePdbDebugDirectoryData(DebugDirectoryEntry) ReadEmbeddedPortablePdbDebugDirectoryData(DebugDirectoryEntry) ReadEmbeddedPortablePdbDebugDirectoryData(DebugDirectoryEntry)

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

ReadPdbChecksumDebugDirectoryData(DebugDirectoryEntry) ReadPdbChecksumDebugDirectoryData(DebugDirectoryEntry) ReadPdbChecksumDebugDirectoryData(DebugDirectoryEntry) ReadPdbChecksumDebugDirectoryData(DebugDirectoryEntry)

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

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

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

Opens a Portable PDB associated with this PE image.

Extension Methods

GetMetadataReader(PEReader) GetMetadataReader(PEReader) GetMetadataReader(PEReader) GetMetadataReader(PEReader)

Gets a MetadataReader from a PEReader.

GetMetadataReader(PEReader, MetadataReaderOptions) GetMetadataReader(PEReader, MetadataReaderOptions) GetMetadataReader(PEReader, MetadataReaderOptions) GetMetadataReader(PEReader, MetadataReaderOptions)

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

GetMetadataReader(PEReader, MetadataReaderOptions, MetadataStringDecoder) GetMetadataReader(PEReader, MetadataReaderOptions, MetadataStringDecoder) GetMetadataReader(PEReader, MetadataReaderOptions, MetadataStringDecoder) GetMetadataReader(PEReader, MetadataReaderOptions, MetadataStringDecoder)

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

GetMethodBody(PEReader, Int32) GetMethodBody(PEReader, Int32) GetMethodBody(PEReader, Int32) GetMethodBody(PEReader, Int32)

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

Applies to