Michael Stefaniuc : user32: Remove duplicated get_hook_proc() function.

Alexandre Julliard julliard at winehq.org
Mon Feb 4 08:42:55 CST 2008


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

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Thu Jan 31 14:35:27 2008 +0100

user32: Remove duplicated get_hook_proc() function.

---

 dlls/user32/hook.c         |    2 +-
 dlls/user32/message.c      |   19 -------------------
 dlls/user32/user_private.h |    1 +
 3 files changed, 2 insertions(+), 20 deletions(-)

diff --git a/dlls/user32/hook.c b/dlls/user32/hook.c
index ed010a8..4354e05 100644
--- a/dlls/user32/hook.c
+++ b/dlls/user32/hook.c
@@ -314,7 +314,7 @@ static LRESULT call_hook_proc( HOOKPROC proc, INT id, INT code, WPARAM wparam, L
  *
  * Retrieve the hook procedure real value for a module-relative proc
  */
-static void *get_hook_proc( void *proc, const WCHAR *module )
+void *get_hook_proc( void *proc, const WCHAR *module )
 {
     HMODULE mod;
 
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index 67bf10e..eb0168f 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -1987,25 +1987,6 @@ static inline void call_sendmsg_callback( SENDASYNCPROC callback, HWND hwnd, UIN
 
 
 /***********************************************************************
- *		get_hook_proc
- *
- * Retrieve the hook procedure real value for a module-relative proc
- */
-static void *get_hook_proc( void *proc, const WCHAR *module )
-{
-    HMODULE mod;
-
-    if (!(mod = GetModuleHandleW(module)))
-    {
-        TRACE( "loading %s\n", debugstr_w(module) );
-        /* FIXME: the library will never be freed */
-        if (!(mod = LoadLibraryW(module))) return NULL;
-    }
-    return (char *)mod + (ULONG_PTR)proc;
-}
-
-
-/***********************************************************************
  *           peek_message
  *
  * Peek for a message matching the given parameters. Return FALSE if none available.
diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h
index 505c3ef..2f6ac68 100644
--- a/dlls/user32/user_private.h
+++ b/dlls/user32/user_private.h
@@ -235,6 +235,7 @@ extern BOOL CLIPBOARD_ReleaseOwner(void) DECLSPEC_HIDDEN;
 extern BOOL FOCUS_MouseActivate( HWND hwnd ) DECLSPEC_HIDDEN;
 extern BOOL HOOK_IsHooked( INT id ) DECLSPEC_HIDDEN;
 extern void erase_now( HWND hwnd, UINT rdw_flags ) DECLSPEC_HIDDEN;
+extern void *get_hook_proc( void *proc, const WCHAR *module );
 extern LRESULT call_current_hook( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam ) DECLSPEC_HIDDEN;
 extern BOOL map_wparam_AtoW( UINT message, WPARAM *wparam, enum wm_char_mapping mapping ) DECLSPEC_HIDDEN;
 extern LRESULT MSG_SendInternalMessageTimeout( DWORD dest_pid, DWORD dest_tid,




More information about the wine-cvs mailing list