-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GetTrampoline() Returns 0 If Hooking WINAPI #9
Comments
I also have that issue, any solution yet ? |
I have just tried to do the same. In my case the trampoline could not be created because the offset between the trampoline's code buffer address and a memory address used in one of the leading instructions inside MessageBoxA (those that we copy to the trampoline) was more than could be stored in 32 bits, i.e. size of the memory operand in that instruction (this is the branch where I think that it's most likely what happened in your case too. This one of the limitations of the trampoline approach implemented in subhook. |
…nge of target code on 64-bit Windows Plus minor formatting fixes and more documentation for flags. Fixes #9
Now there is a new flag This approach may be pretty slow though (hence experimental), as there is a chance it will make a million calls to VirtualAlloc inside a loop. |
It works well with normal functions but when hooking something from WIN32 API it return 0 .
Lets say we hooked MessageBox the only to call the original function would be using a ScopedRemove or a Remove.
The text was updated successfully, but these errors were encountered: