ReactOS 0.4.15-dev-7968-g24a56f8
ntoskrnl.h
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Kernel
4 * FILE: ntoskrnl/include/ntoskrnl.h
5 * PURPOSE: Main Kernel Header
6 * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
7 */
8
9#ifndef _NTOSKRNL_PCH
10#define _NTOSKRNL_PCH
11
12/* INCLUDES ******************************************************************/
13
14/* ARM Bringup Hack */
15#ifdef _M_ARM
16#define DbgPrint DbgPrintEarly
17#endif
18
19/* WDK hacks */
20#ifdef _M_AMD64
21#define IoAllocateAdapterChannel _IoAllocateAdapterChannel
22#define KeGetCurrentThread _KeGetCurrentThread
23#define RtlFillMemoryUlong _RtlFillMemoryUlong
24#endif
25
26/* Version Data */
27#undef __MSVCRT__
28#include <psdk/ntverp.h>
29
30/* DDK/IFS/NDK Headers */
31#define _REALLY_GET_CALLERS_CALLER
32#include <excpt.h>
33#include <ntdef.h>
34#include <ntifs.h>
35#include <wdmguid.h>
36#include <diskguid.h>
37#include <arc/arc.h>
38#include <mountmgr.h>
39#undef NTHALAPI
40#define NTHALAPI __declspec(dllimport)
41#include <ndk/asm.h>
42#include <ndk/cctypes.h>
43#include <ndk/cmfuncs.h>
44#include <ndk/dbgkfuncs.h>
45#include <ndk/exfuncs.h>
46#include <ndk/halfuncs.h>
47#include <ndk/inbvfuncs.h>
48#include <ndk/iofuncs.h>
49#include <ndk/kdfuncs.h>
50#include <ndk/kefuncs.h>
51#include <ndk/ldrfuncs.h>
52#include <ndk/lpcfuncs.h>
53#include <ndk/mmfuncs.h>
54#include <ndk/muptypes.h>
55#include <ndk/obfuncs.h>
56#include <ndk/pofuncs.h>
57#include <ndk/psfuncs.h>
58#include <ndk/rtlfuncs.h>
59#include <ndk/sefuncs.h>
60#include <ndk/vftypes.h>
61
62#undef TEXT
63#define TEXT(s) L##s
64
65#define _IN_KERNEL_
66#include <regstr.h>
67
68#include <ntstrsafe.h>
69#include <ntpoapi.h>
70#define ENABLE_INTSAFE_SIGNED_FUNCTIONS
71#include <ntintsafe.h>
72#undef ENABLE_INTSAFE_SIGNED_FUNCTIONS
73
74/* C Headers */
75#include <stdlib.h>
76#include <stdio.h>
77#include <ctype.h>
78#include <malloc.h>
79#include <wchar.h>
80
81/* SEH support with PSEH */
82#include <pseh/pseh2.h>
83
84/* SetupLDR Support */
85#include <arc/setupblk.h>
86
87/* KD Support */
88#define NOEXTAPI
89#include <windbgkd.h>
90#include <wdbgexts.h>
91#include <kddll.h>
92#ifdef KDBG
93 /* Define new names for these exports also present in KDBG */
94 #define KdD0Transition KdbgD0Transition
95 #define KdD3Transition KdbgD3Transition
96 #define KdSave KdbgSave
97 #define KdRestore KdbgRestore
98 #define KdSendPacket KdbgSendPacket
99 #define KdReceivePacket KdbgReceivePacket
100 /* And reload the definitions with these new names */
101 #undef _KDDLL_
102 #include <kddll.h>
103#endif
104#ifdef __ROS_ROSSYM__
105#include <reactos/rossym.h>
106#endif
107
108/* PNP GUIDs */
109#include <umpnpmgr/sysguid.h>
110
111/* SRM header */
112#include <srmp.h>
113
114#define ExRaiseStatus RtlRaiseStatus
115
116/* Also defined in fltkernel.h, but we don't want the entire header */
117#ifndef Add2Ptr
118#define Add2Ptr(P,I) ((PVOID)((PUCHAR)(P) + (I)))
119#endif
120#ifndef PtrOffset
121#define PtrOffset(B,O) ((ULONG)((ULONG_PTR)(O) - (ULONG_PTR)(B)))
122#endif
123
124/* MAX_PATH is a Win32 concept, it doesn't belong in the kernel */
125#define MAX_WIN32_PATH 260
127#undef MAX_PATH
128
129/* Internal Headers */
130#include "config.h"
131#include "internal/ntoskrnl.h"
132
133#include <reactos/probe.h>
134#include "internal/probe.h"
135#include "resource.h"
136
137/* Internal Ps alignment probing header */
138#include "internal/ps_i.h"
139
140#ifdef _MSC_VER
141# pragma section("INITDATA", read,write,discard)
142#endif
143
144#endif /* _NTOSKRNL_PCH */
#define MAX_PATH
Definition: compat.h:34
#define C_ASSERT(e)
Definition: intsafe.h:73
#define MAX_WIN32_PATH
Definition: ntoskrnl.h:125