Commit 4ac74d10 authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

urlmon: Allow NULL IBindStatusCallback in URLOpenBlockingStream.

parent 58e0972c
......@@ -328,6 +328,21 @@ static void test_URLOpenBlockingStreamW(void)
ok(pStream != NULL, "pStream is NULL\n");
if(pStream)
{
buffer[0] = 0;
hr = IStream_Read(pStream, buffer, sizeof(buffer), NULL);
ok(hr == S_OK, "IStream_Read failed with error 0x%08x\n", hr);
ok(!memcmp(buffer, szHtmlDoc, sizeof(szHtmlDoc)-1), "read data differs from file\n");
IStream_Release(pStream);
}
hr = URLOpenBlockingStreamW(NULL, INDEX_HTML, &pStream, 0, NULL);
ok(hr == S_OK, "URLOpenBlockingStreamW failed with error 0x%08x\n", hr);
ok(pStream != NULL, "pStream is NULL\n");
if(pStream)
{
buffer[0] = 0;
hr = IStream_Read(pStream, buffer, sizeof(buffer), NULL);
ok(hr == S_OK, "IStream_Read failed with error 0x%08x\n", hr);
ok(!memcmp(buffer, szHtmlDoc, sizeof(szHtmlDoc)-1), "read data differs from file\n");
......
......@@ -122,12 +122,18 @@ static HRESULT WINAPI ProxyBindStatusCallback_OnStopBinding(IBindStatusCallback
static HRESULT WINAPI ProxyBindStatusCallback_GetBindInfo(IBindStatusCallback *iface, DWORD *grfBINDF, BINDINFO *pbindinfo)
{
DWORD size = pbindinfo->cbSize;
ProxyBindStatusCallback *This = impl_from_IBindStatusCallback(iface);
if(This->pBSC)
return IBindStatusCallback_GetBindInfo(This->pBSC, grfBINDF, pbindinfo);
return E_INVALIDARG;
memset(pbindinfo, 0, size);
pbindinfo->cbSize = size;
*grfBINDF = 0;
return S_OK;
}
static HRESULT WINAPI ProxyBindStatusCallback_OnDataAvailable(IBindStatusCallback *iface, DWORD grfBSCF,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment