Shouvik wrote: | | The answer is i'm not designing the base class. it'll be ported to me as .obj file. So its a constraint i cant change the class characteristics |
|
Well there's no completely safe solution to this problem. You could binary patch the obj file, or mock around with pointers such as in your original post, but neither would be very healthy for a production system IMHO.
An alternative (but equally horrifying) way to go about this, is to set up the call yourself:
class x { private: void meth1() { cout<<"Meth1"; } void meth2() { cout<<"meth 2"; } };
x obj; __asm { lea ecx, obj call x::meth1 }
|