This repository has been archived by the owner on Jan 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 52
/
Wdk.h
79 lines (62 loc) · 1.74 KB
/
Wdk.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#pragma once
#pragma warning(push)
#pragma warning(disable: 4201)
/* wdm */
#if !defined(_WDMDDK_) && !defined(__FLTKERNEL__)
#error "Must include <wdm.h> or <FltKernel.h>"
#endif
#if defined(_WDM_INCLUDED_)
#error "Must first include <ntddk.h>"
#endif
/* sys */
#include <intrin.h>
#include <stdlib.h>
#include <ntimage.h>
/* ext */
#include "Wdk\Native.inl"
#include "Wdk\CmKernel.inl"
#include "Wdk\DbgKernel.inl"
#include "Wdk\ExKernel.inl"
#include "Wdk\FsKernel.inl"
#include "Wdk\IoKernel.inl"
#include "Wdk\KeKernel.inl"
#include "Wdk\LPCKernel.inl"
#include "Wdk\MmKernel.inl"
#include "Wdk\ObKernel.inl"
#include "Wdk\PsKernel.inl"
#include "Wdk\TsKernel.inl"
#include "Wdk\RtlKernel.inl"
#include "Wdk\SeKernel.inl"
#include "Wdk\WmiKernel.inl"
#include "Wdk\NetKernel.inl"
#include "Wdk\ZwKernel.inl"
namespace wdk
{
inline auto WdkInitSystem() -> NTSTATUS
{
#define SuccessCheck$(x) if (!NT_SUCCESS(vStatus = (x))) break
auto vStatus = STATUS_SUCCESS;
for (;;)
{
SuccessCheck$(RtlInitSystem());
SuccessCheck$(CmInitSystem());
SuccessCheck$(DbgInitSystem());
SuccessCheck$(ExInitSystem());
SuccessCheck$(FsInitSystem());
SuccessCheck$(IoInitSystem());
SuccessCheck$(KeInitSystem());
SuccessCheck$(LPCInitSystem());
SuccessCheck$(MmInitSystem());
SuccessCheck$(ObInitSystem());
SuccessCheck$(PsInitSystem());
SuccessCheck$(TsInitSystem());
SuccessCheck$(SeInitSystem());
SuccessCheck$(WmiInitSystem());
SuccessCheck$(ZwInitSystem());
break;
}
return vStatus;
#undef SuccessCheck$
}
}
#pragma warning(pop)