Click here to Skip to main content
15,892,768 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I read article(s) about COM, and one of those article(s) was here within CodeProject. I need to emphasize on certain points which are not mentioned in each of those article(s) even the one posted here and they causing me big confusion in understanding COM.

1- I know that an interface is simply an abstract type (i.e., includes no implementation to its members just declaration) is the same concept applicable to COM interface(s)?.

2- When I create a COM object I need those two parameters among others: the CLSID and the IID. I knew in advance that you cannot create an object of an abstract type, interface or class, for that reason I need the CLSID which is the GUID for the class that contains the concrete implementation for the member(s) within a given interface which is specified through the IID?

3- What does it mean using the QueryInterface() to get any additional interface pointer? Does that mean if the COM class from which I am instantiating an object, the COM object, is implementing more than one interface and I need those implementation too? if true, that mean if I am having a class C implementing and interface IA and another IB if I create my COM object using only the IID for the interface IA that I will be able to call only methods declared within the interface IA and will not be able to call the methods declared within the interface IB, however, the class itself has the implementation for both interfaces' methods?

4- What does it mean that every other COM interface must be derived from IUnknown? Is that mean if I am going to define a COM interface I need to make it inherit from the IUnknown interface?

5- What are COM identity, lifetime, and binary layout rules?

What I have tried:

I read articles for the Component Object Model, IUnknown, a brief about Application binary interface, Proprietary format, COM Interop.
Posted
Updated 3-Dec-16 21:32pm
v2

1 solution

 
Share this answer
 
Comments
[no name] 4-Dec-16 5:08am    
Thanks for your time and consideration. I saw it before asking my question and all the above questions having no answers within it :).
Richard MacCutchan 4-Dec-16 7:51am    
Unfortunately your questions are a bit beyond the scope of Quick Answers. Studying documentation and tutorials will find you good explanations and examples.
[no name] 5-Dec-16 11:45am    
I need any one who know about COM well to give me a concise answers and if possible pass me a link for useful documentation that I can find more detail about my questions
Richard MacCutchan 5-Dec-16 12:18pm    
I gave you a link; go and study the article, you will learn much more than waiting for an answer here.
[no name] 6-Dec-16 10:29am    
Thanks for your time, consideration, and help. I swear a God I read it before posting my questions. Anyway I will keep searching and I hope I can find answers and when happened I will post the answers to benefit others.

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