Hi everybody :
as I known , COM is based on the VTABL which first three slots are
QueryInterface ,Addref and Release. when I using mingw32, all the c++ vtable
contains two extra slots at the begin of vtabl,so in binary mode ,code
compiled by M$ and mingw32 can't never be compatible . I believe the two
extra points point to rtti and exception handle . I used gcc flag -fno-rtti
-fno-exceptions , the two points still there but all zero .
The problem is : if I want to be compatible with M$ COM (binary & source
compatible),I have to
1.remove the two extra slots (sure no rtti and EH support);
2.rearrange vtable layout ,say ,move the two slots to the end of vtable
so that I don't need to care about them (derivated class should put em' to
the back-end of compositive vtable).
Could I do that and how ?
I am using mingw32, gcc version 2.95.3-6 (mingw special) under win 2k .
gcc flags :-mrtd -fvtable-thunks=2 -c -fno-exceptions -fno-rtti
BTW , there is another question : where did M$ put their rtti ??
thank you very much .