Home > Software engineering >  For stand-alone game do HOOK is coming
For stand-alone game do HOOK is coming

Time:11-22

WIN32,
Software start set a timer,
In the timer, put all the functions,
Global
Bool hook=True.

Window procedure,
Case: wm - create:
The settimer.
Retuen 0.

Case: wm - timer:
{
Yxhwnd=findwindow.
If (yxhwnd)
{
If (hook)
{
Setwindowshook.//create a HOOK
Hook=false.
}
If (youxijinru)//the game into the game
{
All functions,
}

}
The else
{
Hook=false.
Unhook//remove the hooks,
}
Retuen 0.
}

DLL,
Only under the game keyboard hook,
Only intercept F1 to F12,

Open software, F1 to F12, can use the
Wait for game to play for a while, F1 to F12, press did not reflect,

I to set the HOOK, and remove the hooks, where the breakpoints,
Startup Settings under the HOOK off there, HOOK success,
Game press F1 to F12 worked,
Play for a while,
According to the game again in F1 to F12,
UnHook it doesn't break down,
HOOK without end,
But why no matter use,
For a great god,

CodePudding user response:

Create hooks and delete HOOK is a function of DLLL export inside

CodePudding user response:

Feel not rigorous logic,
Don't Hook repeatedly in the timer and UnHook operation
Hook the success you need to determine

CodePudding user response:

Bad mobile web references reply,
I also want to know, for the game, where should be set up,
Think along while, in addition to the timer did not think of other,
I also set judgment in the timer, and not repeat set the HOOK

CodePudding user response:

If it is global hooks if you also deal with hooks if you have failed to do the judgment? Such as message is waiting for you to hook closure is failed

CodePudding user response:

I see, thank you

CodePudding user response:

In learning how to learn!!!!!!!!!!!!!!!!
  • Related