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