From 6155a67782e356d3068028d78731fc67fc7a581a Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 25 May 2006 18:33:21 +0200 Subject: [PATCH] urlmon: Added ReportResult implementation. --- dlls/urlmon/binding.c | 8 +++++--- dlls/urlmon/tests/url.c | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c index f88d1c3a93..04d2f7fef5 100644 --- a/dlls/urlmon/binding.c +++ b/dlls/urlmon/binding.c @@ -602,8 +602,11 @@ static HRESULT WINAPI InternetProtocolSink_ReportResult(IInternetProtocolSink *i HRESULT hrResult, DWORD dwError, LPCWSTR szResult) { Binding *This = PROTSINK_THIS(iface); - FIXME("(%p)->(%08lx %ld %s)\n", This, hrResult, dwError, debugstr_w(szResult)); - return E_NOTIMPL; + + TRACE("(%p)->(%08lx %ld %s)\n", This, hrResult, dwError, debugstr_w(szResult)); + + IInternetProtocol_Terminate(This->protocol, 0); + return S_OK; } #undef PROTSINK_THIS @@ -904,7 +907,6 @@ HRESULT start_binding(LPCWSTR url, IBindCtx *pbc, REFIID riid, void **ppv) hres = IInternetProtocol_Start(binding->protocol, url, PROTSINK(binding), BINDINF(binding), 0, 0); - IInternetProtocol_Terminate(binding->protocol, 0); if(SUCCEEDED(hres)) { IInternetProtocol_UnlockRequest(binding->protocol); diff --git a/dlls/urlmon/tests/url.c b/dlls/urlmon/tests/url.c index 7c1c5ff41f..1c6129e961 100644 --- a/dlls/urlmon/tests/url.c +++ b/dlls/urlmon/tests/url.c @@ -226,7 +226,10 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, CHECK_CALLED(OnDataAvailable); CHECK_CALLED(OnStopBinding); - IInternetProtocolSink_ReportResult(pOIProtSink, S_OK, 0, NULL); + SET_EXPECT(Terminate); + hres = IInternetProtocolSink_ReportResult(pOIProtSink, S_OK, 0, NULL); + ok(hres == S_OK, "ReportResult failed: %08lx\n", hres); + CHECK_CALLED(Terminate); return S_OK; } @@ -620,7 +623,6 @@ static void test_BindToStorage(void) SET_EXPECT(OnStartBinding); if(emulate_protocol) { SET_EXPECT(Start); - SET_EXPECT(Terminate); SET_EXPECT(UnlockRequest); }else { if(test_protocol == HTTP_TEST) { @@ -661,7 +663,6 @@ static void test_BindToStorage(void) CHECK_CALLED(OnStartBinding); if(emulate_protocol) { CHECK_CALLED(Start); - CHECK_CALLED(Terminate); CHECK_CALLED(UnlockRequest); }else { if(test_protocol == HTTP_TEST) {