-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello again,
"wine winmm_test.exe wave" reliably locks up for me after calling
waveOutOpen() with the CALLBACK_THREAD flag, waiting for a WOM_OPEN
message to arrive. Which never happens because I believe the thread
doesn't have a message queue.
This patch implements the solution mentioned in the "remarks" section of
the MSDN page on PostThreadMessage:
http://msdn2.microsoft.com/en-us/library/ms644946.aspx
Fixed it for me.
- -- Stéphan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFGERkUcFUq0gzqDwQRAlwCAKD1rVdMXjawPzJOddfU5Oh9hK8cagCgzB2g
6b6JbG23fjGqk+Mj9xvHnF8=
=rXu0
-----END PGP SIGNATURE-----
diff --git a/dlls/winmm/tests/wave.c b/dlls/winmm/tests/wave.c
index 84a19fc..6da3b4b 100644
--- a/dlls/winmm/tests/wave.c
+++ b/dlls/winmm/tests/wave.c
@@ -535,6 +535,8 @@ static DWORD WINAPI callback_thread(LPVOID lpParameter)
{
MSG msg;
+ PeekMessage(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE);
+
SetEvent((HANDLE)lpParameter);
while (GetMessage(&msg, 0, 0, 0)) {