the kiero::bind(..) function is defined as follow:
void kiero::bind(uint16_t _index, void _original, void _function)
{
// TODO: Need own detour function
ifdef KIERO_USE_MINHOOK
if (g_renderType > 0)
{
MH_CreateHook((void*)g_methodsTable[_index], _function, &_original);
MH_EnableHook((void*)g_methodsTable[_index]);
}
endif
}
but it just change the Formal parameters instead of actual parameters.
so the call like kiero::bind(42, oEndScene, hkEndScene) do not work and can casue process crash.
I change it as follow:
//void kiero::bind(uint16_t _index, void _original, void _function)
void kiero::bind(uint16_t _index, void* _original, void _function)
{
// TODO: Need own detour function
the kiero::bind(..) function is defined as follow: void kiero::bind(uint16_t _index, void _original, void _function) { // TODO: Need own detour function
ifdef KIERO_USE_MINHOOK
endif
} but it just change the Formal parameters instead of actual parameters. so the call like kiero::bind(42, oEndScene, hkEndScene) do not work and can casue process crash. I change it as follow: //void kiero::bind(uint16_t _index, void _original, void _function) void kiero::bind(uint16_t _index, void* _original, void _function) { // TODO: Need own detour function
ifdef KIERO_USE_MINHOOK
endif
} and the call kiero::bind(42, (void**)&g_oEndScene, hkEndScene) works well.