Xenon
A framework for cheat development.
 
Loading...
Searching...
No Matches
CMemoryService Class Reference

Memory service component. More...

#include <memory_service.hpp>

Inheritance diagram for CMemoryService:
Collaboration diagram for CMemoryService:

Public Member Functions

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.
 
- Public Member Functions inherited from CComponent
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
 

Additional Inherited Members

- Public Attributes inherited from CComponent
std::shared_ptr< Xenong_pXenon
 
std::shared_ptr< XenonVariablesg_pXenonVariables
 
std::shared_ptr< XenonConfigg_pXenonConfigs
 

Detailed Description

Memory service component.

This component is responsible for reading and writing to the memory of a process.

Member Function Documentation

◆ AttachGame()

void CMemoryService::AttachGame ( std::string  path)

Attach to a game.

Parameters
pathPath to the game executable.

◆ DeattachGame()

void CMemoryService::DeattachGame ( )

Deattach from a game.

◆ GetModuleAddress()

const std::uintptr_t CMemoryService::GetModuleAddress ( const std::string_view  moduleName) const
noexcept

Get the module address.

Parameters
moduleNameName 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
addressAddress to read the value from.
Returns
Value.

◆ ReadPointer()

uintptr_t CMemoryService::ReadPointer ( const std::uintptr_t &  address)

Read a pointer.

Parameters
addressAddress 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
addressAddress to write the value to.
valueValue to write to the address.

◆ WritePointer()

void CMemoryService::WritePointer ( const std::uintptr_t &  address,
const uintptr_t &  value 
)

Write a pointer.

Parameters
addressAddress to write the pointer to.
valueValue to write to the pointer.

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