Alexandre Julliard : user32: Make HOOK_IsHooked function static.

Alexandre Julliard julliard at winehq.org
Wed Dec 23 10:04:15 CST 2009


Module: wine
Branch: master
Commit: 1bee9f4f7181e1dd0f3377726302f57435e14103
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1bee9f4f7181e1dd0f3377726302f57435e14103

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Dec 22 17:44:37 2009 +0100

user32: Make HOOK_IsHooked function static.

---

 dlls/user32/hook.c         |   25 +++++++++++++------------
 dlls/user32/msg16.c        |    3 +--
 dlls/user32/user_private.h |    1 -
 3 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/dlls/user32/hook.c b/dlls/user32/hook.c
index 916c37e..386a585 100644
--- a/dlls/user32/hook.c
+++ b/dlls/user32/hook.c
@@ -388,6 +388,19 @@ static LRESULT call_hook( struct hook_info *info, INT code, WPARAM wparam, LPARA
     return ret;
 }
 
+
+/***********************************************************************
+ *           HOOK_IsHooked
+ */
+static BOOL HOOK_IsHooked( INT id )
+{
+    struct user_thread_info *thread_info = get_user_thread_info();
+
+    if (!thread_info->active_hooks) return TRUE;
+    return (thread_info->active_hooks & (1 << (id - WH_MINHOOK))) != 0;
+}
+
+
 /***********************************************************************
  *		HOOK_CallHooks
  */
@@ -441,18 +454,6 @@ LRESULT HOOK_CallHooks( INT id, INT code, WPARAM wparam, LPARAM lparam, BOOL uni
 
 
 /***********************************************************************
- *           HOOK_IsHooked
- */
-BOOL HOOK_IsHooked( INT id )
-{
-    struct user_thread_info *thread_info = get_user_thread_info();
-
-    if (!thread_info->active_hooks) return TRUE;
-    return (thread_info->active_hooks & (1 << (id - WH_MINHOOK))) != 0;
-}
-
-
-/***********************************************************************
  *		SetWindowsHookA (USER32.@)
  */
 HHOOK WINAPI SetWindowsHookA( INT id, HOOKPROC proc )
diff --git a/dlls/user32/msg16.c b/dlls/user32/msg16.c
index 710dfa0..1d96738 100644
--- a/dlls/user32/msg16.c
+++ b/dlls/user32/msg16.c
@@ -1500,8 +1500,7 @@ LRESULT WINAPI SendMessage16( HWND16 hwnd16, UINT16 msg, WPARAM16 wparam, LPARAM
         WNDPROC16 winproc;
 
         /* first the WH_CALLWNDPROC hook */
-        if (HOOK_IsHooked( WH_CALLWNDPROC ))
-            WINPROC_CallProc16To32A( cwp_hook_callback, hwnd16, msg, wparam, lparam, &result, NULL );
+        WINPROC_CallProc16To32A( cwp_hook_callback, hwnd16, msg, wparam, lparam, &result, NULL );
 
         if (!(winproc = (WNDPROC16)GetWindowLong16( hwnd16, GWLP_WNDPROC ))) return 0;
 
diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h
index 47dcbb7..33d683b 100644
--- a/dlls/user32/user_private.h
+++ b/dlls/user32/user_private.h
@@ -214,7 +214,6 @@ struct dce;
 
 extern BOOL CLIPBOARD_ReleaseOwner(void) DECLSPEC_HIDDEN;
 extern BOOL FOCUS_MouseActivate( HWND hwnd ) DECLSPEC_HIDDEN;
-extern BOOL HOOK_IsHooked( INT id ) DECLSPEC_HIDDEN;
 extern BOOL set_capture_window( HWND hwnd, UINT gui_flags, HWND *prev_ret );
 extern void free_dce( struct dce *dce, HWND hwnd ) DECLSPEC_HIDDEN;
 extern void invalidate_dce( HWND hwnd, const RECT *rect ) DECLSPEC_HIDDEN;




More information about the wine-cvs mailing list