update for HEAD-2003091401
[reactos.git] / include / ntos / service.h
1
2 #ifndef __NTOS_SERVICE_H
3 #define __NTOS_SERVICE_H
4
5
6 /* number of entries in the service descriptor tables */
7 #define SSDT_MAX_ENTRIES 4
8
9
10 #ifndef __USE_W32API
11
12 #pragma pack(1)
13
14 /* System Service Dispatch Table */
15 typedef struct t_SSDT {
16                 ULONG           SysCallPtr;
17 } SSDT, *PSSDT;
18
19 /* System Service Parameters Table */
20 typedef struct t_SSPT   {
21                 unsigned int    ParamBytes;
22 } SSPT, *PSSPT;
23
24 typedef struct t_KeServiceDescriptorTableEntry {
25                 PSSDT               SSDT;
26                 PULONG              ServiceCounterTable;
27                 unsigned int        NumberOfServices;
28                 PSSPT               SSPT;
29
30 } SSDT_ENTRY, *PSSDT_ENTRY;
31
32 #pragma pack()
33
34 #endif /* __USE_W32API */
35
36
37 /* --- NTOSKRNL.EXE --- */
38 #if defined(__NTOSKRNL__)
39 extern
40 SSDT_ENTRY
41 KeServiceDescriptorTable[SSDT_MAX_ENTRIES] __declspec(dllexport);
42 #else
43 extern
44 SSDT_ENTRY
45 KeServiceDescriptorTable[SSDT_MAX_ENTRIES] __declspec(dllimport);
46 #endif
47
48 extern
49 SSDT_ENTRY
50 KeServiceDescriptorTableShadow[SSDT_MAX_ENTRIES];
51
52
53 #ifndef __USE_W32API
54
55 BOOLEAN
56 STDCALL
57 KeAddSystemServiceTable (
58         PSSDT   SSDT,
59         PULONG  ServiceCounterTable,
60         ULONG   NumberOfServices,
61         PSSPT   SSPT,
62         ULONG   TableIndex
63         );
64
65 #endif /* __USE_W32API */
66
67 #endif /* __NTOS_SERVICE_H */
68