From 1bee9f4f7181e1dd0f3377726302f57435e14103 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 22 Dec 2009 17:44:37 +0100 Subject: [PATCH] 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 916c37e4c1e..386a5850fbe 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 */ @@ -440,18 +453,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.@) */ diff --git a/dlls/user32/msg16.c b/dlls/user32/msg16.c index 710dfa083bd..1d96738dfad 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 47dcbb7c5b5..33d683b59cf 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;