static HRESULT WINAPI ITextDocument_fnGetSelection(ITextDocument* me, ITextSelection** ppSel) { IRichEditOleImpl *This = impl_from_ITextDocument(me); TRACE("(%p)\n", me); *ppSel = &This->txtSel->ITextSelection_iface; ITextSelection_AddRef(*ppSel); return S_OK; }
static HRESULT WINAPI ITextSelection_fnQueryInterface( ITextSelection *me, REFIID riid, void **ppvObj) { *ppvObj = NULL; if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDispatch) || IsEqualGUID(riid, &IID_ITextRange) || IsEqualGUID(riid, &IID_ITextSelection)) { *ppvObj = me; ITextSelection_AddRef(me); return S_OK; } return E_NOINTERFACE; }