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
Properties
IsEmpty
Gets a value indicating whether the export directory buffer is empty or not.
public bool IsEmpty { get; }
Property Value
Methods
AddDirectory(ExportDirectory)
Adds an export directory and its contents to the buffer.
public void AddDirectory(ExportDirectory exportDirectory)
Parameters
exportDirectory
ExportDirectoryThe 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
RelocationParametersThe 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
BinaryStreamWriterThe output stream to write the data to.