Closed AlmightyLks closed 1 year ago
Access violation means there's either an invalid pointer somewhere or something wasn't initialised. Probably the latter here since in the crash it says it was trying to read from address 0x0.
Guessing since the method is named 'Startup', it creates things used later down the road.
Try calling the original method in your hook:
_hook.OriginalFunction();
Quick question then as well Seemingly a Hook replaces the ASM of the target function
Is there another type of injection that allows to create prefixes / postfixes like Harmony for example?
Edit: Actually, thinking about it. The "burden" of calling _hook.OriginalFunction()
seems trivial
Ignore me 😄
It's technically possible, but adds performance overhead since you'd basically now have to look up a function list and execute each one.
With the way native hooking libraries work (including this one), you can think of anything before the call to the original function as a prefix and everything after that as a postfix.
Try calling the original method in your hook: _hook.OriginalFunction();
Yup, that did it! Thanks 😄
Hooking into a function causes for my target game to crash. Registering the hook is fine, and the hooked method does run as you can see in the following screenshot, but right after it crashes the game. Do you happen to how to approach to fix this? I am new to native game modding, but highly interested 😄