Closed mathiasxx94 closed 1 year ago
If you inject a debug build, it will inject and the GUI will open, however when loading a map in game, you will end up crashing.
If you're trying to unhook and inject again use mmap injection.
Thanks works great.
BTW. Do you know how the injected code starts running? There's no DllMain so I can't understand why the functions are hooked.
If you're trying to unhook and inject again use mmap injection.
Thanks works great.
BTW. Do you know how the injected code starts running? There's no DllMain so I can't understand why the functions are hooked.
Osiris.cpp is DllMain.cpp
If you're trying to unhook and inject again use mmap injection.
Thanks works great. BTW. Do you know how the injected code starts running? There's no DllMain so I can't understand why the functions are hooked.
Osiris.cpp is DllMain.cpp
I'm probably stupid, but why is that? There's only creation of class objects in Osiris.cpp isn't it?
@mathiasxx94 Global objects are created by C-RunTime library in compiler-generated dllmain_crt_dispatch
function.
I'm a beginner so sorry if I'm doing something stupid or don't understand something.
The dll is still loaded after restoring the hooks, would be nice to be able to unhook and free library so you can reinject without restarting the game.
As far as I understand the dll is not creating a new thread so FreeLibrary (and not FreeLibraryAndExitThread) should be enough. I tried adding the following in the end of the restore function of the Hooks class:
The game crashes with a memory access violation when I press Unhook, but I don't know enough to proceed any further.
PS: I'm trying to inject a debug build btw, does anyone else have any problems with this?