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