Lesson 15
Component Object Model basics Conclusion
- We began with an introduction to COM, COM terminology, and using COM to develop client-server applications.
- We then examined the binary requirements of COM methods and interfaces.
- Next, we used IDL to describe a COM interface.
- We studied how to implement a COM object in C++ using multiple inheritance.
- We studied
IUnknown
in some detail.
- Finally, we looked at how to define a COM object within a type library.
Before coding, we need to spend a bit more time studying COM fundamentals.
In the next module, we will complete our survey of core COM concepts. Once we've completed our overview of COM fundamentals, we will use ATL to begin building the class project. In module 5, we will develop a COM client. This will bring all the pieces together.
Microsoft Developers
Developers sometimes misconstrue the purpose of ATL and hope that it will save them from having to learn COM.
Once you learn the core concepts of COM, ATL will save you from a lot of typing while letting you retain control over the COM classes you write.
Under the hood, ATL is just another way to connect COM interfaces to their implementations.
It is possible to program by creating COM classes using the ATL COM Object Wizard and adding interface methods and attributes using the ClassView pane. But you will be limited when you encounter some of the challenges related to COM. For example, you'll need to understand the importance of separating implementations from their interfaces. If you avoid working through the issue of COM apartments, you will not be able to work effectively with the different threading models in COM.
Microsoft's binary object model (COM and DCOM), looking at the fundamental concepts behind the technology and examining how COM works in a distributed environment. Our focus is on how COM and DCOM work with Microsoft Windows. In legacy operating systems, such as Microsoft Windows 2000, some things change.
We will go over COM interfaces, COM classes, class objects, and apartments. We will cover COM from the C++ perspective because that is the only way to really understand how COM works.