Two options, Alt+Enter for Windowed mode, Alt+Tab to minimize game without task manager.
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:
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?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; }
~lilneo
Last edited by lilneo; 04-06-2011 at 09:15 PM.
Two options, Alt+Enter for Windowed mode, Alt+Tab to minimize game without task manager.
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.
"Just put your D*ck in their mouth and F*ck what they say"
We killed Osama, thats how America outdid the royal wedding.
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.
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....
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 never called you a douchebag, wtf why do people get so defensive...
played too much rammas