分享一个经验,有时候 hook 函数中使用 msgbox 或 tooltip 来显示参数,可能会导致 hook 出现无法继续进行下去的情况,这时候只需用 fileappend 来代替msgbox 即可。
To share an experience, sometimes the use of msgbox or tooltip to display parameters in a hook() may cause the hook to fail to continue, so just use fileappend instead of msgbox.
MinHook - API Hooking Library
Re: MinHook - API Hooking Library
Last edited by tuzi on 30 Oct 2021, 11:32, edited 1 time in total.
-
- Posts: 147
- Joined: 05 Nov 2016, 22:42
Re: MinHook - API Hooking Library
this is so useful. But does it only possible to api or function? The hook doesn't seem to be installed on normal address
Re: MinHook - API Hooking Library
When I try to hook GetTickCount, the process always crashes.
Code: Select all
SetWorkingDir %A_ScriptDir%
#NoEnv
#Include <MinHook>
MsgBox, Hello World
hook1 := New MinHook("kernel32.dll", "GetTickCount", "GetTickCount_Hook")
hook1.Enable()
MsgBox, This message will not be displayed because the process has crashed.
aaa:=A_TickCount
GetTickCount_Hook() {
global hook1
return DllCall(hook1.original)
}