Signed-off-by: Jactry Zeng jzeng@codeweavers.com --- dlls/riched20/richole.c | 499 ++++++++++++++++++++++++++++++++++ dlls/riched20/tests/richole.c | 8 + 2 files changed, 507 insertions(+)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c index 5c7be5eaa9..c5d2d7c99a 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -46,6 +46,7 @@ DEFINE_GUID(IID_ITextServices, 0x8d33f740, 0xcf58, 0x11ce, 0xa8, 0x9d, 0x00, 0xa DEFINE_GUID(IID_ITextHost, 0x13e670f4,0x1a5a,0x11cf,0xab,0xeb,0x00,0xaa,0x00,0xb6,0x5e,0xa1); DEFINE_GUID(IID_ITextHost2, 0x13e670f5,0x1a5a,0x11cf,0xab,0xeb,0x00,0xaa,0x00,0xb6,0x5e,0xa1); DEFINE_GUID(IID_ITextDocument, 0x8cc497c0, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d); +DEFINE_GUID(IID_ITextDocument2Old, 0x01c25500, 0x4268, 0x11d1, 0x88, 0x3a, 0x3c, 0x8b, 0x00, 0xc1, 0x00, 0x00); DEFINE_GUID(IID_ITextRange, 0x8cc497c2, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d); DEFINE_GUID(IID_ITextSelection, 0x8cc497c1, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d); DEFINE_GUID(IID_ITextFont, 0x8cc497c3, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d); @@ -56,6 +57,7 @@ static ITypeLib *typelib; enum tid_t { NULL_tid, ITextDocument_tid, + ITextDocument2Old_tid, ITextRange_tid, ITextSelection_tid, ITextFont_tid, @@ -67,6 +69,7 @@ static const IID * const tid_ids[] = { &IID_NULL, &IID_ITextDocument, + &IID_ITextDocument2Old, &IID_ITextRange, &IID_ITextSelection, &IID_ITextFont, @@ -209,6 +212,7 @@ typedef struct IRichEditOleImpl { IUnknown IUnknown_inner; IRichEditOle IRichEditOle_iface; ITextDocument ITextDocument_iface; + ITextDocument2Old ITextDocument2Old_iface; IUnknown *outer_unk; LONG ref;
@@ -272,6 +276,11 @@ static inline IRichEditOleImpl *impl_from_ITextDocument(ITextDocument *iface) return CONTAINING_RECORD(iface, IRichEditOleImpl, ITextDocument_iface); }
+static inline IRichEditOleImpl *impl_from_ITextDocument2Old(ITextDocument2Old *iface) +{ + return CONTAINING_RECORD(iface, IRichEditOleImpl, ITextDocument2Old_iface); +} + static inline IRichEditOleImpl *impl_from_IUnknown(IUnknown *iface) { return CONTAINING_RECORD(iface, IRichEditOleImpl, IUnknown_inner); @@ -945,6 +954,8 @@ static HRESULT WINAPI IRichEditOleImpl_inner_fnQueryInterface(IUnknown *iface, R *ppvObj = &This->IRichEditOle_iface; else if (IsEqualGUID(riid, &IID_ITextDocument)) *ppvObj = &This->ITextDocument_iface; + else if (IsEqualGUID(riid, &IID_ITextDocument2Old)) + *ppvObj = &This->ITextDocument2Old_iface; if (*ppvObj) { IUnknown_AddRef((IUnknown *)*ppvObj); @@ -4178,6 +4189,493 @@ static const ITextDocumentVtbl tdvt = { ITextDocument_fnRangeFromPoint };
+/* ITextDocument2Old */ +static HRESULT WINAPI ITextDocument2Old_fnQueryInterface(ITextDocument2Old *iface, + REFIID riid, void **obj) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + return IRichEditOle_QueryInterface(&This->IRichEditOle_iface, riid, obj); +} + +static ULONG WINAPI ITextDocument2Old_fnAddRef(ITextDocument2Old *iface) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + return IRichEditOle_AddRef(&This->IRichEditOle_iface); +} + +static ULONG WINAPI ITextDocument2Old_fnRelease(ITextDocument2Old *iface) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + return IRichEditOle_Release(&This->IRichEditOle_iface); +} + +static HRESULT WINAPI ITextDocument2Old_fnGetTypeInfoCount(ITextDocument2Old *iface, UINT *info) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + TRACE("(%p)->(%p)\n", This, info); + + *info = 1; + return S_OK; +} + +static HRESULT WINAPI ITextDocument2Old_fnGetTypeInfo(ITextDocument2Old *iface, UINT info, LCID lcid, + ITypeInfo **type_info) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + HRESULT hr; + + TRACE("(%p)->(%u, %d, %p)\n", This, info, lcid, type_info); + + hr = get_typeinfo(ITextDocument2Old_tid, type_info); + if (SUCCEEDED(hr)) + ITypeInfo_AddRef(*type_info); + return hr; +} + +static HRESULT WINAPI ITextDocument2Old_fnGetIDsOfNames(ITextDocument2Old *iface, REFIID riid, LPOLESTR *name, + UINT name_count, LCID lcid, DISPID *dispid) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + ITypeInfo *ti; + HRESULT hr; + + TRACE("(%p)->(%s, %p, %u, %d, %p)\n", This, debugstr_guid(riid), name, name_count, lcid, dispid); + + hr = get_typeinfo(ITextDocument2Old_tid, &ti); + if (SUCCEEDED(hr)) + hr = ITypeInfo_GetIDsOfNames(ti, name, name_count, dispid); + return hr; +} + +static HRESULT WINAPI ITextDocument2Old_fnInvoke(ITextDocument2Old *iface, DISPID dispid, REFIID riid, + LCID lcid, WORD flags, DISPPARAMS *dispparams, + VARIANT *var_result, EXCEPINFO *excepinfo, + UINT *arg_err) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + ITypeInfo *ti; + HRESULT hr; + + TRACE("(%p)->(%d, %s, %d, %u, %p, %p, %p, %p)\n", This, dispid, + debugstr_guid(riid), lcid, flags, dispparams, var_result, + excepinfo, arg_err); + + hr = get_typeinfo(ITextDocument2Old_tid, &ti); + if (SUCCEEDED(hr)) + hr = ITypeInfo_Invoke(ti, iface, dispid, flags, dispparams, var_result, excepinfo, arg_err); + return hr; +} + +static HRESULT WINAPI ITextDocument2Old_fnGetName(ITextDocument2Old *iface, BSTR *name) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + TRACE("(%p)->(%p)\n", This, name); + + return ITextDocument_GetName(&This->ITextDocument_iface, name); +} + +static HRESULT WINAPI ITextDocument2Old_fnGetSelection(ITextDocument2Old *iface, ITextSelection **selection) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + TRACE("(%p)->(%p)\n", This, selection); + + return ITextDocument_GetSelection(&This->ITextDocument_iface, selection); +} + +static HRESULT WINAPI ITextDocument2Old_fnGetStoryCount(ITextDocument2Old *iface, LONG *count) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + TRACE("(%p)->(%p)\n", This, count); + + return ITextDocument_GetStoryCount(&This->ITextDocument_iface, count); +} + +static HRESULT WINAPI ITextDocument2Old_fnGetStoryRanges(ITextDocument2Old *iface, ITextStoryRanges **story_ranges) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + TRACE("(%p)->(%p)\n", This, story_ranges); + + return ITextDocument_GetStoryRanges(&This->ITextDocument_iface, story_ranges); +} + +static HRESULT WINAPI ITextDocument2Old_fnGetSaved(ITextDocument2Old *iface, LONG *value) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + TRACE("(%p)->(%p)\n", This, value); + + return ITextDocument_GetSaved(&This->ITextDocument_iface, value); +} + +static HRESULT WINAPI ITextDocument2Old_fnSetSaved(ITextDocument2Old *iface, LONG value) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + TRACE("(%p)->(%d)\n", This, value); + + return ITextDocument_SetSaved(&This->ITextDocument_iface, value); +} + +static HRESULT WINAPI ITextDocument2Old_fnGetDefaultTabStop(ITextDocument2Old *iface, float *value) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + TRACE("(%p)->(%p)\n", This, value); + + return ITextDocument_GetDefaultTabStop(&This->ITextDocument_iface, value); +} + +static HRESULT WINAPI ITextDocument2Old_fnSetDefaultTabStop(ITextDocument2Old *iface, float value) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + TRACE("(%p)->(%f)\n", This, value); + + return ITextDocument_SetDefaultTabStop(&This->ITextDocument_iface, value); +} + +static HRESULT WINAPI ITextDocument2Old_fnNew(ITextDocument2Old *iface) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + TRACE("(%p)\n", This); + + return ITextDocument_New(&This->ITextDocument_iface); +} + +static HRESULT WINAPI ITextDocument2Old_fnOpen(ITextDocument2Old *iface, VARIANT *var, LONG flags, LONG codepage) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + TRACE("(%p)->(%p, %d, %d)\n", This, var, flags, codepage); + + return ITextDocument_Open(&This->ITextDocument_iface, var, flags, codepage); +} + +static HRESULT WINAPI ITextDocument2Old_fnSave(ITextDocument2Old *iface, VARIANT *var, LONG flags, LONG codepage) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + TRACE("(%p)->(%p, %d, %d)\n", This, var, flags, codepage); + + return ITextDocument_Save(&This->ITextDocument_iface, var, flags, codepage); +} + +static HRESULT WINAPI ITextDocument2Old_fnFreeze(ITextDocument2Old *iface, LONG *count) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + TRACE("(%p)->(%p)\n", This, count); + + return ITextDocument_Freeze(&This->ITextDocument_iface, count); +} + +static HRESULT WINAPI ITextDocument2Old_fnUnfreeze(ITextDocument2Old *iface, LONG *count) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + TRACE("(%p)->(%p)\n", This, count); + + return ITextDocument_Unfreeze(&This->ITextDocument_iface, count); +} + +static HRESULT WINAPI ITextDocument2Old_fnBeginEditCollection(ITextDocument2Old *iface) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + TRACE("(%p)\n", This); + + return ITextDocument_BeginEditCollection(&This->ITextDocument_iface); +} + +static HRESULT WINAPI ITextDocument2Old_fnEndEditCollection(ITextDocument2Old *iface) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + TRACE("(%p)\n", This); + + return ITextDocument_EndEditCollection(&This->ITextDocument_iface); +} + +static HRESULT WINAPI ITextDocument2Old_fnUndo(ITextDocument2Old *iface, LONG count, LONG *prop) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + TRACE("(%p)->(%d, %p)\n", This, count, prop); + + return ITextDocument_Undo(&This->ITextDocument_iface, count, prop); +} + +static HRESULT WINAPI ITextDocument2Old_fnRedo(ITextDocument2Old *iface, LONG count, LONG *prop) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + TRACE("(%p)->(%d, %p)\n", This, count, prop); + + return ITextDocument_Redo(&This->ITextDocument_iface, count, prop); +} + +static HRESULT WINAPI ITextDocument2Old_fnRange(ITextDocument2Old *iface, LONG cp_active, LONG cp_anchor, + ITextRange **range) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + TRACE("(%p)->(%d, %d, %p)\n", This, cp_active, cp_anchor, range); + + return ITextDocument_Range(&This->ITextDocument_iface, cp_active, cp_anchor, range); +} + +static HRESULT WINAPI ITextDocument2Old_fnRangeFromPoint(ITextDocument2Old *iface, LONG x, LONG y, + ITextRange **range) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + TRACE("(%p)->(%d, %d, %p)\n", This, x, y, range); + + return ITextDocument_RangeFromPoint(&This->ITextDocument_iface, x, y, range); +} + +static HRESULT WINAPI ITextDocument2Old_fnAttachMsgFilter(ITextDocument2Old *iface, IUnknown *filter) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + FIXME("(%p)->(%p): stub\n", This, filter); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ITextDocument2Old_fnSetEffectColor(ITextDocument2Old *iface, LONG index, COLORREF cr) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + FIXME("(%p)->(%d, 0x%x): stub\n", This, index, cr); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ITextDocument2Old_fnGetEffectColor(ITextDocument2Old *iface, LONG index, COLORREF *cr) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + FIXME("(%p)->(%d, %p): stub\n", This, index, cr); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ITextDocument2Old_fnGetCaretType(ITextDocument2Old *iface, LONG *type) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + FIXME("(%p)->(%p): stub\n", This, type); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ITextDocument2Old_fnSetCaretType(ITextDocument2Old *iface, LONG type) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + FIXME("(%p)->(%d): stub\n", This, type); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ITextDocument2Old_fnGetImmContext(ITextDocument2Old *iface, LONG *context) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + FIXME("(%p)->(%p): stub\n", This, context); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ITextDocument2Old_fnReleaseImmContext(ITextDocument2Old *iface, LONG context) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + FIXME("(%p)->(%d): stub\n", This, context); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ITextDocument2Old_fnGetPreferredFont(ITextDocument2Old *iface, LONG cp, LONG charrep, + LONG options, LONG current_charrep, LONG current_fontsize, + BSTR *bstr, LONG *pitch_family, LONG *new_fontsize) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + FIXME("(%p)->(%d, %d, %d, %d, %d, %p, %p, %p): stub\n", This, cp, charrep, options, current_charrep, + current_fontsize, bstr, pitch_family, new_fontsize); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ITextDocument2Old_fnGetNotificationMode(ITextDocument2Old *iface, LONG *mode) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + FIXME("(%p)->(%p): stub\n", This, mode); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ITextDocument2Old_fnSetNotificationMode(ITextDocument2Old *iface, LONG mode) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + FIXME("(%p)->(0x%x): stub\n", This, mode); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ITextDocument2Old_fnGetClientRect(ITextDocument2Old *iface, LONG type, LONG *left, LONG *top, + LONG *right, LONG *bottom) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + FIXME("(%p)->(%d, %p, %p, %p, %p): stub\n", This, type, left, top, right, bottom); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ITextDocument2Old_fnGetSelectionEx(ITextDocument2Old *iface, ITextSelection **selection) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + FIXME("(%p)->(%p): stub\n", This, selection); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ITextDocument2Old_fnGetWindow(ITextDocument2Old *iface, LONG *hwnd) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + FIXME("(%p)->(%p): stub\n", This, hwnd); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ITextDocument2Old_fnGetFEFlags(ITextDocument2Old *iface, LONG *flags) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + FIXME("(%p)->(%p): stub\n", This, flags); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ITextDocument2Old_fnUpdateWindow(ITextDocument2Old *iface) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + FIXME("(%p): stub\n", This); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ITextDocument2Old_fnCheckTextLimit(ITextDocument2Old *iface, LONG cch, LONG *exceed) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + FIXME("(%p)->(%d, %p): stub\n", This, cch, exceed); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ITextDocument2Old_fnIMEInProgress(ITextDocument2Old *iface, LONG mode) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + FIXME("(%p)->(0x%x): stub\n", This, mode); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ITextDocument2Old_fnSysBeep(ITextDocument2Old *iface) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + FIXME("(%p): stub\n", This); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ITextDocument2Old_fnUpdate(ITextDocument2Old *iface, LONG mode) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + FIXME("(%p)->(0x%x): stub\n", This, mode); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ITextDocument2Old_fnNotify(ITextDocument2Old *iface, LONG notify) +{ + IRichEditOleImpl *This = impl_from_ITextDocument2Old(iface); + + FIXME("(%p)->(%d): stub\n", This, notify); + + return E_NOTIMPL; +} + +static const ITextDocument2OldVtbl td2oldvt = { + ITextDocument2Old_fnQueryInterface, + ITextDocument2Old_fnAddRef, + ITextDocument2Old_fnRelease, + ITextDocument2Old_fnGetTypeInfoCount, + ITextDocument2Old_fnGetTypeInfo, + ITextDocument2Old_fnGetIDsOfNames, + ITextDocument2Old_fnInvoke, + ITextDocument2Old_fnGetName, + ITextDocument2Old_fnGetSelection, + ITextDocument2Old_fnGetStoryCount, + ITextDocument2Old_fnGetStoryRanges, + ITextDocument2Old_fnGetSaved, + ITextDocument2Old_fnSetSaved, + ITextDocument2Old_fnGetDefaultTabStop, + ITextDocument2Old_fnSetDefaultTabStop, + ITextDocument2Old_fnNew, + ITextDocument2Old_fnOpen, + ITextDocument2Old_fnSave, + ITextDocument2Old_fnFreeze, + ITextDocument2Old_fnUnfreeze, + ITextDocument2Old_fnBeginEditCollection, + ITextDocument2Old_fnEndEditCollection, + ITextDocument2Old_fnUndo, + ITextDocument2Old_fnRedo, + ITextDocument2Old_fnRange, + ITextDocument2Old_fnRangeFromPoint, + ITextDocument2Old_fnAttachMsgFilter, + ITextDocument2Old_fnSetEffectColor, + ITextDocument2Old_fnGetEffectColor, + ITextDocument2Old_fnGetCaretType, + ITextDocument2Old_fnSetCaretType, + ITextDocument2Old_fnGetImmContext, + ITextDocument2Old_fnReleaseImmContext, + ITextDocument2Old_fnGetPreferredFont, + ITextDocument2Old_fnGetNotificationMode, + ITextDocument2Old_fnSetNotificationMode, + ITextDocument2Old_fnGetClientRect, + ITextDocument2Old_fnGetSelectionEx, + ITextDocument2Old_fnGetWindow, + ITextDocument2Old_fnGetFEFlags, + ITextDocument2Old_fnUpdateWindow, + ITextDocument2Old_fnCheckTextLimit, + ITextDocument2Old_fnIMEInProgress, + ITextDocument2Old_fnSysBeep, + ITextDocument2Old_fnUpdate, + ITextDocument2Old_fnNotify +}; + /* ITextSelection */ static HRESULT WINAPI ITextSelection_fnQueryInterface( ITextSelection *me, @@ -5277,6 +5775,7 @@ LRESULT CreateIRichEditOle(IUnknown *outer_unk, ME_TextEditor *editor, LPVOID *p reo->IUnknown_inner.lpVtbl = &reo_unk_vtbl; reo->IRichEditOle_iface.lpVtbl = &revt; reo->ITextDocument_iface.lpVtbl = &tdvt; + reo->ITextDocument2Old_iface.lpVtbl = &td2oldvt; reo->ref = 1; reo->editor = editor; reo->txtSel = NULL; diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c index aaf52bcfdd..bacf68c095 100644 --- a/dlls/riched20/tests/richole.c +++ b/dlls/riched20/tests/richole.c @@ -117,6 +117,7 @@ static void test_Interfaces(void) { IRichEditOle *reOle = NULL, *reOle1 = NULL; ITextDocument *txtDoc = NULL; + ITextDocument2Old *txtDoc2Old = NULL; ITextSelection *txtSel = NULL, *txtSel2; IUnknown *punk; HRESULT hres; @@ -195,6 +196,13 @@ static void test_Interfaces(void) hres = IRichEditOle_QueryInterface(reOle, &IID_IOleInPlaceSite, (void **) &punk); ok(hres == E_NOINTERFACE, "IRichEditOle_QueryInterface\n");
+ hres = IRichEditOle_QueryInterface(reOle, &IID_ITextDocument2Old, (void **)&txtDoc2Old); + ok(hres == S_OK, "IRichEditOle_QueryInterface\n"); + ok(txtDoc2Old != NULL, "IRichEditOle_QueryInterface\n"); + EXPECT_REF(txtDoc2Old, 5); + EXPECT_REF(reOle, 5); + ITextDocument2Old_Release(txtDoc2Old); + ITextDocument_Release(txtDoc); IRichEditOle_Release(reOle); refcount = IRichEditOle_Release(reOle);