The hook will succeed for about 4000 iterations, and the application will fail without reasons.Code:char __fastcall hooked_game_thunk(void* a1, void* a2) { try { __asm { pushad } DWORD mess = ((struct game_message*)a2)->Message_Base; stringstream oss; oss << mess << endl; logfile2->shared_print(0, oss.str()); __asm { popad } return original_game_thunk(a1, a2); } catch (std::exception e) { MessageBox(0, e.what(), e.what(), 0); return 0; } }
The catch block is not reached, how can I know what went wrong?
Thanks
Jack