Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Greetings,

I need to know about some COM specifications and terminologies. I read a good article here about COM, Introduction to COM - What It Is and How to Use It, however, there are few things I still do not understand and I hope that someone could help me in that. Firstly the article states that
Quote:
multiple inheritance is not allowed with interfaces
On the other hand, the article mentioned a method on the IUnknown interface called
Quote:
QueryInterface()
which can be used to request a pointer from a COM object if the object's class implements more than one interface. So I am confused is inheriting from multiple interfaces (i.e., class : interface1, interface2, etc...) is allowed/not allowed?!!!. Also do we pass a pointer of interface type to the CoCreateInstance() method along with the class name as a form of polymorphism as there may be multiple classes each implement the same interface in its on way?. Those are the first two questions

What I have tried:

Read an article about COM on the forum to understand what are COM objects
Posted
Updated 9-Sep-17 21:52pm
v2

1 solution

COM interface is not C++ interface (COM 'class' is not C++ 'class' as stated in the article). Have a look at COM Objects and Interfaces (COM)[^]. A COM class may expose multiple interfaces, but no interface multiple inheritance is implied in that.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900