RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | List of all members
Microsoft::PEFormat::ResourceDirectory Class Reference
Inheritance diagram for Microsoft::PEFormat::ResourceDirectory:
Microsoft::PEFormat::ResourcesSection

Classes

class  Entry
 Represents a single entry in the resource directory. More...
 
class  Name
 

Public Member Functions

void AddResource (std::shared_ptr< Resource > &resource, size_t level=0)
 Inserts a resource into the directory.
 
size_t ParseResourceDirectoryData (const PEFormat &fmt, uint32_t directory_rva, uint32_t rva, const std::vector< Resource::Identifier > &partial_identifier)
 Parses the contents of the directory at the current level, after all the section data for the file is loaded, returns longest identifier.
 
void DumpResourceDirectory (const PEFormat &fmt, Dumper::Dumper &dump, uint32_t directory_rva, uint32_t rva, const std::vector< Resource::Identifier > &partial_identifier, size_t dump_level) const
 Displays the directory contents.
 
uint32_t CalculateDirectoryOffsets (PEFormat &fmt, uint32_t offset, size_t level_deeper)
 Fills in the offsets for all subdirectories at the specified relative level.
 
void CollectSubdirectoryStrings (PEFormat &fmt, ResourcesSection &rsrc, size_t level_deeper)
 Registers all strings occuring in the directory and its subdirectories at the specified relative level.
 
uint32_t CollectResourceData (PEFormat &fmt, uint32_t rva, size_t level_deeper)
 Calculates the relative virtual addresses of each individual resource at the specified relative level.
 
void WriteDirectories (Linker::Writer &wr, const PEFormat &fmt, uint32_t section_pointer) const
 Recursively writes the directory table and all those of all of its subdirectories and leaves.
 
offset_t WriteResources (Linker::Writer &wr, const PEFormat &fmt, uint32_t rva_to_offset) const
 Recursively writes all the resources, returns the file offset after the last written byte.
 

Public Attributes

uint32_t flags = 0
 Resource directory characteristics.
 
uint32_t timestamp = 0
 
version_type version = { }
 
std::vector< Entry< Name > > name_entries
 Entries that are identified via a string.
 
std::vector< Entry< uint32_t > > id_entries
 Entries that are identified via a number.
 

Member Function Documentation

◆ AddResource()

void PEFormat::ResourceDirectory::AddResource ( std::shared_ptr< Resource > & resource,
size_t level = 0 )

Inserts a resource into the directory.

Parameters
resourceThe resource to add, it contains the full identification required to select the write directory entry
levelThe level at which this directory resides, required to determine the identifier component

The documentation for this class was generated from the following files: