Fundamentals of ATL COM Objects
The following illustration depicts the relationship among the various classes and interfaces used in defining an ATL COM object.
ATL implements IUnknown in two phases:
Other aspects of your ATL COM object are handled by other classes:
CComCoClass defines the object's default class factory and aggregation model.
ISupportErrorInfoImpl implements the ISupportErrorInfo interface that ensures error information can be propagated up the call chain correctly.
- Implementing CComObjectRootEx
Show example COM map entries for implementing CComObjectRootEx.
- Implementing CComObject, CComAggObject, and CComPolyObject
Discusses how the DECLARE_*_AGGREGATABLE macros affect the use of CComObject, CComAggObject, and CComPolyObject.
- Supporting IDispatch and IErrorInfo
Lists the ATL implementation classes to use for supporting the IDispatch and IErrorInfo interfaces.
- Supporting IDispEventImpl
Discusses the steps to implement a connection point for your class.
- Changing the Default Class Factory and Aggregation Model
Show what macros to use to change the default class factory and aggregation model.
- Creating an Aggregated Object
Lists the steps for creating an aggregated object.