The Component Object Model (COM)
A significant part of the Windows API is based on the Component Object Model.
Full COM is a mechanism provided by Windows that facilitates the re-use of objects, or components, independent of the programming language used implemented the component and the programming language used to implement the client app consuming its services. Independent of whether the component runs as a part of the client app, or in another process on the machine running client app, or even on another computer.
Knowing COM is essential for working with modern Windows technologies like Direct3D 11, Direct3D 12, Direct2D, DirectWrite, Windows Imaging Component, Microsoft DirectX Graphics Infrastructure, DirectComposition and Microsoft Media Foundation.
COM Interface Basics
COM is many things, but at its core, it’s all about consuming and exposing functionality using
C++ virtual function tables derived from the IUnknown
struct. more…
Core interface wrappers and smart pointers
The Unknown
class wraps the IUnknown
interface, and it’s the base class for all
the COM interface wrapper classes implemented by the Harlinn.Common.Core and Harlinn.Windows
libraries. The Unknown
class is also the base class for the generic ComPtr
smart pointer
template class. more…