Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/range.c | 10 ++++++++-- dlls/mshtml/tests/dom.c | 6 ++++++ 2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/range.c b/dlls/mshtml/range.c index 89f6804..6c3d346 100644 --- a/dlls/mshtml/range.c +++ b/dlls/mshtml/range.c @@ -1993,8 +1993,14 @@ static HRESULT WINAPI HTMLDOMRange_cloneRange(IHTMLDOMRange *iface, IHTMLDOMRang static HRESULT WINAPI HTMLDOMRange_toString(IHTMLDOMRange *iface, BSTR *p) { HTMLDOMRange *This = impl_from_IHTMLDOMRange(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + if(!p) + return E_INVALIDARG; + + *p = NULL; + return S_OK; }
static HRESULT WINAPI HTMLDOMRange_detach(IHTMLDOMRange *iface) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 67d7978..4af16b9 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -5913,6 +5913,7 @@ static void test_range(IHTMLDocument2 *doc) IDocumentRange *doc_range; IHTMLDOMRange *range; HRESULT hres; + BSTR str;
hres = IHTMLDocument2_QueryInterface(doc, &IID_IDocumentRange, (void **)&doc_range); ok(hres == S_OK, "Failed to get IDocumentRange: %08x\n", hres); @@ -5922,6 +5923,11 @@ static void test_range(IHTMLDocument2 *doc) hres = IDocumentRange_createRange(doc_range, &range); ok(hres == S_OK, "Failed to create range, %08x\n", hres);
+ hres = IHTMLDOMRange_toString(range, &str); + ok(hres == S_OK, "toString failed: %08x\n", hres); + ok(!str, "toString returned: %s\n", wine_dbgstr_w(str)); + SysFreeString(str); + test_disp((IUnknown *)range, &DIID_DispHTMLDOMRange, NULL, NULL);
IHTMLDOMRange_Release(range);