urlmon: Allow NULL IBindStatusCallback in URLOpenBlockingStream.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
58e0972c5c
commit
4ac74d1083
|
@ -328,6 +328,21 @@ static void test_URLOpenBlockingStreamW(void)
|
||||||
ok(pStream != NULL, "pStream is NULL\n");
|
ok(pStream != NULL, "pStream is NULL\n");
|
||||||
if(pStream)
|
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);
|
hr = IStream_Read(pStream, buffer, sizeof(buffer), NULL);
|
||||||
ok(hr == S_OK, "IStream_Read failed with error 0x%08x\n", hr);
|
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");
|
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)
|
static HRESULT WINAPI ProxyBindStatusCallback_GetBindInfo(IBindStatusCallback *iface, DWORD *grfBINDF, BINDINFO *pbindinfo)
|
||||||
{
|
{
|
||||||
|
DWORD size = pbindinfo->cbSize;
|
||||||
ProxyBindStatusCallback *This = impl_from_IBindStatusCallback(iface);
|
ProxyBindStatusCallback *This = impl_from_IBindStatusCallback(iface);
|
||||||
|
|
||||||
if(This->pBSC)
|
if(This->pBSC)
|
||||||
return IBindStatusCallback_GetBindInfo(This->pBSC, grfBINDF, pbindinfo);
|
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,
|
static HRESULT WINAPI ProxyBindStatusCallback_OnDataAvailable(IBindStatusCallback *iface, DWORD grfBSCF,
|
||||||
|
|
Loading…
Reference in New Issue