Table of Contents

Class ImportDirectoryBuffer

Namespace
AsmResolver.PE.Imports.Builder
Assembly
AsmResolver.PE.dll

Provides a mechanism for building an import lookup directory in a PE file.

public class ImportDirectoryBuffer : ImportDirectoryBufferBase, ISegment, IOffsetProvider, IWritable, IImportAddressProvider
Inheritance
ImportDirectoryBuffer
Implements
Inherited Members

Constructors

ImportDirectoryBuffer(bool)

Creates a new import lookup directory.

public ImportDirectoryBuffer(bool is32Bit)

Parameters

is32Bit bool

Indicates the import directory should use 32-bit addresses or 64-bit addresses.

Properties

ImportAddressDirectory

Gets the import address directory that is linked to this lookup directory.

public ImportAddressDirectoryBuffer ImportAddressDirectory { get; }

Property Value

ImportAddressDirectoryBuffer

IsEmpty

Gets a value indicating whether there is any data added to the buffer.

public bool IsEmpty { get; }

Property Value

bool

Methods

AddModule(ImportedModule)

Creates a thunk table for a module and its imported members, and adds it to the buffer.

public override void AddModule(ImportedModule module)

Parameters

module ImportedModule

The module to add.

GetPhysicalSize()

Computes the number of bytes that the structure contains.

public override uint GetPhysicalSize()

Returns

uint

The number of bytes.

UpdateOffsets(in RelocationParameters)

Assigns a new file and virtual offset to the segment and all its sub-components.

public override void UpdateOffsets(in RelocationParameters parameters)

Parameters

parameters RelocationParameters

The parameters containing the new offset information for the segment.

Write(BinaryStreamWriter)

Serializes the structure to an output stream.

public override void Write(BinaryStreamWriter writer)

Parameters

writer BinaryStreamWriter

The output stream to write the data to.