GetMessage: Return -1 if an invalid window handle has been passed
Michael Kaufmann
hallo at michael-kaufmann.ch
Wed Jun 21 05:54:14 CDT 2006
Changelog:
GetMessage: Return -1 if an invalid window handle has been passed
-------------- next part --------------
Index: dlls/user/message.c
===================================================================
RCS file: /home/wine/wine/dlls/user/message.c,v
retrieving revision 1.113
diff -u -r1.113 message.c
--- dlls/user/message.c 14 Jun 2006 11:55:12 -0000 1.113
+++ dlls/user/message.c 21 Jun 2006 09:41:21 -0000
@@ -2813,6 +2813,11 @@
unsigned int wake_bits = 0, changed_bits = 0;
DWORD dwlc;
+ if (hwnd && !IsWindow(hwnd))
+ {
+ return -1;
+ }
+
SERVER_START_REQ( set_queue_mask )
{
req->wake_mask = QS_SENDMESSAGE;
@@ -2846,9 +2851,9 @@
*/
BOOL WINAPI GetMessageA( MSG *msg, HWND hwnd, UINT first, UINT last )
{
- GetMessageW( msg, hwnd, first, last );
+ BOOL ret = GetMessageW( msg, hwnd, first, last );
msg->wParam = map_wparam_WtoA( msg->message, msg->wParam );
- return (msg->message != WM_QUIT);
+ return ret;
}
More information about the wine-patches
mailing list