RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Microsoft::PEFormat::Resource Class Reference

Represents a resource inside the image. More...

#include <peexe.h>

Public Types

typedef std::variant< std::string, uint32_t > Identifier
 Represents a resource identifier, either a string or a 32-bit value.
 

Public Member Functions

 Resource (const std::vector< Resource::Identifier > &full_identifier)
 
size_t ParseResourceData (const PEFormat &fmt, uint32_t rva)
 Parses the contents of the resource, after all the section data for the file is loaded, returns longest full identifier.
 
void DumpResource (const PEFormat &fmt, Dumper::Dumper &dump, uint32_t rva) const
 Displays the resource contents.
 
uint32_t AssignAddress (PEFormat &fmt, uint32_t rva)
 Assigns the relative virtual addresses and returns the relative virtual address of the end of the resource.
 
void WriteDirectories (Linker::Writer &wr, const PEFormat &fmt, uint32_t section_pointer) const
 Writes the directory entry for this resource.
 
offset_t WriteResource (Linker::Writer &wr, const PEFormat &fmt, uint32_t rva_to_offset) const
 Writes the actual resource, returns the file offset after the last written byte.
 

Static Public Member Functions

static void DumpIdentifier (std::vector< Identifier > full_identifier, Dumper::Container &container)
 Adds fields to the container that describe the identifier.
 

Public Attributes

std::vector< Identifierfull_identifier
 The sequence of IDs that identifies this resource, conventionally corresponding to the resource type, name and language.
 
uint32_t data_rva = 0
 The relative virtual address of the resource data.
 
uint32_t size = 0
 The size of the resource data.
 
uint32_t codepage = 0
 Codepage of the resource.
 
uint32_t reserved = 0
 Reserved entry in the resource table.
 
std::shared_ptr< Linker::Sectionsection = nullptr
 The section containing the resource, only used for generating images.
 

Static Public Attributes

static constexpr size_t Level_Type = 0
 The first level of the resource tree corresponds to the resource type.
 
static constexpr size_t Level_Name = 1
 The second level of the resource tree corresponds to the resource name.
 
static constexpr size_t Level_Language = 2
 The third level of the resource tree corresponds to the language (locale) for the resource.
 
static constexpr size_t Level_Count = 3
 Total number of levels used.
 

Detailed Description

Represents a resource inside the image.


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