memex
Loading...
Searching...
No Matches
Module Class Reference

Represents a module in a process. More...

#include <Module.hpp>

Public Member Functions

RemotePtr< void > base () const
 Getter for the base address of the module.
 
std::size_t size () const
 Getter for the size of the module.
 
typed::tstring_view name () const
 Getter for the process' name.
 

Static Public Member Functions

static std::expected< Module, memex::ErrorCreate (const ProcessHandle &process, typed::tstring_view moduleName)
 Creates a Module instance.
 

Detailed Description

Represents a module in a process.

Note
Create an instance using the static Create method.

Member Function Documentation

◆ base()

RemotePtr< void > Module::base ( ) const
nodiscard

Getter for the base address of the module.

Returns
RemotePtr<void> The base address of the module.
Here is the caller graph for this function:

◆ Create()

std::expected< Module, memex::Error > Module::Create ( const ProcessHandle & process,
typed::tstring_view moduleName )
static

Creates a Module instance.

Parameters
processa reference to the ProcessHandle object.
moduleNamethe name of the module to be created.
Returns
std::expected<Module, memex::Error> a Module object on success, or an error on failure.
Note
The module name should be the base name (e.g., "kernel32.dll" instead of "C:\Windows\System32\kernel32.dll").
Here is the call graph for this function:
Here is the caller graph for this function:

◆ name()

typed::tstring_view Module::name ( ) const
nodiscard

Getter for the process' name.

Returns
typed::tstring_view The name of the module.

◆ size()

std::size_t Module::size ( ) const
nodiscard

Getter for the size of the module.

Returns
std::size_t The size of the module in bytes.

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