Commit eda60796 authored by Alexandre Julliard's avatar Alexandre Julliard

user.exe: Call the 16-bit hook directly in SendMessage16.

parent b9673bcc
......@@ -186,6 +186,23 @@ static LRESULT wndproc_hook_callback16( HWND16 hwnd, UINT16 msg, WPARAM16 wp, LP
return ret;
}
/* helper for SendMessage16 */
void call_WH_CALLWNDPROC_hook( HWND16 hwnd, UINT16 msg, WPARAM16 wp, LPARAM lp )
{
CWPSTRUCT16 cwp;
struct hook16_queue_info *info = get_hook_info( FALSE );
if (!info->proc[WH_CALLWNDPROC - WH_MINHOOK]) return;
cwp.hwnd = hwnd;
cwp.message = msg;
cwp.wParam = wp;
cwp.lParam = lp;
lp = MapLS( &cwp );
call_hook_16( WH_CALLWNDPROC, HC_ACTION, 1, lp );
UnMapLS( lp );
}
/***********************************************************************
* call_WH_MSGFILTER
......
......@@ -39,19 +39,6 @@ DWORD USER16_AlertableWait = 0;
struct wow_handlers32 wow_handlers32;
static LRESULT cwp_hook_callback( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
LRESULT *result, void *arg )
{
CWPSTRUCT cwp;
cwp.hwnd = hwnd;
cwp.message = msg;
cwp.wParam = wp;
cwp.lParam = lp;
*result = 0;
return HOOK_CallHooks( WH_CALLWNDPROC, HC_ACTION, 1, (LPARAM)&cwp, FALSE );
}
static LRESULT send_message_callback( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
LRESULT *result, void *arg )
{
......@@ -1498,7 +1485,7 @@ LRESULT WINAPI SendMessage16( HWND16 hwnd16, UINT16 msg, WPARAM16 wparam, LPARAM
WNDPROC16 winproc;
/* first the WH_CALLWNDPROC hook */
WINPROC_CallProc16To32A( cwp_hook_callback, hwnd16, msg, wparam, lparam, &result, NULL );
call_WH_CALLWNDPROC_hook( hwnd16, msg, wparam, lparam );
if (!(winproc = (WNDPROC16)GetWindowLong16( hwnd16, GWLP_WNDPROC ))) return 0;
......
......@@ -93,7 +93,7 @@ extern LRESULT WINPROC_CallProc16To32A( winproc_callback_t callback, HWND16 hwnd
extern LRESULT WINPROC_CallProc32ATo16( winproc_callback16_t callback, HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam, LRESULT *result, void *arg ) DECLSPEC_HIDDEN;
extern LRESULT HOOK_CallHooks( INT id, INT code, WPARAM wparam, LPARAM lparam, BOOL unicode ) DECLSPEC_HIDDEN;
extern void call_WH_CALLWNDPROC_hook( HWND16 hwnd, UINT16 msg, WPARAM16 wp, LPARAM lp ) DECLSPEC_HIDDEN;
#define GET_WORD(ptr) (*(const WORD *)(ptr))
#define GET_DWORD(ptr) (*(const DWORD *)(ptr))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment