Commit a4a8693e authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

urlmon: Allow NULL IBindStatusCallback in UrlOpenStream.

parent 4ac74d10
...@@ -380,6 +380,9 @@ static void test_URLOpenStreamW(void) ...@@ -380,6 +380,9 @@ static void test_URLOpenStreamW(void)
CHECK_CALLED(OnProgress_ENDDOWNLOADDATA); CHECK_CALLED(OnProgress_ENDDOWNLOADDATA);
CHECK_CALLED(OnDataAvailable); CHECK_CALLED(OnDataAvailable);
CHECK_CALLED(OnStopBinding); CHECK_CALLED(OnStopBinding);
hr = URLOpenStreamW(NULL, INDEX_HTML, 0, NULL);
ok(hr == S_OK, "URLOpenStreamW failed with error 0x%08x\n", hr);
} }
START_TEST(stream) START_TEST(stream)
......
...@@ -182,8 +182,20 @@ static const IBindStatusCallbackVtbl BlockingBindStatusCallbackVtbl = ...@@ -182,8 +182,20 @@ static const IBindStatusCallbackVtbl BlockingBindStatusCallbackVtbl =
static HRESULT WINAPI AsyncBindStatusCallback_GetBindInfo(IBindStatusCallback *iface, DWORD *grfBINDF, BINDINFO *pbindinfo) static HRESULT WINAPI AsyncBindStatusCallback_GetBindInfo(IBindStatusCallback *iface, DWORD *grfBINDF, BINDINFO *pbindinfo)
{ {
ProxyBindStatusCallback *This = impl_from_IBindStatusCallback(iface); ProxyBindStatusCallback *This = impl_from_IBindStatusCallback(iface);
HRESULT hr = IBindStatusCallback_GetBindInfo(This->pBSC, grfBINDF, pbindinfo); HRESULT hr = S_OK;
if(This->pBSC)
hr = IBindStatusCallback_GetBindInfo(This->pBSC, grfBINDF, pbindinfo);
else{
DWORD size = pbindinfo->cbSize;
memset(pbindinfo, 0, size);
pbindinfo->cbSize = size;
*grfBINDF = 0;
}
*grfBINDF |= BINDF_PULLDATA | BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE; *grfBINDF |= BINDF_PULLDATA | BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE;
return hr; return hr;
} }
......
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