xinput1_3: Move HID data into struct xinput_controller.
[wine.git] / dlls / user.exe16 / hook.c
blobd140e16e4261cef5017e724903225a2a92683b19
1 /*
2 * Windows 16-bit hook functions
4 * Copyright 1994, 1995, 2002 Alexandre Julliard
5 * Copyright 1996 Andrew Lewycky
7 * Based on investigations by Alex Korobka
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24 #include <stdarg.h>
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winuser.h"
29 #include "wownt32.h"
30 #include "wine/winuser16.h"
31 #include "user_private.h"
32 #include "wine/debug.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(hook);
37 static LRESULT CALLBACK call_WH_MSGFILTER( INT code, WPARAM wp, LPARAM lp );
38 static LRESULT CALLBACK call_WH_KEYBOARD( INT code, WPARAM wp, LPARAM lp );
39 static LRESULT CALLBACK call_WH_GETMESSAGE( INT code, WPARAM wp, LPARAM lp );
40 static LRESULT CALLBACK call_WH_CALLWNDPROC( INT code, WPARAM wp, LPARAM lp );
41 static LRESULT CALLBACK call_WH_CBT( INT code, WPARAM wp, LPARAM lp );
42 static LRESULT CALLBACK call_WH_MOUSE( INT code, WPARAM wp, LPARAM lp );
43 static LRESULT CALLBACK call_WH_SHELL( INT code, WPARAM wp, LPARAM lp );
45 #define WH_MAXHOOK16 WH_SHELL /* Win16 only supports up to WH_SHELL */
46 #define NB_HOOKS16 (WH_MAXHOOK16 - WH_MINHOOK + 1)
48 static const HOOKPROC hook_procs[NB_HOOKS16] =
50 call_WH_MSGFILTER, /* WH_MSGFILTER */
51 NULL, /* WH_JOURNALRECORD */
52 NULL, /* WH_JOURNALPLAYBACK */
53 call_WH_KEYBOARD, /* WH_KEYBOARD */
54 call_WH_GETMESSAGE, /* WH_GETMESSAGE */
55 call_WH_CALLWNDPROC, /* WH_CALLWNDPROC */
56 call_WH_CBT, /* WH_CBT */
57 NULL, /* WH_SYSMSGFILTER */
58 call_WH_MOUSE, /* WH_MOUSE */
59 NULL, /* WH_HARDWARE */
60 NULL, /* WH_DEBUG */
61 call_WH_SHELL /* WH_SHELL */
65 struct hook16_queue_info
67 INT id; /* id of current hook */
68 HHOOK hook[NB_HOOKS16]; /* Win32 hook handles */
69 HOOKPROC16 proc[NB_HOOKS16]; /* 16-bit hook procedures */
72 static struct hook16_queue_info *get_hook_info( BOOL create )
74 static DWORD hook_tls = TLS_OUT_OF_INDEXES;
75 struct hook16_queue_info *info = TlsGetValue( hook_tls );
77 if (!info && create)
79 if (hook_tls == TLS_OUT_OF_INDEXES) hook_tls = TlsAlloc();
80 info = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*info) );
81 TlsSetValue( hook_tls, info );
83 return info;
87 /***********************************************************************
88 * map_msg_16_to_32
90 static inline void map_msg_16_to_32( const MSG16 *msg16, MSG *msg32 )
92 msg32->hwnd = WIN_Handle32(msg16->hwnd);
93 msg32->message = msg16->message;
94 msg32->wParam = msg16->wParam;
95 msg32->lParam = msg16->lParam;
96 msg32->time = msg16->time;
97 msg32->pt.x = msg16->pt.x;
98 msg32->pt.y = msg16->pt.y;
102 /***********************************************************************
103 * map_msg_32_to_16
105 static inline void map_msg_32_to_16( const MSG *msg32, MSG16 *msg16 )
107 msg16->hwnd = HWND_16(msg32->hwnd);
108 msg16->message = msg32->message;
109 msg16->wParam = msg32->wParam;
110 msg16->lParam = msg32->lParam;
111 msg16->time = msg32->time;
112 msg16->pt.x = msg32->pt.x;
113 msg16->pt.y = msg32->pt.y;
117 /***********************************************************************
118 * call_hook_16
120 static LRESULT call_hook_16( INT id, INT code, WPARAM wp, LPARAM lp )
122 struct hook16_queue_info *info = get_hook_info( FALSE );
123 WORD args[4];
124 DWORD ret;
125 INT prev_id = info->id;
126 info->id = id;
128 args[3] = code;
129 args[2] = wp;
130 args[1] = HIWORD(lp);
131 args[0] = LOWORD(lp);
132 WOWCallback16Ex( (DWORD)info->proc[id - WH_MINHOOK], WCB16_PASCAL, sizeof(args), args, &ret );
134 info->id = prev_id;
136 /* Grrr. While the hook procedure is supposed to have an LRESULT return
137 value even in Win16, it seems that for those hook types where the
138 return value is interpreted as BOOL, Windows doesn't actually check
139 the HIWORD ... Some buggy Win16 programs, notably WINFILE, rely on
140 that, because they neglect to clear DX ... */
141 if (id != WH_JOURNALPLAYBACK) ret = LOWORD( ret );
142 return ret;
146 struct wndproc_hook_params
148 HHOOK hhook;
149 INT code;
150 WPARAM wparam;
153 /* callback for WINPROC_Call16To32A */
154 static LRESULT wndproc_hook_callback( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
155 LRESULT *result, void *arg )
157 struct wndproc_hook_params *params = arg;
158 CWPSTRUCT cwp;
160 cwp.hwnd = hwnd;
161 cwp.message = msg;
162 cwp.wParam = wp;
163 cwp.lParam = lp;
164 *result = 0;
165 return CallNextHookEx( params->hhook, params->code, params->wparam, (LPARAM)&cwp );
168 /* callback for WINPROC_Call32ATo16 */
169 static LRESULT wndproc_hook_callback16( HWND16 hwnd, UINT16 msg, WPARAM16 wp, LPARAM lp,
170 LRESULT *result, void *arg )
172 struct wndproc_hook_params *params = arg;
173 CWPSTRUCT16 cwp;
174 LRESULT ret;
176 cwp.hwnd = hwnd;
177 cwp.message = msg;
178 cwp.wParam = wp;
179 cwp.lParam = lp;
181 lp = MapLS( &cwp );
182 ret = call_hook_16( WH_CALLWNDPROC, params->code, params->wparam, lp );
183 UnMapLS( lp );
185 *result = 0;
186 return ret;
189 /* helper for SendMessage16 */
190 void call_WH_CALLWNDPROC_hook( HWND16 hwnd, UINT16 msg, WPARAM16 wp, LPARAM lp )
192 CWPSTRUCT16 cwp;
193 struct hook16_queue_info *info = get_hook_info( FALSE );
195 if (!info || !info->proc[WH_CALLWNDPROC - WH_MINHOOK]) return;
197 cwp.hwnd = hwnd;
198 cwp.message = msg;
199 cwp.wParam = wp;
200 cwp.lParam = lp;
202 lp = MapLS( &cwp );
203 call_hook_16( WH_CALLWNDPROC, HC_ACTION, 1, lp );
204 UnMapLS( lp );
207 /***********************************************************************
208 * call_WH_MSGFILTER
210 static LRESULT CALLBACK call_WH_MSGFILTER( INT code, WPARAM wp, LPARAM lp )
212 MSG *msg32 = (MSG *)lp;
213 MSG16 msg16;
214 LRESULT ret;
216 map_msg_32_to_16( msg32, &msg16 );
217 lp = MapLS( &msg16 );
218 ret = call_hook_16( WH_MSGFILTER, code, wp, lp );
219 UnMapLS( lp );
220 return ret;
224 /***********************************************************************
225 * call_WH_KEYBOARD
227 static LRESULT CALLBACK call_WH_KEYBOARD( INT code, WPARAM wp, LPARAM lp )
229 return call_hook_16( WH_KEYBOARD, code, wp, lp );
233 /***********************************************************************
234 * call_WH_GETMESSAGE
236 static LRESULT CALLBACK call_WH_GETMESSAGE( INT code, WPARAM wp, LPARAM lp )
238 MSG *msg32 = (MSG *)lp;
239 MSG16 msg16;
240 LRESULT ret;
242 map_msg_32_to_16( msg32, &msg16 );
244 lp = MapLS( &msg16 );
245 ret = call_hook_16( WH_GETMESSAGE, code, wp, lp );
246 UnMapLS( lp );
248 map_msg_16_to_32( &msg16, msg32 );
249 return ret;
253 /***********************************************************************
254 * call_WH_CALLWNDPROC
256 static LRESULT CALLBACK call_WH_CALLWNDPROC( INT code, WPARAM wp, LPARAM lp )
258 struct wndproc_hook_params params;
259 CWPSTRUCT *cwp32 = (CWPSTRUCT *)lp;
260 LRESULT result;
262 params.code = code;
263 params.wparam = wp;
264 return WINPROC_CallProc32ATo16( wndproc_hook_callback16, cwp32->hwnd, cwp32->message,
265 cwp32->wParam, cwp32->lParam, &result, &params );
269 /***********************************************************************
270 * call_WH_CBT
272 static LRESULT CALLBACK call_WH_CBT( INT code, WPARAM wp, LPARAM lp )
274 LRESULT ret = 0;
276 switch (code)
278 case HCBT_CREATEWND:
280 CBT_CREATEWNDA *cbtcw32 = (CBT_CREATEWNDA *)lp;
281 CBT_CREATEWND16 cbtcw16;
282 CREATESTRUCT16 cs16;
284 cs16.lpCreateParams = (SEGPTR)cbtcw32->lpcs->lpCreateParams;
285 cs16.hInstance = HINSTANCE_16(cbtcw32->lpcs->hInstance);
286 cs16.hMenu = HMENU_16(cbtcw32->lpcs->hMenu);
287 cs16.hwndParent = HWND_16(cbtcw32->lpcs->hwndParent);
288 cs16.cy = cbtcw32->lpcs->cy;
289 cs16.cx = cbtcw32->lpcs->cx;
290 cs16.y = cbtcw32->lpcs->y;
291 cs16.x = cbtcw32->lpcs->x;
292 cs16.style = cbtcw32->lpcs->style;
293 cs16.lpszName = MapLS( cbtcw32->lpcs->lpszName );
294 cs16.lpszClass = MapLS( cbtcw32->lpcs->lpszClass );
295 cs16.dwExStyle = cbtcw32->lpcs->dwExStyle;
297 cbtcw16.lpcs = (CREATESTRUCT16 *)MapLS( &cs16 );
298 cbtcw16.hwndInsertAfter = HWND_16( cbtcw32->hwndInsertAfter );
300 lp = MapLS( &cbtcw16 );
301 ret = call_hook_16( WH_CBT, code, wp, lp );
302 UnMapLS( cs16.lpszName );
303 UnMapLS( cs16.lpszClass );
305 cbtcw32->hwndInsertAfter = WIN_Handle32( cbtcw16.hwndInsertAfter );
306 UnMapLS( (SEGPTR)cbtcw16.lpcs );
307 UnMapLS( lp );
308 break;
311 case HCBT_ACTIVATE:
313 CBTACTIVATESTRUCT *cas32 = (CBTACTIVATESTRUCT *)lp;
314 CBTACTIVATESTRUCT16 cas16;
316 cas16.fMouse = cas32->fMouse;
317 cas16.hWndActive = HWND_16( cas32->hWndActive );
319 lp = MapLS( &cas16 );
320 ret = call_hook_16( WH_CBT, code, wp, lp );
321 UnMapLS( lp );
322 break;
324 case HCBT_CLICKSKIPPED:
326 MOUSEHOOKSTRUCT *ms32 = (MOUSEHOOKSTRUCT *)lp;
327 MOUSEHOOKSTRUCT16 ms16;
329 ms16.pt.x = ms32->pt.x;
330 ms16.pt.y = ms32->pt.y;
331 ms16.hwnd = HWND_16( ms32->hwnd );
332 ms16.wHitTestCode = ms32->wHitTestCode;
333 ms16.dwExtraInfo = ms32->dwExtraInfo;
335 lp = MapLS( &ms16 );
336 ret = call_hook_16( WH_CBT, code, wp, lp );
337 UnMapLS( lp );
338 break;
340 case HCBT_MOVESIZE:
342 RECT *rect32 = (RECT *)lp;
343 RECT16 rect16;
345 rect16.left = rect32->left;
346 rect16.top = rect32->top;
347 rect16.right = rect32->right;
348 rect16.bottom = rect32->bottom;
349 lp = MapLS( &rect16 );
350 ret = call_hook_16( WH_CBT, code, wp, lp );
351 UnMapLS( lp );
352 break;
355 return ret;
359 /***********************************************************************
360 * call_WH_MOUSE
362 static LRESULT CALLBACK call_WH_MOUSE( INT code, WPARAM wp, LPARAM lp )
364 MOUSEHOOKSTRUCT *ms32 = (MOUSEHOOKSTRUCT *)lp;
365 MOUSEHOOKSTRUCT16 ms16;
366 LRESULT ret;
368 ms16.pt.x = ms32->pt.x;
369 ms16.pt.y = ms32->pt.y;
370 ms16.hwnd = HWND_16( ms32->hwnd );
371 ms16.wHitTestCode = ms32->wHitTestCode;
372 ms16.dwExtraInfo = ms32->dwExtraInfo;
374 lp = MapLS( &ms16 );
375 ret = call_hook_16( WH_MOUSE, code, wp, lp );
376 UnMapLS( lp );
377 return ret;
381 /***********************************************************************
382 * call_WH_SHELL
384 static LRESULT CALLBACK call_WH_SHELL( INT code, WPARAM wp, LPARAM lp )
386 return call_hook_16( WH_SHELL, code, wp, lp );
390 /***********************************************************************
391 * SetWindowsHook (USER.121)
393 FARPROC16 WINAPI SetWindowsHook16( INT16 id, HOOKPROC16 proc )
395 HINSTANCE16 hInst = FarGetOwner16( HIWORD(proc) );
397 /* WH_MSGFILTER is the only task-specific hook for SetWindowsHook() */
398 HTASK16 hTask = (id == WH_MSGFILTER) ? GetCurrentTask() : 0;
400 return (FARPROC16)SetWindowsHookEx16( id, proc, hInst, hTask );
404 /***********************************************************************
405 * SetWindowsHookEx (USER.291)
407 HHOOK WINAPI SetWindowsHookEx16( INT16 id, HOOKPROC16 proc, HINSTANCE16 hInst, HTASK16 hTask )
409 struct hook16_queue_info *info;
410 HHOOK hook;
411 int index = id - WH_MINHOOK;
413 if (id < WH_MINHOOK || id > WH_MAXHOOK16) return 0;
414 if (!hook_procs[index])
416 FIXME( "hook type %d broken in Win16\n", id );
417 return 0;
419 if (!hTask) FIXME( "System-global hooks (%d) broken in Win16\n", id );
420 else if (hTask != GetCurrentTask())
422 FIXME( "setting hook (%d) on other task not supported\n", id );
423 return 0;
426 if (!(info = get_hook_info( TRUE ))) return 0;
427 if (info->hook[index])
429 FIXME( "Multiple hooks (%d) for the same task not supported yet\n", id );
430 return 0;
432 if (!(hook = SetWindowsHookExA( id, hook_procs[index], 0, GetCurrentThreadId() ))) return 0;
433 info->hook[index] = hook;
434 info->proc[index] = proc;
435 return hook;
439 /***********************************************************************
440 * UnhookWindowsHook (USER.234)
442 BOOL16 WINAPI UnhookWindowsHook16( INT16 id, HOOKPROC16 proc )
444 struct hook16_queue_info *info;
445 int index = id - WH_MINHOOK;
447 if (id < WH_MINHOOK || id > WH_MAXHOOK16) return FALSE;
448 if (!(info = get_hook_info( FALSE ))) return FALSE;
449 if (info->proc[index] != proc) return FALSE;
450 if (!UnhookWindowsHookEx( info->hook[index] )) return FALSE;
451 info->hook[index] = 0;
452 info->proc[index] = 0;
453 return TRUE;
457 /***********************************************************************
458 * UnhookWindowsHookEx (USER.292)
460 BOOL16 WINAPI UnhookWindowsHookEx16( HHOOK hhook )
462 struct hook16_queue_info *info;
463 int index;
465 if (!(info = get_hook_info( FALSE ))) return FALSE;
466 for (index = 0; index < NB_HOOKS16; index++)
468 if (info->hook[index] == hhook)
470 info->hook[index] = 0;
471 info->proc[index] = 0;
472 return UnhookWindowsHookEx( hhook );
475 return FALSE;
479 /***********************************************************************
480 * CallMsgFilter32 (USER.823)
482 BOOL16 WINAPI CallMsgFilter32_16( MSG32_16 *lpmsg16_32, INT16 code, BOOL16 wHaveParamHigh )
484 MSG msg32;
485 BOOL16 ret;
487 if (GetSysModalWindow16()) return FALSE;
488 msg32.hwnd = WIN_Handle32( lpmsg16_32->msg.hwnd );
489 msg32.message = lpmsg16_32->msg.message;
490 msg32.lParam = lpmsg16_32->msg.lParam;
491 msg32.time = lpmsg16_32->msg.time;
492 msg32.pt.x = lpmsg16_32->msg.pt.x;
493 msg32.pt.y = lpmsg16_32->msg.pt.y;
494 if (wHaveParamHigh) msg32.wParam = MAKELONG(lpmsg16_32->msg.wParam, lpmsg16_32->wParamHigh);
495 else msg32.wParam = lpmsg16_32->msg.wParam;
497 ret = (BOOL16)CallMsgFilterA(&msg32, code);
499 lpmsg16_32->msg.hwnd = HWND_16( msg32.hwnd );
500 lpmsg16_32->msg.message = msg32.message;
501 lpmsg16_32->msg.wParam = LOWORD(msg32.wParam);
502 lpmsg16_32->msg.lParam = msg32.lParam;
503 lpmsg16_32->msg.time = msg32.time;
504 lpmsg16_32->msg.pt.x = msg32.pt.x;
505 lpmsg16_32->msg.pt.y = msg32.pt.y;
506 if (wHaveParamHigh) lpmsg16_32->wParamHigh = HIWORD(msg32.wParam);
507 return ret;
511 /***********************************************************************
512 * CallMsgFilter (USER.123)
514 BOOL16 WINAPI CallMsgFilter16( MSG16 *msg, INT16 code )
516 return CallMsgFilter32_16( (MSG32_16 *)msg, code, FALSE );
520 /***********************************************************************
521 * CallNextHookEx (USER.293)
523 LRESULT WINAPI CallNextHookEx16( HHOOK hhook, INT16 code, WPARAM16 wparam, LPARAM lparam )
525 struct hook16_queue_info *info;
526 LRESULT ret = 0;
528 if (!(info = get_hook_info( FALSE ))) return 0;
530 switch (info->id)
532 case WH_MSGFILTER:
534 MSG16 *msg16 = MapSL(lparam);
535 MSG msg32;
537 map_msg_16_to_32( msg16, &msg32 );
538 ret = CallNextHookEx( hhook, code, wparam, (LPARAM)&msg32 );
539 break;
542 case WH_GETMESSAGE:
544 MSG16 *msg16 = MapSL(lparam);
545 MSG msg32;
547 map_msg_16_to_32( msg16, &msg32 );
548 ret = CallNextHookEx( hhook, code, wparam, (LPARAM)&msg32 );
549 map_msg_32_to_16( &msg32, msg16 );
550 break;
553 case WH_CALLWNDPROC:
555 CWPSTRUCT16 *cwp16 = MapSL(lparam);
556 LRESULT result;
557 struct wndproc_hook_params params;
559 params.hhook = hhook;
560 params.code = code;
561 params.wparam = wparam;
562 ret = WINPROC_CallProc16To32A( wndproc_hook_callback, cwp16->hwnd, cwp16->message,
563 cwp16->wParam, cwp16->lParam, &result, &params );
564 break;
567 case WH_CBT:
568 switch (code)
570 case HCBT_CREATEWND:
572 CBT_CREATEWNDA cbtcw32;
573 CREATESTRUCTA cs32;
574 CBT_CREATEWND16 *cbtcw16 = MapSL(lparam);
575 CREATESTRUCT16 *cs16 = MapSL( (SEGPTR)cbtcw16->lpcs );
577 cbtcw32.lpcs = &cs32;
578 cbtcw32.hwndInsertAfter = WIN_Handle32( cbtcw16->hwndInsertAfter );
580 cs32.lpCreateParams = (LPVOID)cs16->lpCreateParams;
581 cs32.hInstance = HINSTANCE_32(cs16->hInstance);
582 cs32.hMenu = HMENU_32(cs16->hMenu);
583 cs32.hwndParent = WIN_Handle32(cs16->hwndParent);
584 cs32.cy = cs16->cy;
585 cs32.cx = cs16->cx;
586 cs32.y = cs16->y;
587 cs32.x = cs16->x;
588 cs32.style = cs16->style;
589 cs32.lpszName = MapSL( cs16->lpszName );
590 cs32.lpszClass = MapSL( cs16->lpszClass );
591 cs32.dwExStyle = cs16->dwExStyle;
593 ret = CallNextHookEx( hhook, code, wparam, (LPARAM)&cbtcw32 );
594 cbtcw16->hwndInsertAfter = HWND_16( cbtcw32.hwndInsertAfter );
595 break;
597 case HCBT_ACTIVATE:
599 CBTACTIVATESTRUCT16 *cas16 = MapSL(lparam);
600 CBTACTIVATESTRUCT cas32;
601 cas32.fMouse = cas16->fMouse;
602 cas32.hWndActive = WIN_Handle32(cas16->hWndActive);
603 ret = CallNextHookEx( hhook, code, wparam, (LPARAM)&cas32 );
604 break;
606 case HCBT_CLICKSKIPPED:
608 MOUSEHOOKSTRUCT16 *ms16 = MapSL(lparam);
609 MOUSEHOOKSTRUCT ms32;
611 ms32.pt.x = ms16->pt.x;
612 ms32.pt.y = ms16->pt.y;
613 /* wHitTestCode may be negative, so convince compiler to do
614 correct sign extension. Yay. :| */
615 ms32.wHitTestCode = (INT)(INT16)ms16->wHitTestCode;
616 ms32.dwExtraInfo = ms16->dwExtraInfo;
617 ms32.hwnd = WIN_Handle32( ms16->hwnd );
618 ret = CallNextHookEx( hhook, code, wparam, (LPARAM)&ms32 );
619 break;
621 case HCBT_MOVESIZE:
623 RECT16 *rect16 = MapSL(lparam);
624 RECT rect32;
626 rect32.left = rect16->left;
627 rect32.top = rect16->top;
628 rect32.right = rect16->right;
629 rect32.bottom = rect16->bottom;
630 ret = CallNextHookEx( hhook, code, wparam, (LPARAM)&rect32 );
631 break;
634 break;
636 case WH_MOUSE:
638 MOUSEHOOKSTRUCT16 *ms16 = MapSL(lparam);
639 MOUSEHOOKSTRUCT ms32;
641 ms32.pt.x = ms16->pt.x;
642 ms32.pt.y = ms16->pt.y;
643 /* wHitTestCode may be negative, so convince compiler to do
644 correct sign extension. Yay. :| */
645 ms32.wHitTestCode = (INT)((INT16)ms16->wHitTestCode);
646 ms32.dwExtraInfo = ms16->dwExtraInfo;
647 ms32.hwnd = WIN_Handle32(ms16->hwnd);
648 ret = CallNextHookEx( hhook, code, wparam, (LPARAM)&ms32 );
649 break;
652 case WH_SHELL:
653 case WH_KEYBOARD:
654 ret = CallNextHookEx( hhook, code, wparam, lparam );
655 break;
657 case WH_HARDWARE:
658 case WH_FOREGROUNDIDLE:
659 case WH_CALLWNDPROCRET:
660 case WH_SYSMSGFILTER:
661 case WH_JOURNALRECORD:
662 case WH_JOURNALPLAYBACK:
663 default:
664 FIXME("\t[%i] 16to32 translation unimplemented\n", info->id);
665 ret = CallNextHookEx( hhook, code, wparam, lparam );
666 break;
668 return ret;
672 /***********************************************************************
673 * DefHookProc (USER.235)
675 LRESULT WINAPI DefHookProc16( INT16 code, WPARAM16 wparam, LPARAM lparam, HHOOK *hhook )
677 return CallNextHookEx16( *hhook, code, wparam, lparam );