Author: fireball Date: Wed Jul 22 10:44:41 2009 New Revision: 42134
URL: http://svn.reactos.org/svn/reactos?rev=42134&view=rev Log: - It's fine to use kernel32's WaitForMultipleObjectsEx, it's going to be the same NtCreateEvent handle anyway. Thanks Alex for reminding. Win32k fix to follow.
Modified: branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c
Modified: branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winent... ============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c [iso-8859-1] Wed Jul 22 10:44:41 2009 @@ -350,48 +350,11 @@ DWORD CDECL RosDrv_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, DWORD timeout, DWORD mask, DWORD flags ) { - NTSTATUS status; - BOOL bWaitAll = FALSE, bAlertable = FALSE; - PLARGE_INTEGER TimePtr; - LARGE_INTEGER Time; + TRACE("WaitForMultipleObjectsEx(%d %p %d %x %x %x\n", count, handles, timeout, mask, flags);
if (!count && !timeout) return WAIT_TIMEOUT; - - TRACE("WaitForMultipleObjectsEx(%d %p %d %x %x %x\n", count, handles, timeout, mask, flags); - - /* Set waitall and alertable flags */ - if (flags & MWMO_WAITALL) bWaitAll = TRUE; - if (flags & MWMO_ALERTABLE) bAlertable = TRUE; - - /* Check if this is an infinite wait */ - if (timeout == INFINITE) - { - /* Under NT, this means no timer argument */ - TimePtr = NULL; - } - else - { - /* Otherwise, convert the time to NT Format */ - Time.QuadPart = UInt32x32To64(-10000, timeout); - TimePtr = &Time; - } - - /* Call Nt function, because the handle we got is a NtCreateEvent one */ - status = NtWaitForMultipleObjects(count, - (PHANDLE)handles, - bWaitAll ? WaitAll : WaitAny, - bAlertable, - TimePtr); - - if (!NT_SUCCESS(status)) - { - /* Wait failed */ - WARN("Wait failed with status 0x%08x\n", status); - //SetLastErrorByStatus (status); - return WAIT_FAILED; - } - - return status; + return WaitForMultipleObjectsEx( count, handles, flags & MWMO_WAITALL, + timeout, flags & MWMO_ALERTABLE ); }
void CDECL RosDrv_ReleaseDC( HWND hwnd, HDC hdc )