urlmon: Add support for synchronous binding.

This commit is contained in:
Misha Koshelev 2007-08-06 23:08:31 -05:00 committed by Alexandre Julliard
parent e54a48f96c
commit 97e999565d
1 changed files with 10 additions and 0 deletions

View File

@ -1375,6 +1375,7 @@ HRESULT start_binding(LPCWSTR url, IBindCtx *pbc, REFIID riid, void **ppv)
{
Binding *binding = NULL;
HRESULT hres;
MSG msg;
*ppv = NULL;
@ -1403,6 +1404,15 @@ HRESULT start_binding(LPCWSTR url, IBindCtx *pbc, REFIID riid, void **ppv)
return hres;
}
while(!(binding->bindf & BINDF_ASYNCHRONOUS) &&
binding->download_state != END_DOWNLOAD) {
MsgWaitForMultipleObjects(0, NULL, FALSE, 5000, QS_POSTMESSAGE);
while (PeekMessageW(&msg, binding->notif_hwnd, WM_USER, WM_USER+117, PM_REMOVE|PM_NOYIELD)) {
TranslateMessage(&msg);
DispatchMessageW(&msg);
}
}
if(binding->stream->init_buf) {
if(binding->request_locked)
IInternetProtocol_UnlockRequest(binding->protocol);