DLL Injection

Posts 1–15 of 18 · Page 1 of 2
DLL Injection
Okay so I'm not new to hacking or anything but as of now I just want to inject a dll that will allow me to minimize LoL without having to open task manager and shit. That way I can use CE and things like that. Now I know all stuff is server sided but I want to give some things a try anyway, but what happens is every time I inject my DLL the game crashes. Now I know for a fact it's not the injected because I have been using it for years and it's always worked. Here is my code:
Code:
#include <windows.h>

#define game "League of Legends (TM) Client"
#define game2 "PVP.net Client"
HWND hWnd;
HANDLE HndThread;

int Thread()
{
	hWnd = FindWindow(NULL,game2);
	while(1)
	{
		if(GetAsyncKeyState(VK_F12)&1)
		{
			ShowWindow(hWnd,SW_MINIMIZE);
		}
		if(GetAsyncKeyState(VK_F10)&1)
		{
			return 0;
		}
		Sleep(1);
	}
}

BOOL APIENTRY DllMain( HMODULE hModule,DWORD reason,LPVOID lpReserved)
{
	if(reason == DLL_PROCESS_ATTACH)
	{
		hWnd = FindWindow(NULL,game2);
		if(hWnd == NULL)
		{
			MessageBox(hWnd,"Could not find window.","Not Found",0);
			return 0;
		}
		else
		{
			MessageBox(hWnd,"Injected and Thread Created","Finished",0);
			HndThread = CreateThread(0,0,(LPTHREAD_START_ROUTINE)&Thread,0,0,0);
		}
	}
	return 0;
}
Very basic, all I want to do is have a thread that checks for f12 to minimize the game. I found that the CreateThread is causing the crash but I don't see anything wrong with it. Can anyone help me with whatever I am doing wrong?
~lilneo
Two options, Alt+Enter for Windowed mode, Alt+Tab to minimize game without task manager.
Quote Originally Posted by zschopf1 View Post
Two options, Alt+Enter for Windowed mode, Alt+Tab to minimize game without task manager.
Play the game douchebag, it's set to always on top.
Besides, I want to be able to inject a dll for other purposes. I want to get a base down first, and instant minimizing is my first step.
~lilneo
Chill hes trying to help you? And alt tab does work. You just need something else opened. Just open up notepad or something and u can minimize LoL with alt tab.
Quote Originally Posted by kevinsterm View Post
Chill hes trying to help you? And alt tab does work. You just need something else opened. Just open up notepad or something and u can minimize LoL with alt tab.
Sorry just stressed, been at this for like two hours. And that is still an annoyance because I want to be able to switch windows and stuff, which wont work unless it's minimized. Anyway, that's not the issue, CreateThread is the issue, it crashes every time I use it.

~lilneo
Ask in the correct forum of the language your using.
Quote Originally Posted by *****179 View Post
Ask in the correct forum of the language your using.
Sorry I assumed the section "League of Legends Hacks" might know something about hacking League of Legends. But alright, I'll go to the c++ section.
~lilneo
Well, you see when it comes to coding, you want to go coding forums like ***** said.. And really, flaming doesn't help you it just makes people think you're a troll or just an ass, which would make people less likely to help you. What I said was true, at least on my OSes, and you could also use alt+escape to minimize a game as well. Why would anyone post saying what to do if they hadn't played the game in the first place? I've never been a big fan of C++ so I couldn't help you past setting up mutli-dimensional arrays and some memory editing. Anyways take a chill pill and keep stress off the net, games are supposed to be stress releaser's not inducers.
Go into windowed mode....
alt tab....
Quote Originally Posted by zschopf1 View Post
Well, you see when it comes to coding, you want to go coding forums like ***** said.. And really, flaming doesn't help you it just makes people think you're a troll or just an ass, which would make people less likely to help you. What I said was true, at least on my OSes, and you could also use alt+escape to minimize a game as well. Why would anyone post saying what to do if they hadn't played the game in the first place? I've never been a big fan of C++ so I couldn't help you past setting up mutli-dimensional arrays and some memory editing. Anyways take a chill pill and keep stress off the net, games are supposed to be stress releaser's not inducers.
I apologize, anyway I've started a thread in c++ so dw about it.
Quote Originally Posted by lolaller View Post
Go into windowed mode....
alt tab....
I've said it quite a few times now, this isn't about minimizing but more about CreateThread but thanks for the input anyway.

~lilneo
Wow, you have got to one of the few people who actually calm down and admit to being somewhat wrong and apoligizing. Good job mate and good luck with fixing your problem.
Quote Originally Posted by devase View Post
Wow, you have got to one of the few people who actually calm down and admit to being somewhat wrong and apoligizing. Good job mate and good luck with fixing your problem.
I'm not a douchebag, I was just angry at the fact the simplest shit wasn't working. Anyway, was no excuse, thanks though.
~lilneo
i never called you a douchebag, wtf why do people get so defensive...
Quote Originally Posted by devase View Post
i never called you a douchebag, wtf why do people get so defensive...
because of your reputation
played too much rammas
Posts 1–15 of 18 · Page 1 of 2

Post a Reply

Tags for this Thread

None

Talk with us