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 › Injecter crashing game?

Injecter crashing game?

Posts 1–3 of 3 · Page 1 of 1
WO
wootwoot1234
Injecter crashing game?
Im having problems with my injecter. I cant find out why its crashing the game

Code:
#include <iostream>
#include <Windows.h>

using namespace std;

bool InjectEngine(const wchar_t *PROC_NAME, const char *DLL_PATH)
{
	HANDLE PH, myThread;
	DWORD PID, AddressBase, ExitThreadCode;
	LPVOID RemoteMem;

	GetWindowThreadProcessId(FindWindow(NULL, (LPCWSTR)PROC_NAME), &PID); // Find Window Process ID
	if((PH = OpenProcess(PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION | PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION, false, PID)) != NULL) // Open Process
	{ 
		RemoteMem = VirtualAllocEx(PH, NULL, strlen(DLL_PATH) +1, MEM_COMMIT, PAGE_READWRITE); // Locate Memory for DLL

		if((WriteProcessMemory(PH, RemoteMem, DLL_PATH, strlen(DLL_PATH) +1, &AddressBase)) == true) // Write into process and checks if it worked or not
		{

			myThread = CreateRemoteThread(PH, NULL, 0, (LPTHREAD_START_ROUTINE)GetProcAddress(GetModuleHandleA("Kernal32.dll"), "LoadLibarayA"), RemoteMem, 0, 0);

			WaitForSingleObject(myThread, INFINITE);
			GetExitCodeThread(myThread, &ExitThreadCode);
			if(!ExitThreadCode)
				return false;
		}
		else
		{
			cout << "Could not write to file" << endl;
			return false;
		}
	}
	else
	{
		cout << "Could not find Window" << endl;
		return false;
	}
	cout << GetLastError() << endl;

	VirtualFreeEx(PH, RemoteMem, strlen(DLL_PATH) +1, MEM_RELEASE);
	CloseHandle(PH);
	CloseHandle(myThread);

	return true;
}

int main()
{	
	if(InjectEngine(L"Minesweeper", "TrainerInjectorDll.dll") == false)
		cout << "Error" << endl;
	else
		cout << "Injected" << endl;

	cin.get();
	return 0;
}
#1 · 16y ago
TO
Toxic Waltz
injector
#2 · 16y ago
Auxilium
Auxilium
Thanks for free, non-working code.
#3 · 16y ago
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

  • Pub Hack crashing game?By lolwutpear in CrossFire Hacks & Cheats
    29Last post 16y ago
  • Hack Crashing GameBy Scrcrw in CrossFire Hacks & Cheats
    11Last post 16y ago
  • Crashing GameBy lis-mati in Combat Arms Help
    7Last post 16y ago
  • All Hacks Crash GameBy Backspinningaxekick in Combat Arms Help
    23Last post 16y ago
  • iw4mp.exe Hack injecting crash.By jburton in Call of Duty Modern Warfare 2 Help
    8Last post 16y ago

Tags for this Thread

None