ResourceLeafs represent the leafs of the resource tree: The actual resources.
More...
#include <ResourceDirectory.h>
ResourceLeafs represent the leafs of the resource tree: The actual resources.
◆ ResourceLeaf()
PeLib::ResourceLeaf::ResourceLeaf |
( |
| ) |
|
◆ ~ResourceLeaf()
PeLib::ResourceLeaf::~ResourceLeaf |
( |
| ) |
|
|
overridevirtual |
◆ getCodePage()
std::uint32_t PeLib::ResourceLeaf::getCodePage |
( |
| ) |
const |
Returns the CodePage value of this resource leaf.
Returns the leaf's CodePage value.
- Returns
- The leaf's CodePage value.
◆ getData()
std::vector< std::uint8_t > PeLib::ResourceLeaf::getData |
( |
| ) |
const |
Returns the resource data of this resource leaf.
Reads the next resource leaf from the InputBuffer. Returns the size of a resource lead.
Returns a vector that contains the raw data of a resource leaf.
- Returns
- Raw data of the resource.
◆ getOffsetToData()
std::uint32_t PeLib::ResourceLeaf::getOffsetToData |
( |
| ) |
const |
Returns the OffsetToData value of this resource leaf.
Returns the leaf's OffsetToData value. That's the RVA where the raw data of the resource can be found.
- Returns
- The leaf's OffsetToData value.
◆ getReserved()
std::uint32_t PeLib::ResourceLeaf::getReserved |
( |
| ) |
const |
Returns the Reserved value of this resource leaf.
Returns the leaf's Reserved value.
- Returns
- The leaf's Reserved value.
◆ getSize()
std::uint32_t PeLib::ResourceLeaf::getSize |
( |
| ) |
const |
Returns the Size value of this resource leaf.
Returns the leaf's Size value. That's the size of the raw data of the resource.
- Returns
- The leaf's Size value.
◆ isLeaf()
bool PeLib::ResourceLeaf::isLeaf |
( |
| ) |
const |
|
virtual |
◆ makeValid()
void PeLib::ResourceLeaf::makeValid |
( |
| ) |
|
|
virtual |
◆ read()
int PeLib::ResourceLeaf::read |
( |
ImageLoader & |
imageLoader, |
|
|
std::uint32_t |
uiRsrcRva, |
|
|
std::uint32_t |
uiOffset, |
|
|
std::uint32_t |
sizeOfImage, |
|
|
ResourceDirectory * |
resDir |
|
) |
| |
|
protectedvirtual |
Reads the next resource leaf from the input file.
- Parameters
-
imageLoader | An image loaded into the ImageLoader parser |
uiRsrcRva | RVA of the beginning of the resource directory. |
uiOffset | Offset of the resource leaf that's to be read. |
sizeOfImage | Size of the image. |
resDir | Resource directory. |
Implements PeLib::ResourceElement.
◆ rebuild()
void PeLib::ResourceLeaf::rebuild |
( |
OutputBuffer & |
obBuffer, |
|
|
unsigned int |
uiOffset, |
|
|
unsigned int |
uiRva, |
|
|
const std::string & |
|
|
) |
| const |
|
protectedvirtual |
Writes the next resource leaf into the OutputBuffer.
Rebuilds the current resource leaf.
- Parameters
-
obBuffer | OutputBuffer where the rebuilt resource leaf is stored. |
uiOffset | Offset of the resource leaf inside the resource directory. |
uiRva | RVA of the resource directory. |
Implements PeLib::ResourceElement.
◆ recalculate()
void PeLib::ResourceLeaf::recalculate |
( |
unsigned int & |
uiCurrentOffset, |
|
|
unsigned int |
uiNewRva |
|
) |
| |
|
overrideprotectedvirtual |
Recalculates the tree for different RVA.
Recalculates the current node for directory with new RVA.
- Parameters
-
uiCurrentOffset | The current offset of the node in the new directory. |
uiNewRva | The RVA of the new directory. |
Implements PeLib::ResourceElement.
◆ setCodePage()
void PeLib::ResourceLeaf::setCodePage |
( |
std::uint32_t |
dwValue | ) |
|
Sets the CodePage value of this resource leaf.
Sets the leaf's CodePage value.
- Parameters
-
dwValue | The leaf's new CodePage value. |
◆ setData()
void PeLib::ResourceLeaf::setData |
( |
const std::vector< std::uint8_t > & |
vData | ) |
|
Sets the resource data of this resource leaf.
Overwrites the raw data of a resource.
- Parameters
-
vData | New data of the resource. |
◆ setOffsetToData()
void PeLib::ResourceLeaf::setOffsetToData |
( |
std::uint32_t |
dwValue | ) |
|
Sets the OffsetToData value of this resource leaf.
Sets the leaf's OffsetToData value.
- Parameters
-
dwValue | The leaf's new OffsetToData value. |
◆ setReserved()
void PeLib::ResourceLeaf::setReserved |
( |
std::uint32_t |
dwValue | ) |
|
Sets the Reserved value of this resource leaf.
Sets the leaf's Reserved value.
- Parameters
-
dwValue | The leaf's new Reserved value. |
◆ setSize()
void PeLib::ResourceLeaf::setSize |
( |
std::uint32_t |
dwValue | ) |
|
Sets the Size value of this resource leaf.
Sets the leaf's Size value.
- Parameters
-
dwValue | The leaf's new Size value. |
◆ fixNumberOfEntries
◆ ResourceChild
◆ ResourceDirectory
◆ entry
PeLib equivalent of the Win32 structure IMAGE_RESOURCE_DATA_ENTRY.
◆ m_data
std::vector<std::uint8_t> PeLib::ResourceLeaf::m_data |
|
private |
The documentation for this class was generated from the following files: