Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › C++/C Programming › Accessing another process's pointers from a trainer

Accessing another process's pointers from a trainer

Posts 1–3 of 3 · Page 1 of 1
Jabberwock
Jabberwock
Accessing another process's pointers from a trainer
Hi guys it's me again.
I know how to access pointers from a DLL. But from a trainer this is a first to me. In DLL I use the "GetModuleHandle" function to get the client offset, so I'm trying to do the same here, just differently with the use of the "GetModuleHandleEx" function. But I get an error "Couldn't find module", therefore I need your help.

Code:
void mainP()
{
	HWND hWnd = FindWindow(NULL, "Alliance of Valiant Arms");

	if (!hWnd)
	{
		MessageBox(NULL, "Couldn't find AVA window.", "Error", MB_OK | MB_ICONERROR);
		return;
	}

	unsigned long pId;
	GetWindowThreadProcessId(hWnd, &pId);
	HANDLE hProc = OpenProcess(PROCESS_VM_WRITE | PROCESS_VM_OPERATION, false, pId);

	if (!hProc)
	{
		MessageBox(NULL, "Couldn't open the process.", "Error", MB_OK | MB_ICONERROR);
		return;
	}

	HMODULE module;

	if (GetModuleHandleEx(0, "AVA.exe", &module) == NULL)
		ShowErr();

	unsigned long dwPointer;
	ReadProcessMemory( hProc, (PVOID)0x01BFC478, &dwPointer, 4, 0 );

	MessageBox(NULL, "point " + (unsigned long)dwPointer, "Error", MB_OK | MB_ICONERROR);

	CloseHandle(hProc);
}
#1 · edited 14y ago · 14y ago
radnomguywfq3
radnomguywfq3
The executable image usually has its sections loaded at the base address of 0x400000 99% of the time; i.e you don't need to find the base address, you can just assume that it is 0x400000.

Technically, you need to read ImageBase which will tell you the base address of the image, but by default (and there is no reason to do otherwise) it will aways be 0x400000. DLLs usually take advantage of this to avoid being relocated (which can significantly increase load time.)

The reason GetModuleHandleEx doesn't work is because you aren't in the targets address-space; this API only works on the current address-space (your application.)


You can also use EnumProcessModules as a substitute for GetModuleHandle, which will return a list of handles to all the modules loaded in the target's address space, then you can use GetModuleBaseName to filter the modules by name.
#2 · edited 14y ago · 14y ago
'Bruno
'Bruno
I guess Jeta explained it well, and since you thanked him I will mark as solved.
#3 · 14y ago
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

  • [Tutorial(C++)]How to call functions within another processBy radnomguywfq3 in Programming Tutorials
    4Last post 18y ago
  • How to use pointer from CheatEngine in C#By pakistanihaider in Call of Duty Modern Warfare 3 Coding, Programming & Source Code
    24Last post 14y ago
  • [Help] Dealing with pointers from a dllBy ctpsolo in C++/C Programming
    11Last post 16y ago
  • If i make uce from guide in topic- he can make trainer?By V1olATor in WarRock - International Hacks
    6Last post 19y ago

Tags for this Thread

None