Table of Contents

Class PEReaderContext

Namespace
AsmResolver.PE
Assembly
AsmResolver.PE.dll

Provides a context in which a PE image reader exists in. This includes the original PE file as well as reader parameters.

public class PEReaderContext : IErrorListener
Inheritance
PEReaderContext
Implements
Inherited Members

Constructors

PEReaderContext(PEFile)

Creates a new instance of the PEReaderContext class.

public PEReaderContext(PEFile file)

Parameters

file PEFile

The original PE file.

PEReaderContext(PEFile, PEReaderParameters)

Creates a new instance of the PEReaderContext class.

public PEReaderContext(PEFile file, PEReaderParameters parameters)

Parameters

file PEFile

The original PE file.

parameters PEReaderParameters

The reader parameters.

Properties

File

Gets the original PE file that is being parsed.

public PEFile File { get; }

Property Value

PEFile

Parameters

Gets the reader parameters to use while parsing the PE file.

public PEReaderParameters Parameters { get; }

Property Value

PEReaderParameters

Methods

GetRelocation(ulong, uint)

Creates relocation parameters based on the current PE file that is being read.

public RelocationParameters GetRelocation(ulong offset, uint rva)

Parameters

offset ulong

The offset of the segment.

rva uint

The relative virtual address of the segment.

Returns

RelocationParameters

The created relocation parameters.

MarkAsFatal()

Marks the process to have failed.

public void MarkAsFatal()

RegisterException(Exception)

Registers an error.

public void RegisterException(Exception exception)

Parameters

exception Exception

The error.