Module: wine Branch: master Commit: 97e999565daa7c7426a3c60a28455bbc55d3f635 URL: http://source.winehq.org/git/wine.git/?a=commit;h=97e999565daa7c7426a3c60a28...
Author: Misha Koshelev mk144210@bcm.edu Date: Mon Aug 6 23:08:31 2007 -0500
urlmon: Add support for synchronous binding.
---
dlls/urlmon/binding.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c index acf96b6..5820d4f 100644 --- a/dlls/urlmon/binding.c +++ b/dlls/urlmon/binding.c @@ -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);