Class ResourceDirectoryBuffer
- Namespace
- AsmResolver.PE.Win32Resources.Builder
- Assembly
- AsmResolver.PE.dll
Provides a mechanism for building a new resource directory in a PE file.
public class ResourceDirectoryBuffer : ISegment, IOffsetProvider, IWritable
- Inheritance
-
ResourceDirectoryBuffer
- Implements
- Inherited Members
Constructors
ResourceDirectoryBuffer()
Creates a new resource directory buffer.
public ResourceDirectoryBuffer()
Properties
CanUpdateOffsets
Determines whether this structure can be relocated to another offset or virtual address.
public bool CanUpdateOffsets { get; }
Property Value
DataEntryTable
Gets the segment containing the table with all data entries.
public ResourceTableBuffer<ResourceData> DataEntryTable { get; }
Property Value
DataTable
Gets the segment containing all raw data segments for each data entry.
public SegmentBuilder DataTable { get; }
Property Value
DirectoryTable
Gets the segment containing the table with all directory entries.
public ResourceTableBuffer<ResourceDirectory> DirectoryTable { get; }
Property Value
IsEmpty
Gets a value indicating whether there is any data added to the buffer.
public bool IsEmpty { get; }
Property Value
NameTable
Gets the segment containing the table with the names for all named resource entries.
public ResourceTableBuffer<string> NameTable { get; }
Property Value
Offset
Gets the physical starting offset of the segment.
public ulong Offset { get; }
Property Value
Rva
Gets the virtual address relative to the beginning of the section that the segment is located in.
public uint Rva { get; }
Property Value
Methods
AddDirectory(ResourceDirectory)
Adds a resource directory and all its sub entries to the buffer.
public void AddDirectory(ResourceDirectory directory)
Parameters
directory
ResourceDirectoryThe directory to add.
GetPhysicalSize()
Computes the number of bytes that the structure contains.
public uint GetPhysicalSize()
Returns
- uint
The number of bytes.
GetVirtualSize()
Computes the number of bytes the segment will contain when it is mapped into memory.
public uint GetVirtualSize()
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 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 void Write(BinaryStreamWriter writer)
Parameters
writer
BinaryStreamWriterThe output stream to write the data to.