As of now, most injectors (if not every injector) that offers "Manual map" injection method, while injecting the library will crash the target process.
The most obvious reason is the static keyword used in few places (for example Hooks::Present method, szWatermark variable, or all original hooked methods).
Looks like the "Manual map" injection method causes the static variables not to be initialized properly, and leads into crash.
Kind of a good solutions seems to be replacing them all with some kind of global variables container, that will be instantiated once cheat is injected, and before hooks are created, and released after hooks are restored.
As of now, most injectors (if not every injector) that offers "Manual map" injection method, while injecting the library will crash the target process.
The most obvious reason is the
static
keyword used in few places (for exampleHooks::Present
method,szWatermark
variable, or all original hooked methods).Looks like the "Manual map" injection method causes the
static
variables not to be initialized properly, and leads into crash.Kind of a good solutions seems to be replacing them all with some kind of global variables container, that will be instantiated once cheat is injected, and before hooks are created, and released after hooks are restored.