user32: 0 vs. INFINITE timeout
Francois Gouget
fgouget at codeweavers.com
Fri Feb 24 06:14:17 CST 2006
In Windows 9x SendMessageTimeout() and others used INFINITE (i.e. -1) to
mean an infinite timeout but since NT it is 0 that denotes an infinite
timeout. Wine's behavior changed to match NT but a couple of timeouts
got left to -1 in the server calls.
Changelog:
* dlls/user/message.c
Francois Gouget <fgouget at codeweavers.com>
It is 0 that denotes an infinite timeout for the wine server now,
not -1 (INFINITE).
Document put_message_in_queue()'s check for INFINITE (done for
backward compatibility with Windows 9x).
--
Francois Gouget
fgouget at codeweavers.com
-------------- next part --------------
Index: dlls/user/message.c
===================================================================
RCS file: /home/wine/wine/dlls/user/message.c,v
retrieving revision 1.100
diff -u -p -r1.100 message.c
--- dlls/user/message.c 30 Jan 2006 18:46:17 -0000 1.100
+++ dlls/user/message.c 24 Feb 2006 10:57:09 -0000
@@ -1372,7 +1372,7 @@ static BOOL post_dde_message( DWORD dest
req->wparam = info->wparam;
req->lparam = lp;
req->time = GetCurrentTime();
- req->timeout = -1;
+ req->timeout = 0;
for (i = 0; i < data->count; i++)
wine_server_add_data( req, data->data[i], data->size[i] );
if ((res = wine_server_call( req )))
@@ -2151,8 +2151,11 @@ static BOOL put_message_in_queue( DWORD
{
struct packed_message data;
unsigned int res;
- int i, timeout = -1;
+ int i, timeout = 0;
+ /* Check for INFINITE timeout for compatibility with Win9x,
+ * although Windows >= NT does not do so
+ */
if (info->type != MSG_NOTIFY &&
info->type != MSG_CALLBACK &&
info->type != MSG_POSTED &&
More information about the wine-patches
mailing list