Tekkaman

导航

 

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:

  • CComObjectCComAggObject, or CComPolyObject implements the IUnknown methods.
  • CComObjectRoot or CComObjectRootEx manages the reference count and outer pointers of IUnknown.

Other aspects of your ATL COM object are handled by other classes:

  • CComCoClass defines the object's default class factory and aggregation model.
  • IDispatchImpl provides a default implementation of the IDispatch portion of any dual interfaces on the object.
  • ISupportErrorInfoImpl implements the ISupportErrorInfo interface that ensures error information can be propagated up the call chain correctly.
posted on 2012-07-11 16:26  Tekkaman  阅读(205)  评论(0编辑  收藏  举报