diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c index 859057fad9e..44d3e3946f1 100644 --- a/dlls/urlmon/binding.c +++ b/dlls/urlmon/binding.c @@ -333,6 +333,7 @@ static HRESULT WINAPI ProtocolStream_Read(IStream *iface, void *pv, { ProtocolStream *This = STREAM_THIS(iface); DWORD read = 0, pread = 0; + HRESULT hres; TRACE("(%p)->(%p %ld %p)\n", This, pv, cb, pcbRead); @@ -354,9 +355,14 @@ static HRESULT WINAPI ProtocolStream_Read(IStream *iface, void *pv, return S_OK; } - IInternetProtocol_Read(This->protocol, (PBYTE)pv+read, cb-read, &pread); + hres = IInternetProtocol_Read(This->protocol, (PBYTE)pv+read, cb-read, &pread); *pcbRead = read + pread; + if(hres == E_PENDING) + return E_PENDING; + else if(FAILED(hres)) + FIXME("Read failed: %08lx\n", hres); + return read || pread ? S_OK : S_FALSE; }