Memory service component.
More...
#include <memory_service.hpp>
|
void | AttachGame (std::string path) |
| Attach to a game.
|
|
const std::uintptr_t | GetModuleAddress (const std::string_view moduleName) const noexcept |
| Get the module address.
|
|
void | DeattachGame () |
| Deattach from a game.
|
|
bool | IsGameRunning () const noexcept |
| Check if the game is running.
|
|
uintptr_t | ReadPointer (const std::uintptr_t &address) |
| Read a pointer.
|
|
void | WritePointer (const std::uintptr_t &address, const uintptr_t &value) |
| Write a pointer.
|
|
template<typename T > |
constexpr const T | Read (const std::uintptr_t &address) const noexcept |
| Read a value.
|
|
template<typename T > |
constexpr void | Write (const std::uintptr_t &address, const T &value) const noexcept |
| Write a value.
|
|
virtual void | Init () |
| Will be executed when the component is initialized.
|
|
virtual void | Update () |
| If Update loop enabled, this function will be executed every frame.
|
|
virtual void | UpdateCurrentTarget (TargetProfile *target) |
| If Update loop enabled, this function will be executed every frame for each target.
|
|
virtual | ~CComponent ()=default |
|
Memory service component.
This component is responsible for reading and writing to the memory of a process.
◆ AttachGame()
void CMemoryService::AttachGame |
( |
std::string |
path | ) |
|
Attach to a game.
- Parameters
-
path | Path to the game executable. |
◆ DeattachGame()
void CMemoryService::DeattachGame |
( |
| ) |
|
◆ GetModuleAddress()
const std::uintptr_t CMemoryService::GetModuleAddress |
( |
const std::string_view |
moduleName | ) |
const |
|
noexcept |
Get the module address.
- Parameters
-
moduleName | Name of the module. |
- Returns
- Address of the module.
◆ IsGameRunning()
bool CMemoryService::IsGameRunning |
( |
| ) |
const |
|
noexcept |
Check if the game is running.
- Returns
- True if the game is running, false otherwise.
◆ Read()
template<typename T >
constexpr const T CMemoryService::Read |
( |
const std::uintptr_t & |
address | ) |
const |
|
inlineconstexprnoexcept |
Read a value.
- Parameters
-
address | Address to read the value from. |
- Returns
- Value.
◆ ReadPointer()
uintptr_t CMemoryService::ReadPointer |
( |
const std::uintptr_t & |
address | ) |
|
Read a pointer.
- Parameters
-
address | Address to read the pointer from. |
- Returns
- Pointer value.
◆ Write()
template<typename T >
constexpr void CMemoryService::Write |
( |
const std::uintptr_t & |
address, |
|
|
const T & |
value |
|
) |
| const |
|
inlineconstexprnoexcept |
Write a value.
- Parameters
-
address | Address to write the value to. |
value | Value to write to the address. |
◆ WritePointer()
void CMemoryService::WritePointer |
( |
const std::uintptr_t & |
address, |
|
|
const uintptr_t & |
value |
|
) |
| |
Write a pointer.
- Parameters
-
address | Address to write the pointer to. |
value | Value to write to the pointer. |
The documentation for this class was generated from the following file:
- xenon/includes/xenon/components/services/memory_service.hpp