Skip to content

Simple memory manager made in C++ (can be used for example in game hacking).

License

Notifications You must be signed in to change notification settings

offchuck/Simple-memory-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple-memory-manager

Simple memory manager made in C++/WinAPI (can be used for example in game hacking).

Functions:

  • CMemory(const std::string ProcessName) [constructor] - opens handle to process via ProcessId by name.
  • CMemory() [constructor] - use that if you dont want to open a handle instantly. You need to change m_strProcessName manually before calling another functions.

  • GetProcessId() - returns process's id as DWORD.
  • GetProcessHandle() - opens a handle to process.
  • GetProcessBaseAddr() - returns process's base addres as DWORD (base address of first module).

  • GetModuleInformation(const std::string ModuleName, ModuleInfo& mInfo) - returns information of module by name.
struct ModuleInfo
{
  DWORD dwModBaseAddr, dwModSize;
};

  • Read(DWORD dwAddress) - wrapper to WinAPI's ReadProcessMemory function.
  • Write(DWORD dwAddress, t val) - wrapper to WinAPI's WriteProcessMemory function.

Example usage:

CMemory memory("process.exe");
std::cout << " Process id: " << memory.GetProcessId() << std::endl;

ModuleInfo modExample;
memory.GetModuleInformation("example.dll", modClient);

Error codes:

Code Information
0 String m_strProcessName is null.
1 Cannot create Process/Module snapshot.
2 Cannot find Process by name.
3 Cannot find Module by name.

About

Simple memory manager made in C++ (can be used for example in game hacking).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages