Tekkaman

导航

 

2011年5月14日

摘要: 【眼花缭乱的CComObject】1、CComObject :为独立激活的COM组件提供服务,功能包涵: (1)锁服务器。 (2)正常的引用计数。 (3)正常的QueryInterface。2、CComAggObject :为被聚合激活的COM组件提供服务,功能包涵: (1)锁服务器。 (2)包容接口实际类。 (3)正常的引用计数。 (4)将调用转发给内部包容对象的QueryInterface。(除了IUnknown请求外)3、CComContainedObject :为被聚合海派的COM组件提供服务,功能包涵: (1)将调用转发给外部组件的引用计数。 (2)将调用转发给外部组件的QueryI 阅读全文
posted @ 2011-05-14 14:44 Tekkaman 阅读(3685) 评论(0) 推荐(2)
 
摘要: 【如何聚合一个组件】1、Add an IUnknown pointer to your class object and initialize it to NULL in the constructor.2、Override FinalConstruct to create the aggregate.3、Use the IUnknown pointer you defined as the parameter to the COM_INTERFACE_ENTRY_AGGREGATE macro.4、Override FinalRelease to release the IUnknown p 阅读全文
posted @ 2011-05-14 13:54 Tekkaman 阅读(858) 评论(0) 推荐(1)