摘要: CComPtr CComPtr派生自模板类CComPtrBase<T>,T代表某个COM接口。CComPtrBase<T>类只有一个成员变量T* p。下面是它们的代码分析:构造函数protected: CComPtrBase() throw() { p = NULL; } CComPtrBase(_In_ int nNull) throw() { ATLASSERT(nNull == 0); (void)nNull; p = NULL; } CComPtrBase(_In_opt_ T* lp) throw() { p = lp; if (p != NULL) p-&g 阅读全文
posted @ 2009-11-04 20:51 反正我信了 阅读(993) 评论(0) 推荐(0)