get the real address(or index in vTable) of virtual member function
In c++ is there any way to get the real address of member function, or the index in vTable ? Updated: I don't know the INDEX in vTable and I don't know the address Here's why I want to know this: I want to hook the function ID3DXFont->DrawText of DirectX. If I know the index of the DrawText in the vTable, I can replace it to do the hook. But how to get the index? If it's able to get the the real address, I can search it in the vTable to get the index. And not particularly ID3DXFont->DrawText , maybe some other functions in the future, so I'm trying to write a generic hook function. Here's what