Intefaces and VMTs
Hi!
So I've been looking into some source code and I think I know how VMTs work and how to hook them but can you guys clear up this misconception of mine?
I can't post links so can you please refer to GameFood CSGO source where all these files are located.
So we have this file Hooks.h where all the functions that he hooks are gathered.
Then there is the interface file Interfaces.h where all the interfaces are gathered.
And last there is the SetupHooks functions in Utils.cpp line 126 where he hooks all the functions. As far as I can see he sets up VMTs to diffrent interfaces and than sets the original functions whilist hooking his own functions at the index of the virtual table(the last number in the line I think).
I think I have a big misconeption about interfaces what they exactly are. The definition is that they are class with only pure virtual methods but I think here they are used as a kind of VMT. And what exactly are factories? Please correct me if I'm wrong about anything.
So I've been looking into some source code and I think I know how VMTs work and how to hook them but can you guys clear up this misconception of mine?
I can't post links so can you please refer to GameFood CSGO source where all these files are located.
So we have this file Hooks.h where all the functions that he hooks are gathered.
Then there is the interface file Interfaces.h where all the interfaces are gathered.
And last there is the SetupHooks functions in Utils.cpp line 126 where he hooks all the functions. As far as I can see he sets up VMTs to diffrent interfaces and than sets the original functions whilist hooking his own functions at the index of the virtual table(the last number in the line I think).
I think I have a big misconeption about interfaces what they exactly are. The definition is that they are class with only pure virtual methods but I think here they are used as a kind of VMT. And what exactly are factories? Please correct me if I'm wrong about anything.