kernel32: Use PeekMessageW instead of UserYield.

This commit is contained in:
Alexandre Julliard 2009-11-12 21:54:15 +01:00
parent 7c930a3771
commit 18ddbc1c7d

View File

@ -819,10 +819,12 @@ void WINAPI Yield16(void)
HMODULE mod = GetModuleHandleA( "user32.dll" );
if (mod)
{
FARPROC proc = GetProcAddress( mod, "UserYield16" );
if (proc)
BOOL (WINAPI *pPeekMessageW)( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags );
pPeekMessageW = (void *)GetProcAddress( mod, "PeekMessageW" );
if (pPeekMessageW)
{
proc();
MSG msg;
pPeekMessageW( &msg, 0, 0, 0, PM_REMOVE | PM_QS_SENDMESSAGE );
return;
}
}