c2i forums
vtable crash - Printable Version

+- c2i forums (http://c2i.pl)
+-- Forum: Public (http://c2i.pl/forum-1.html)
+--- Forum: General (http://c2i.pl/forum-5.html)
+--- Thread: vtable crash (/thread-3256.html)



vtable crash - luludream25 - 08-10-2018

vtable crash


RE: vtable crash - delphine.chaix - 08-10-2018

Look here. Quote: DWORD_PTR* vTable = (DWORD_PTR*)(pTest); DWORD_PTR* src = (DWORD_PTR*)&vTable[0]; DWORD_PTR* addr = (DWORD_PTR*)&hkFunc; pFunk = (oFunk)VTHook(src, addr); Why you calling something random ? before you call that 2 times: Quote: pTest->test1(5, 6); DWORD_PTR* vTable = (DWORD_PTR*)(pTest); DWORD_PTR* src = (DWORD_PTR*)&vTable[0]; DWORD_PTR* addr = (DWORD_PTR*)&hkFunc; pFunk = (oFunk)VTHook(src, addr); pTest->test1(5, 6); In 1º Call don't crash, but after you call class in Virtual Table in 2º, that crashes cuz you calling something that i don't understood until now. Remove that, and i think that will works, our just re-create the code, comment some thing's, you know.


RE: vtable crash - nayanalien - 08-10-2018

your hkfunc is not a class function for starters.


RE: vtable crash - johnanon508 - 08-10-2018

rep to all, problem solved, thanks