Francois Gouget : user32: 0 vs. INFINITE timeout.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Feb 24 14:29:44 CST 2006


Module: wine
Branch: refs/heads/master
Commit: feb153c6492f6e9ca5397fe4cecee2ed0e8da161
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=feb153c6492f6e9ca5397fe4cecee2ed0e8da161

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Fri Feb 24 13:14:17 2006 +0100

user32: 0 vs. INFINITE timeout.
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
backwards compatibility with Windows 9x).

---

 dlls/user/message.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/user/message.c b/dlls/user/message.c
index 2a1a9d9..3fc261d 100644
--- a/dlls/user/message.c
+++ b/dlls/user/message.c
@@ -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-cvs mailing list