SetWindowHookEx

Alexandre Julliard julliard at winehq.com
Wed Oct 30 14:14:43 CST 2002


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