Click here to Skip to main content
15,906,455 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralAddIns icon don't visble Pin
El'Cachubrey22-Sep-04 4:10
El'Cachubrey22-Sep-04 4:10 
GeneralSTL bug? weird ostream&() << "behavior"; Pin
froyd21-Sep-04 4:36
froyd21-Sep-04 4:36 
GeneralRe: STL bug? weird ostream&() << "behavior"; Pin
Michael Dunn22-Sep-04 11:53
sitebuilderMichael Dunn22-Sep-04 11:53 
GeneralCOM and Multiple inheritance Pin
User 21559720-Sep-04 23:22
User 21559720-Sep-04 23:22 
GeneralRe: COM and Multiple inheritance Pin
Jörgen Sigvardsson21-Sep-04 12:46
Jörgen Sigvardsson21-Sep-04 12:46 
GeneralRe: COM and Multiple inheritance Pin
User 21559722-Sep-04 1:34
User 21559722-Sep-04 1:34 
GeneralRe: COM and Multiple inheritance Pin
ThatsAlok29-Oct-04 21:18
ThatsAlok29-Oct-04 21:18 
GeneralRe: COM and Multiple inheritance Pin
Nathan Holt at EMOM29-Sep-04 5:32
Nathan Holt at EMOM29-Sep-04 5:32 
sohailkadiwala wrote:
Hi all,
Someone please explain me why COM doesnot support Multiple Inheritance incase of Interfaces
I mean why I shouldn't have
IDerived:IBase1,IBase2

I did read about it in Don Box book, but I would appreciate if someone explains it in detail (A link to some online resource would work fine too )


Com interfaces are required to have a certain binary structure. Specificly, an interface referes to a table (simple array) of function pointers. The first three members of this table are always QueryInterface, AddRef, and Release. Additional interface functions come right after these. Therefore, both IBase1 and IBase2 would have members in the fourth slot (unless one is IUnknown). Multiple inheritence of interfaces would require the fourth slot to contain both the IBase1 member and the *Base2 member, which is not possible.

When you use C++ multiple inheritance with classes that have virtual functions, it creates multiple tables of function pointers. This makes it easy to create an object with multiple interfaces, but isn't useful for creating interfaces with multiple base classes.

It seems to me that what I've explained so far would all be in your book, so please feel free to ask for clarification.

Nathan Holt
GeneralRe: COM and Multiple inheritance Pin
User 21559730-Sep-04 0:35
User 21559730-Sep-04 0:35 
GeneralRe: COM and Multiple inheritance Pin
Nathan Holt at EMOM30-Sep-04 4:49
Nathan Holt at EMOM30-Sep-04 4:49 
GeneralRe: COM and Multiple inheritance Pin
User 2155971-Oct-04 4:00
User 2155971-Oct-04 4:00 
GeneralBSTR to const char[] Pin
AssemblySoft20-Sep-04 7:10
AssemblySoft20-Sep-04 7:10 
GeneralRe: BSTR to const char[] Pin
Anonymous20-Sep-04 9:19
Anonymous20-Sep-04 9:19 
GeneralRe: BSTR to const char[] Pin
SandeepN20-Sep-04 10:21
SandeepN20-Sep-04 10:21 
GeneralRe: BSTR to const char[] Pin
AssemblySoft20-Sep-04 12:56
AssemblySoft20-Sep-04 12:56 
GeneralRe: BSTR to const char[] Pin
AssemblySoft20-Sep-04 12:56
AssemblySoft20-Sep-04 12:56 
GeneralRe: BSTR to const char[] Pin
Michael Dunn20-Sep-04 10:56
sitebuilderMichael Dunn20-Sep-04 10:56 
GeneralRe: BSTR to const char[] Pin
AssemblySoft20-Sep-04 12:57
AssemblySoft20-Sep-04 12:57 
GeneralATL activeX control Initialize Pin
AssemblySoft20-Sep-04 7:02
AssemblySoft20-Sep-04 7:02 
GeneralRe: ATL activeX control Initialize Pin
Michael Dunn20-Sep-04 13:27
sitebuilderMichael Dunn20-Sep-04 13:27 
GeneralRichEdit Pin
_johan18-Sep-04 11:05
_johan18-Sep-04 11:05 
GeneralRe: RichEdit Pin
Michael Dunn18-Sep-04 13:01
sitebuilderMichael Dunn18-Sep-04 13:01 
GeneralRe: RichEdit Pin
_johan19-Sep-04 17:47
_johan19-Sep-04 17:47 
Generalwhy ATL based ACTIVEX control got flicker when Redraw Pin
max_xiayi17-Sep-04 12:54
max_xiayi17-Sep-04 12:54 
GeneralRe: why ATL based ACTIVEX control got flicker when Redraw Pin
Todd Smith17-Sep-04 14:12
Todd Smith17-Sep-04 14:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.