正在加载图片...
用嵌套类实现COM接口(续三) HRESULT CDIctionary: QueryInterface( const lID& iid, void **ppvobj) if(iid=lID IUnknown iid=IID Dictionary)i Fppvobj=&m dictionary AddRef( return s oK 3 else if (iid=IID SpellCheck) "ppvObj=&m spellCheckobj AddRefo return S OK "ppV= NULL return E INTerface用嵌套类实现COM接口(续三) HRESULT CDictionary::QueryInterface(const IID& iid, void **ppvObj) { if (iid == IID_IUnknown || iid == IID_Dictionary) { *ppvObj = &m_dictionaryObj; AddRef(); return S_OK; } else if (iid == IID_SpellCheck) { *ppvObj = &m_spellCheckObj; AddRef(); return S_OK; } *ppv = NULL; return E_NOINTERFACE ; }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有