CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/external/source/win_kernel_common/windefs.h
Views: 11766
1
#ifndef _WINDEFS_H
2
#define _WINDEFS_H
3
4
// Hooray for windows API stuff being so shit including different files results in a mess
5
#pragma warning(disable: 4005) // Macro redefinition
6
7
#include <Windows.h>
8
#include <WinIoCtl.h>
9
#include <ntstatus.h>
10
11
#ifndef NT_SUCCESS
12
#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
13
#endif
14
15
#ifndef SYSTEM_INFORMATION_CLASS
16
typedef enum _SYSTEM_INFORMATION_CLASS
17
{
18
SystemBasicInformation = 0,
19
SystemProcessorInformation = 1,
20
SystemPerformanceInformation = 2,
21
SystemTimeOfDayInformation = 3,
22
SystemPathInformation = 4,
23
SystemProcessInformation = 5,
24
SystemCallCountInformation = 6,
25
SystemDeviceInformation = 7,
26
SystemProcessorPerformanceInformation = 8,
27
SystemFlagsInformation = 9,
28
SystemCallTimeInformation = 10,
29
SystemModuleInformation = 11,
30
SystemLocksInformation = 12,
31
SystemStackTraceInformation = 13,
32
SystemPagedPoolInformation = 14,
33
SystemNonPagedPoolInformation = 15,
34
SystemHandleInformation = 16,
35
SystemObjectInformation = 17,
36
SystemPageFileInformation = 18,
37
SystemVdmInstemulInformation = 19,
38
SystemVdmBopInformation = 20,
39
SystemFileCacheInformation = 21,
40
SystemPoolTagInformation = 22,
41
SystemInterruptInformation = 23,
42
SystemDpcBehaviorInformation = 24,
43
SystemFullMemoryInformation = 25,
44
SystemLoadGdiDriverInformation = 26,
45
SystemUnloadGdiDriverInformation = 27,
46
SystemTimeAdjustmentInformation = 28,
47
SystemSummaryMemoryInformation = 29,
48
SystemMirrorMemoryInformation = 30,
49
SystemPerformanceTraceInformation = 31,
50
SystemObsolete0 = 32,
51
SystemExceptionInformation = 33,
52
SystemCrashDumpStateInformation = 34,
53
SystemKernelDebuggerInformation = 35,
54
SystemContextSwitchInformation = 36,
55
SystemRegistryQuotaInformation = 37,
56
SystemExtendServiceTableInformation = 38,
57
SystemPrioritySeperation = 39,
58
SystemVerifierAddDriverInformation = 40,
59
SystemVerifierRemoveDriverInformation = 41,
60
SystemProcessorIdleInformation = 42,
61
SystemLegacyDriverInformation = 43,
62
SystemCurrentTimeZoneInformation = 44,
63
SystemLookasideInformation = 45,
64
SystemTimeSlipNotification = 46,
65
SystemSessionCreate = 47,
66
SystemSessionDetach = 48,
67
SystemSessionInformation = 49,
68
SystemRangeStartInformation = 50,
69
SystemVerifierInformation = 51,
70
SystemVerifierThunkExtend = 52,
71
SystemSessionProcessInformation = 53,
72
SystemLoadGdiDriverInSystemSpace = 54,
73
SystemNumaProcessorMap = 55,
74
SystemPrefetcherInformation = 56,
75
SystemExtendedProcessInformation = 57,
76
SystemRecommendedSharedDataAlignment = 58,
77
SystemComPlusPackage = 59,
78
SystemNumaAvailableMemory = 60,
79
SystemProcessorPowerInformation = 61,
80
SystemEmulationBasicInformation = 62,
81
SystemEmulationProcessorInformation = 63,
82
SystemExtendedHandleInformation = 64,
83
SystemLostDelayedWriteInformation = 65,
84
SystemBigPoolInformation = 66,
85
SystemSessionPoolTagInformation = 67,
86
SystemSessionMappedViewInformation = 68,
87
SystemHotpatchInformation = 69,
88
SystemObjectSecurityMode = 70,
89
SystemWatchdogTimerHandler = 71,
90
SystemWatchdogTimerInformation = 72,
91
SystemLogicalProcessorInformation = 73,
92
SystemWow64SharedInformationObsolete = 74,
93
SystemRegisterFirmwareTableInformationHandler = 75,
94
SystemFirmwareTableInformation = 76,
95
SystemModuleInformationEx = 77,
96
SystemVerifierTriageInformation = 78,
97
SystemSuperfetchInformation = 79,
98
SystemMemoryListInformation = 80,
99
SystemFileCacheInformationEx = 81,
100
SystemThreadPriorityClientIdInformation = 82,
101
SystemProcessorIdleCycleTimeInformation = 83,
102
SystemVerifierCancellationInformation = 84,
103
SystemProcessorPowerInformationEx = 85,
104
SystemRefTraceInformation = 86,
105
SystemSpecialPoolInformation = 87,
106
SystemProcessIdInformation = 88,
107
SystemErrorPortInformation = 89,
108
SystemBootEnvironmentInformation = 90,
109
SystemHypervisorInformation = 91,
110
SystemVerifierInformationEx = 92,
111
SystemTimeZoneInformation = 93,
112
SystemImageFileExecutionOptionsInformation = 94,
113
SystemCoverageInformation = 95,
114
SystemPrefetchPatchInformation = 96,
115
SystemVerifierFaultsInformation = 97,
116
SystemSystemPartitionInformation = 98,
117
SystemSystemDiskInformation = 99,
118
SystemProcessorPerformanceDistribution = 100,
119
SystemNumaProximityNodeInformation = 101,
120
SystemDynamicTimeZoneInformation = 102,
121
SystemCodeIntegrityInformation = 103,
122
SystemProcessorMicrocodeUpdateInformation = 104,
123
SystemProcessorBrandString = 105,
124
SystemVirtualAddressInformation = 106,
125
SystemLogicalProcessorAndGroupInformation = 107,
126
SystemProcessorCycleTimeInformation = 108,
127
SystemStoreInformation = 109,
128
SystemRegistryAppendString = 110,
129
SystemAitSamplingValue = 111,
130
SystemVhdBootInformation = 112,
131
SystemCpuQuotaInformation = 113,
132
SystemNativeBasicInformation = 114,
133
SystemErrorPortTimeouts = 115,
134
SystemLowPriorityIoInformation = 116,
135
SystemBootEntropyInformation = 117,
136
SystemVerifierCountersInformation = 118,
137
SystemPagedPoolInformationEx = 119,
138
SystemSystemPtesInformationEx = 120,
139
SystemNodeDistanceInformation = 121,
140
SystemAcpiAuditInformation = 122,
141
SystemBasicPerformanceInformation = 123,
142
SystemQueryPerformanceCounterInformation = 124,
143
SystemSessionBigPoolInformation = 125,
144
SystemBootGraphicsInformation = 126,
145
SystemScrubPhysicalMemoryInformation = 127,
146
SystemBadPageInformation = 128,
147
SystemProcessorProfileControlArea = 129,
148
SystemCombinePhysicalMemoryInformation = 130,
149
SystemEntropyInterruptTimingInformation = 131,
150
SystemConsoleInformation = 132,
151
SystemPlatformBinaryInformation = 133,
152
SystemPolicyInformation = 134,
153
SystemHypervisorProcessorCountInformation = 135,
154
SystemDeviceDataInformation = 136,
155
SystemDeviceDataEnumerationInformation = 137,
156
SystemMemoryTopologyInformation = 138,
157
SystemMemoryChannelInformation = 139,
158
SystemBootLogoInformation = 140,
159
SystemProcessorPerformanceInformationEx = 141,
160
SystemSpare0 = 142,
161
SystemSecureBootPolicyInformation = 143,
162
SystemPageFileInformationEx = 144,
163
SystemSecureBootInformation = 145,
164
SystemEntropyInterruptTimingRawInformation = 146,
165
SystemPortableWorkspaceEfiLauncherInformation = 147,
166
SystemFullProcessInformation = 148,
167
SystemKernelDebuggerInformationEx = 149,
168
SystemBootMetadataInformation = 150,
169
SystemSoftRebootInformation = 151,
170
SystemElamCertificateInformation = 152,
171
SystemOfflineDumpConfigInformation = 153,
172
SystemProcessorFeaturesInformation = 154,
173
SystemRegistryReconciliationInformation = 155,
174
SystemEdidInformation = 156,
175
MaxSystemInfoClass = 157
176
} SYSTEM_INFORMATION_CLASS;
177
#endif
178
179
typedef struct _RTL_PROCESS_MODULE_INFORMATION
180
{
181
HANDLE Section;
182
PVOID MappedBase;
183
PVOID ImageBase;
184
ULONG ImageSize;
185
ULONG Flags;
186
USHORT LoadOrderIndex;
187
USHORT InitOrderIndex;
188
USHORT LoadCount;
189
USHORT OffsetToFileName;
190
UCHAR FullPathName[256];
191
} RTL_PROCESS_MODULE_INFORMATION, *PRTL_PROCESS_MODULE_INFORMATION;
192
193
typedef struct _RTL_PROCESS_MODULES
194
{
195
ULONG NumberOfModules;
196
RTL_PROCESS_MODULE_INFORMATION Modules[1];
197
} RTL_PROCESS_MODULES, *PRTL_PROCESS_MODULES;
198
199
#endif
200
201