VMT Interface

04/20/2016 19:27 Cyrex'#1
Hey a little interface I've written for my S4 League hack.
It's copying the virtual table of the given class instance and resetting
the instance's vtable pointer to point to our copy. In the copy we will
place our hooks. It also includes a function to easily call a virtual of a class.

Maybe it's useful.

VMT.h

VMT.cpp

usage of CallVirtual:
Code:
using tEndScene = HRESULT( __stdcall* )( IDirect3DDevice9* );
auto retValue = VMT::CallVirtual<tEndScene>( pDevice, 42 )( pDevice );
TODO:
- add normal vtable function replace (without copying the whole table)
04/21/2016 12:59 sososoma#2
pretty usefull
Thank you
04/21/2016 13:02 RingleRangleRob#3
Thanks for this ..really usefull
Right place to use a map bra ;)
04/21/2016 15:10 bidjus#4
Thanks, sounds good
04/25/2016 18:13 -TsuNaMi.*#5
can you show how us, ordinary useless people can use it?
04/25/2016 22:00 Cyrex'#6
Quote:
Originally Posted by alessian View Post
can you show how us, ordinary useless people can use it?
you probably cant, lol.