LIEF: Library to Instrument Executable Formats Version 0.17.0
|
The Resource Manager provides an enhanced API to manipulate the resource tree. More...
#include <ResourcesManager.hpp>
Classes | |
struct | string_entry_t |
This structure represent an entry in the string table (RT_STRING ) More... | |
Public Member Functions | |
ResourcesManager ()=delete | |
ResourcesManager (ResourceNode &rsrc) | |
ResourcesManager (const ResourcesManager &other) | |
ResourcesManager & | operator= (const ResourcesManager &other) |
ResourcesManager (ResourcesManager &&)=default | |
ResourcesManager & | operator= (ResourcesManager &&)=default |
~ResourcesManager () override=default | |
ResourceNode * | get_node_type (TYPE type) |
Return the ResourceNode associated with the given TYPE or a nullptr if not found;. | |
const ResourceNode * | get_node_type (TYPE type) const |
std::vector< TYPE > | get_types () const |
List of TYPE present in the resources. | |
bool | has_type (TYPE type) const |
true if the resource has the given TYPE node | |
bool | has_manifest () const |
true if resources contain the Manifest element | |
std::string | manifest () const |
Return the manifest as a std::string or an empty string if not found or corrupted. | |
void | manifest (const std::string &manifest) |
Change or set the manifest. If the manifest node path does not exist, all required nodes are created. | |
bool | has_version () const |
true if resources a LIEF::PE::ResourceVersion | |
std::vector< ResourceVersion > | version () const |
Return a list of verison info (VS_VERSIONINFO ). | |
bool | has_icons () const |
true if resources contain a LIEF::PE::ResourceIcon | |
it_const_icons | icons () const |
Return the list of the icons present in the resources. | |
void | add_icon (const ResourceIcon &icon) |
Add an icon to the resources. | |
void | change_icon (const ResourceIcon &original, const ResourceIcon &newone) |
bool | has_dialogs () const |
true if resources contain dialogs | |
it_const_dialogs | dialogs () const |
Return the list of the dialogs present in the resource. | |
bool | has_string_table () const |
true if the resources contain a string table | |
strings_table_t | string_table () const |
Return the list of the strings embedded in the string table (RT_STRING ) | |
bool | has_html () const |
true if the resources contain html | |
std::vector< std::string > | html () const |
Return the list of the html resources. | |
bool | has_accelerator () const |
true if the resources contain accelerator info | |
it_const_accelerators | accelerator () const |
Return the list of the accelerator in the resource. | |
std::string | print (uint32_t depth=0) const |
Print the resource tree to the given depth. | |
void | accept (Visitor &visitor) const override |
![]() | |
Object () | |
Object (const Object &other) | |
Object & | operator= (const Object &other) |
template<class T > | |
output_t< T > | as () |
template<class T > | |
output_const_t< T > | as () const |
virtual bool | operator== (const Object &other) const |
virtual bool | operator!= (const Object &other) const |
virtual | ~Object () |
The Resource Manager provides an enhanced API to manipulate the resource tree.
using LIEF::PE::ResourcesManager::accelerators_t = std::vector<ResourceAccelerator> |
using LIEF::PE::ResourcesManager::icons_t = std::vector<ResourceIcon> |
using LIEF::PE::ResourcesManager::it_const_dialogs = const_ref_iterator<const dialogs_t&, const ResourceDialog*> |
using LIEF::PE::ResourcesManager::strings_table_t = std::vector<string_entry_t> |
|
strong |
The different types of resources From https://learn.microsoft.com/en-us/windows/win32/menurc/resource-types.
Enumerator | |
---|---|
CURSOR | |
BITMAP | |
ICON | |
MENU | |
DIALOG | |
STRING | |
FONTDIR | |
FONT | |
ACCELERATOR | |
RCDATA | |
MESSAGETABLE | |
GROUP_CURSOR | |
GROUP_ICON | |
VERSION | |
DLGINCLUDE | |
PLUGPLAY | |
VXD | |
ANICURSOR | |
ANIICON | |
HTML | |
MANIFEST |
|
delete |
|
inline |
|
inline |
|
default |
|
overridedefault |
it_const_accelerators LIEF::PE::ResourcesManager::accelerator | ( | ) | const |
Return the list of the accelerator in the resource.
|
overridevirtual |
Implements LIEF::Object.
void LIEF::PE::ResourcesManager::add_icon | ( | const ResourceIcon & | icon | ) |
Add an icon to the resources.
void LIEF::PE::ResourcesManager::change_icon | ( | const ResourceIcon & | original, |
const ResourceIcon & | newone ) |
it_const_dialogs LIEF::PE::ResourcesManager::dialogs | ( | ) | const |
Return the list of the dialogs present in the resource.
|
inline |
Return the ResourceNode associated with the given TYPE or a nullptr if not found;.
const ResourceNode * LIEF::PE::ResourcesManager::get_node_type | ( | TYPE | type | ) | const |
std::vector< TYPE > LIEF::PE::ResourcesManager::get_types | ( | ) | const |
List of TYPE present in the resources.
|
inline |
true
if the resources contain accelerator info
|
inline |
true
if resources contain dialogs
|
inline |
true
if the resources contain html
|
inline |
true
if resources contain a LIEF::PE::ResourceIcon
|
inline |
true
if resources contain the Manifest element
|
inline |
true
if the resources contain a string table
|
inline |
true
if the resource has the given TYPE node
|
inline |
true
if resources a LIEF::PE::ResourceVersion
std::vector< std::string > LIEF::PE::ResourcesManager::html | ( | ) | const |
Return the list of the html resources.
it_const_icons LIEF::PE::ResourcesManager::icons | ( | ) | const |
Return the list of the icons present in the resources.
std::string LIEF::PE::ResourcesManager::manifest | ( | ) | const |
Return the manifest as a std::string or an empty string if not found or corrupted.
void LIEF::PE::ResourcesManager::manifest | ( | const std::string & | manifest | ) |
Change or set the manifest. If the manifest node path does not exist, all required nodes are created.
|
inline |
|
default |
std::string LIEF::PE::ResourcesManager::print | ( | uint32_t | depth = 0 | ) | const |
Print the resource tree to the given depth.
strings_table_t LIEF::PE::ResourcesManager::string_table | ( | ) | const |
Return the list of the strings embedded in the string table (RT_STRING
)
std::vector< ResourceVersion > LIEF::PE::ResourcesManager::version | ( | ) | const |
Return a list of verison info (VS_VERSIONINFO
).