SetWindowHookEx

steve.lustbader at philips.com steve.lustbader at philips.com
Thu Oct 31 09:50:35 CST 2002


This patch fixed it.  Could you change the fixme message in user/hook.c
to something more explicit than "won't work right," or at least include
a comment in the code explaining why it won't work right?

-Steve




steve.lustbader at philips.com writes:

> It's returning NULL for me, which implies it isn't working.  Is there some
> sort of trace that I can send you to help you out?

Oops you are right, this should fix it:

Index: server/hook.c
===================================================================
RCS file: /opt/cvs-commit/wine/server/hook.c,v
retrieving revision 1.1
diff -u -r1.1 hook.c
--- server/hook.c        29 Oct 2002 00:41:42 -0000          1.1
+++ server/hook.c        30 Oct 2002 19:51:20 -0000
@@ -227,7 +227,8 @@
         set_error( STATUS_INVALID_PARAMETER );
         return;
     }
-    if (!(thread = get_thread_from_id( req->tid ))) return;
+    if (!req->tid) thread = (struct thread *)grab_object( current );
+    else if (!(thread = get_thread_from_id( req->tid ))) return;

     if ((hook = add_hook( thread, req->id - WH_MINHOOK )))
     {

--
Alexandre Julliard
julliard at winehq.com







More information about the wine-devel mailing list