Table of Contents

Class ExportDirectoryBuffer

Namespace
AsmResolver.PE.Exports.Builder
Assembly
AsmResolver.PE.dll

Provides a mechanism for building an export data directory in a portable executable (PE) file.

public class ExportDirectoryBuffer : SegmentBase, ISegment, IOffsetProvider, IWritable
Inheritance
ExportDirectoryBuffer
Implements
Inherited Members

Constructors

ExportDirectoryBuffer()

Creates a new empty export directory buffer.

public ExportDirectoryBuffer()

Fields

ExportDirectoryHeaderSize

Gets the raw size in bytes of an export directory header.

public const uint ExportDirectoryHeaderSize = 40

Field Value

uint

Properties

IsEmpty

Gets a value indicating whether the export directory buffer is empty or not.

public bool IsEmpty { get; }

Property Value

bool

Methods

AddDirectory(ExportDirectory)

Adds an export directory and its contents to the buffer.

public void AddDirectory(ExportDirectory exportDirectory)

Parameters

exportDirectory ExportDirectory

The export directory to add.

Exceptions

InvalidProgramException

Occurs when a second directory is added.

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.