![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ATL
dahaiI0
-
展开
-
ATL中CComobject相关类
1、CComObject :为独立激活的COM组件提供服务,功能包涵: (1)锁服务器。 (2)正常的引用计数。 (3)正常的QueryInterface。2、CComAggObject :为被聚合激活的COM组件提供服务,功能包涵: (1)锁服务器。 (2)包容接口实际类。 (3)正常的引用计数。 (4)将调用转发给内转载 2013-12-07 15:26:13 · 935 阅读 · 0 评论 -
浅析ATL中类厂的创建及其IUnkown接口的获取
先贴2个很重要的数据结构:对象映射表和接口映射表struct _ATL_OBJMAP_ENTRY { const CLSID* pclsid; HRESULT (WINAPI *pfnUpdateRegistry)(BOOL bRegister); _ATL_CREATORFUNC* pfnGetClassObject; //创建类厂的函数指针原创 2013-12-07 16:29:52 · 2276 阅读 · 0 评论 -
__declspec(novtable)以及虚函数调用
MSDN上描述如下This is a __declspec extended attribute. This form of __declspec can be applied to any class declaration, but should only be applied to pure interface classes, that is, classes that wil原创 2013-11-21 16:47:16 · 988 阅读 · 0 评论 -
深入解析ATL第四章笔记
class ATL_NO_VTABLE CFun : public CComObjectRootEx,public CComCoClass,public IFun1:CComObjectRootBase提供了实现IUnknow的辅助函数,CComObjectRootEx从CComObjectRooBase派生并提供线程安全相关功能,IFun是自定义接口,CComCoClass定原创 2013-12-14 11:57:59 · 1349 阅读 · 0 评论 -
深入解析ATL第六章笔记
1:多重继承之传递夹层由于C++的语法不能在派生类中区分来自不同基类,但原型一致的方法,所以类似的代码是不合法的class CAcePowerll:public ICowBoy, public IArtist{ STDMETHODIMP ICowBoy::Draw(); STDMETHODIMP IAartist::Draw();};若要在com类中实现来自不同接口原创 2013-12-24 23:28:51 · 987 阅读 · 0 评论