Release 960717
[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 "windows.h"
11 #include "ldt.h"
12 #include "callback.h"
13
14 #pragma pack(1)
15
16   /* Hook data (pointed to by a HHOOK) */
17 typedef struct
18 {
19     HANDLE16   next;               /* 00 Next hook in chain */
20     HOOKPROC16 proc WINE_PACKED;   /* 02 Hook procedure */
21     INT16      id;                 /* 06 Hook id (WH_xxx) */
22     HQUEUE16   ownerQueue;         /* 08 Owner queue (0 for system hook) */
23     HMODULE16  ownerModule;        /* 0a Owner module */
24     WORD       inHookProc;         /* 0c TRUE if in this->proc */
25 } HOOKDATA;
26
27 #pragma pack(4)
28
29 #define HOOK_MAGIC  ((int)'H' | (int)'K' << 8)  /* 'HK' */
30
31 extern HANDLE16 HOOK_GetHook( INT16 id , HQUEUE16 hQueue );
32 extern LRESULT HOOK_CallHooks( INT16 id, INT16 code,
33                                WPARAM16 wParam, LPARAM lParam );
34 extern void HOOK_FreeModuleHooks( HMODULE16 hModule );
35 extern void HOOK_FreeQueueHooks( HQUEUE16 hQueue );
36
37 #endif  /* __WINE_HOOK_H */