LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
LIEF::PE::ResourceVar Class Reference

This class represents an element of the ResourceVarFileInfo structure It typically contains a list of language and code page identifier pairs that the version of the application or DLL supports. More...

#include <ResourceVar.hpp>

Public Types

using values_t = std::vector<uint32_t>
 Translation values as a vector of uint32_t.
 

Public Member Functions

 ResourceVar ()=default
 
 ResourceVar (const ResourceVar &)=default
 
ResourceVaroperator= (const ResourceVar &)=default
 
 ResourceVar (ResourceVar &&)=default
 
ResourceVaroperator= (ResourceVar &&)=default
 
 ~ResourceVar ()=default
 
const std::u16string & key () const
 The Unicode string L"Translation"
 
uint16_t type () const
 The type of data in the version resource:
 
std::string key_u8 () const
 The key as an utf8 string.
 
const values_tvalues () const
 Return the translation values.
 
values_tvalues ()
 
ResourceVarkey (std::u16string key)
 
ResourceVartype (uint16_t ty)
 
void add_value (uint32_t val)
 

Static Public Member Functions

static result< ResourceVarparse (BinaryStream &stream)
 

Detailed Description

This class represents an element of the ResourceVarFileInfo structure It typically contains a list of language and code page identifier pairs that the version of the application or DLL supports.

See: https://learn.microsoft.com/en-us/windows/win32/menurc/var-str

Member Typedef Documentation

◆ values_t

using LIEF::PE::ResourceVar::values_t = std::vector<uint32_t>

Translation values as a vector of uint32_t.

Constructor & Destructor Documentation

◆ ResourceVar() [1/3]

LIEF::PE::ResourceVar::ResourceVar ( )
default

◆ ResourceVar() [2/3]

LIEF::PE::ResourceVar::ResourceVar ( const ResourceVar & )
default

◆ ResourceVar() [3/3]

LIEF::PE::ResourceVar::ResourceVar ( ResourceVar && )
default

◆ ~ResourceVar()

LIEF::PE::ResourceVar::~ResourceVar ( )
default

Member Function Documentation

◆ add_value()

void LIEF::PE::ResourceVar::add_value ( uint32_t val)
inline

◆ key() [1/2]

const std::u16string & LIEF::PE::ResourceVar::key ( ) const
inline

The Unicode string L"Translation"

◆ key() [2/2]

ResourceVar & LIEF::PE::ResourceVar::key ( std::u16string key)
inline

◆ key_u8()

std::string LIEF::PE::ResourceVar::key_u8 ( ) const

The key as an utf8 string.

◆ operator=() [1/2]

ResourceVar & LIEF::PE::ResourceVar::operator= ( const ResourceVar & )
default

◆ operator=() [2/2]

ResourceVar & LIEF::PE::ResourceVar::operator= ( ResourceVar && )
default

◆ parse()

static result< ResourceVar > LIEF::PE::ResourceVar::parse ( BinaryStream & stream)
static

◆ type() [1/2]

uint16_t LIEF::PE::ResourceVar::type ( ) const
inline

The type of data in the version resource:

  • 1 if it contains text data
  • 0 if it contains binary

◆ type() [2/2]

ResourceVar & LIEF::PE::ResourceVar::type ( uint16_t ty)
inline

◆ values() [1/2]

values_t & LIEF::PE::ResourceVar::values ( )
inline

◆ values() [2/2]

const values_t & LIEF::PE::ResourceVar::values ( ) const
inline

Return the translation values.

The low-order word of each uint32_t must contain a Microsoft language identifier, and the high-order word must contain the IBM code page number. Either high-order or low-order word can be zero, indicating that the file is language or code page independent


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