-
Notifications
You must be signed in to change notification settings - Fork 639
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
Void hook skips original function causing crash #401
Comments
If you want to call the original, call the function before you return. EasyHook detects you are already in your hook and will just skip the hook |
When I try that, it calls the function. But at the end of the original function, it returns to the hook causing the same thing to happen as before. Here's what I'm doing (ignore janky way of getting the original function)
|
Are you 100% sure that the calling convention and method signature are correct? |
I am a beginner with this library and I'm trying to hook onto a void while following the c# remote file monitor tutorial. And the hook works with it queueing all the messages but then crashing the program immediately after. When I used a debugger to figure out what went wrong.
I learned the hook returns to the place the original function was called instead of the function itself, this causes the next return to go to FFFFFFFF and the crashes the program.
The hook delegate I used is below. I'm fairly confident about the calling convention and the parameters. But I'm not sure if I am returning it correctly to make it not skip the original function.
Thanks in advance for any help you can give!
The text was updated successfully, but these errors were encountered: