Thread: DLL Injection

Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    lilneo's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Canada
    Posts
    217
    Reputation
    8
    Thanks
    28

    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

  2. #2
    zschopf1's Avatar
    Join Date
    Apr 2007
    Gender
    male
    Location
    Middle of No Where
    Posts
    145
    Reputation
    11
    Thanks
    87
    Two options, Alt+Enter for Windowed mode, Alt+Tab to minimize game without task manager.

  3. #3
    lilneo's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Canada
    Posts
    217
    Reputation
    8
    Thanks
    28
    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

  4. #4
    kevinsterm's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Cali, USA :D
    Posts
    94
    Reputation
    10
    Thanks
    6
    My Mood
    Bored
    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.

  5. #5
    lilneo's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Canada
    Posts
    217
    Reputation
    8
    Thanks
    28
    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

  6. #6
    sythe179's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    The internet
    Posts
    660
    Reputation
    15
    Thanks
    1,458
    My Mood
    Paranoid
    Ask in the correct forum of the language your using.

  7. #7
    lilneo's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Canada
    Posts
    217
    Reputation
    8
    Thanks
    28
    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

  8. #8
    zschopf1's Avatar
    Join Date
    Apr 2007
    Gender
    male
    Location
    Middle of No Where
    Posts
    145
    Reputation
    11
    Thanks
    87
    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.

  9. #9
    lolaller's Avatar
    Join Date
    Nov 2008
    Gender
    male
    Location
    In the corner of a spherical neighborhood
    Posts
    133
    Reputation
    10
    Thanks
    4
    My Mood
    Mellow
    Go into windowed mode....
    alt tab....

  10. #10
    lilneo's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Canada
    Posts
    217
    Reputation
    8
    Thanks
    28
    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

  11. #11
    devase's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Queensland, Australia
    Posts
    484
    Reputation
    13
    Thanks
    19
    My Mood
    Confused
    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.

  12. #12
    lilneo's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Canada
    Posts
    217
    Reputation
    8
    Thanks
    28
    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

  13. #13
    devase's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Queensland, Australia
    Posts
    484
    Reputation
    13
    Thanks
    19
    My Mood
    Confused
    i never called you a douchebag, wtf why do people get so defensive...

  14. #14
    lolaller's Avatar
    Join Date
    Nov 2008
    Gender
    male
    Location
    In the corner of a spherical neighborhood
    Posts
    133
    Reputation
    10
    Thanks
    4
    My Mood
    Mellow
    played too much rammas

  15. #15
    doommach's Avatar
    Join Date
    Sep 2008
    Gender
    male
    Location
    WoW - Herpyourderp - Barthilas - oceanic
    Posts
    441
    Reputation
    12
    Thanks
    21
    My Mood
    Angelic
    Quote Originally Posted by devase View Post
    i never called you a douchebag, wtf why do people get so defensive...
    because of your reputation

Page 1 of 2 12 LastLast