- Reimplementation of the CommDlg ExtendedError mechanism using TLS.
[wine] / include / hook.h
1 /*
2  * Windows hook definitions
3  *
4  * Copyright 1994 Alexandre Julliard
5  */
6
7 #ifndef __WINE_HOOK_H
8 #define __WINE_HOOK_H
9
10 #include "windef.h"
11
12 #define HOOK_WIN16      0x00
13 #define HOOK_WIN32A     0x01
14 #define HOOK_WIN32W     0x02
15 #define HOOK_INUSE      0x80
16
17 typedef struct
18 {
19    LPARAM   lParam;
20    WPARAM16 wParam;
21    UINT16   message;
22    HWND16   hwnd;
23 } CWPSTRUCT16, *LPCWPSTRUCT16;
24
25 typedef struct
26 {
27   LPARAM        lParam;
28   WPARAM      wParam;
29   UINT        message;
30   HWND        hwnd;
31 } CWPSTRUCT, *LPCWPSTRUCT;
32
33
34 /* hook type mask */
35 #define HOOK_MAPTYPE (HOOK_WIN16 | HOOK_WIN32A | HOOK_WIN32W)
36
37 extern HOOKPROC16 HOOK_GetProc16( HHOOK hhook );
38 extern BOOL HOOK_IsHooked( INT16 id );
39 extern LRESULT HOOK_CallHooks16( INT16 id, INT16 code, WPARAM16 wParam,
40                                  LPARAM lParam );
41 extern LRESULT HOOK_CallHooksA( INT id, INT code, WPARAM wParam,
42                                   LPARAM lParam );
43 extern LRESULT HOOK_CallHooksW( INT id, INT code, WPARAM wParam,
44                                   LPARAM lParam );
45 extern void HOOK_FreeModuleHooks( HMODULE16 hModule );
46 extern void HOOK_FreeQueueHooks( HQUEUE16 hQueue );
47 extern void HOOK_ResetQueueHooks( HQUEUE16 hQueue );
48 extern HOOKPROC HOOK_GetProc( HHOOK hook );
49
50 #endif  /* __WINE_HOOK_H */