ReactOS 0.4.16-dev-297-gc569aee
check_env.h
Go to the documentation of this file.
1
2// Copyright (C) Alexander Telyatnikov, Ivan Keliukh, Yegor Anchishkin, SKIF Software, 1999-2013. Kiev, Ukraine
3// All rights reserved
4// This file was released under the GPLv2 on June 2015.
6
7#ifndef __CHECK_EXECUTION_ENVIRONMENT__H__
8#define __CHECK_EXECUTION_ENVIRONMENT__H__
9
10/*
11// check mode
12#ifdef NT_KERNEL_MODE
13 #ifdef NT_NATIVE_MODE
14 #error Error cannot combine Kernel and Natime
15 #endif //
16#endif //NT_KERNEL_MODE
17#ifdef NT_KERNEL_MODE
18 #if defined(NT_NATIVE_MODE) || defined(WIN_32_MODE)
19 #error !!!! Execution mode definition conflict !!!!
20 #endif //
21#endif //NT_KERNEL_MODE
22#ifdef NT_NATIVE_MODE
23 #if defined(WIN_32_MODE)
24 #error !!!! Execution mode definition conflict !!!!
25 #endif //
26#endif //NT_NATIVE_MODE
27
28// include appropriate header(s)
29#ifdef NT_KERNEL_MODE
30
31 #ifdef NT_DEV_DRV_ENV
32 #include <ntddk.h>
33 #endif //NT_DEV_DRV_ENV
34
35 #ifdef NT_FS_DRV_ENV
36 #include <ntifs.h>
37 #endif //NT_DEV_DRV_ENV
38 #include "Include/ntddk_ex.h"
39
40 #ifdef WIN_32_ENV
41 #error Error: Win32 environment is not supported in Kernel Mode
42 #endif //WIN_32_ENV
43
44#endif //NT_KERNEL_MODE
45
46#ifdef NT_NATIVE_MODE
47
48 #include "Include/nt_native.h"
49 #ifdef NT_DEV_DRV_ENV
50 #include "LibCdrw/env_spec_cdrw_w32.h"
51 #endif //NT_DEV_DRV_ENV
52
53 #ifdef NT_FS_DRV_ENV
54 #error Error: FS Driver environment is not supported in Native Mode
55 #endif //NT_DEV_DRV_ENV
56
57 #ifdef WIN_32_ENV
58 #endif //WIN_32_ENV
59
60#endif //NT_NATIVE_MODE
61
62#ifdef WIN_32_MODE
63
64 #include "windows.h"
65 #ifdef NT_DEV_DRV_ENV
66 #include "LibCdrw/env_spec_cdrw_w32.h"
67 #endif //NT_DEV_DRV_ENV
68
69 #ifdef NT_FS_DRV_ENV
70 #error Error: FS Driver environment is not supported in Win32 Mode
71 #endif //NT_DEV_DRV_ENV
72
73 #ifdef WIN_32_ENV
74 #endif //WIN_32_ENV
75
76#endif //WIN_32_MODE
77*/
78
79
80#ifdef NT_INCLUDED
81#define NT_KERNEL_MODE
82#endif //NT_INCLUDED
83
84#ifdef NT_NATIVE_MODE
85//#define USER_MODE
86#endif //NT_NATIVE_MODE
87
88// default to Win32 environment
89#if (!defined(NT_KERNEL_MODE) && !defined(NT_NATIVE_MODE)) || defined(WIN_32_MODE)
90//#warning !!!! Execution mode defaulted to WIN_32 !!!!
91//#define USER_MODE
92#define WIN_32_MODE
93#endif
94
95// check mode
96#ifdef NT_KERNEL_MODE
97 #if defined(NT_NATIVE_MODE) || defined(WIN_32_MODE)
98 #error !!!! Execution mode definition conflict !!!!
99 #endif //
100#endif //NT_KERNEL_MODE
101#ifdef NT_NATIVE_MODE
102 #if defined(WIN_32_MODE)
103 #error !!!! Execution mode definition conflict !!!!
104 #endif //
105#endif //NT_NATIVE_MODE
106
107
108#endif //__CHECK_EXECUTION_ENVIRONMENT__H__