Author: jimtabor
Date: Thu Feb 5 21:31:05 2015
New Revision: 66175
URL:
http://svn.reactos.org/svn/reactos?rev=66175&view=rev
Log:
[User32]
- Return timeout if the count and wait time is zero. This is a wine hack and fixes two
related mgs:test_MsgWait* tests. Attempt to fix CORE-9117. Not sure if
MsgWaitForMultipleObjects is the problem.
Modified:
trunk/reactos/win32ss/user/user32/windows/message.c
Modified: trunk/reactos/win32ss/user/user32/windows/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
==============================================================================
--- trunk/reactos/win32ss/user/user32/windows/message.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/windows/message.c [iso-8859-1] Thu Feb 5 21:31:05
2015
@@ -3107,7 +3107,7 @@
if ( (pcti->fsChangeBits & LOWORD(dwWakeMask)) ||
( (dwFlags & MWMO_INPUTAVAILABLE) && (pcti->fsWakeBits &
LOWORD(dwWakeMask)) ) )
{
- //FIXME("Chg 0x%x Wake 0x%x Mask 0x%x nCnt
%d\n",pcti->fsChangeBits, pcti->fsWakeBits, dwWakeMask, nCount);
+ //FIXME("Return Chg 0x%x Wake 0x%x Mask 0x%x nCnt
%d\n",pcti->fsChangeBits, pcti->fsWakeBits, dwWakeMask, nCount);
return nCount;
}
}
@@ -3130,12 +3130,22 @@
RtlCopyMemory(RealHandles, pHandles, nCount * sizeof(HANDLE));
RealHandles[nCount] = MessageQueueHandle;
- Result = WaitForMultipleObjectsEx(nCount + 1, RealHandles,
- dwFlags & MWMO_WAITALL,
- dwMilliseconds, dwFlags & MWMO_ALERTABLE);
+ //FIXME("1 Chg 0x%x Wake 0x%x Mask 0x%x nCnt %d\n",pcti->fsChangeBits,
pcti->fsWakeBits, dwWakeMask, nCount);
+
+ Result = WaitForMultipleObjectsEx( nCount + 1,
+ RealHandles,
+ dwFlags & MWMO_WAITALL,
+ dwMilliseconds,
+ dwFlags & MWMO_ALERTABLE );
+
+ //FIXME("2 Chg 0x%x Wake 0x%x Mask 0x%x nCnt %d\n",pcti->fsChangeBits,
pcti->fsWakeBits, dwWakeMask, nCount);
HeapFree(GetProcessHeap(), 0, RealHandles);
NtUserxMsqClearWakeMask();
+
+ // wine hack! MSDN: If dwMilliseconds is zero,,specified objects are not signaled; it
always returns immediately.
+ if (!Result && !nCount && !dwMilliseconds) Result = WAIT_TIMEOUT;
+
//FIXME("Result 0X%x\n",Result);
return Result;
}