CComPtr<IDispatch> pDisp; HRESULT hr = editor.QueryInterface(IID_IDispatch,&pDisp); ATLASSERT(SUCCEEDED(hr));