Reactos
1/*++ NDK Version: 0098
2
3Copyright (c) Alex Ionescu. All rights reserved.
4
5Header Name:
6
7 extypes.h
8
9Abstract:
10
11 Type definitions for the Executive.
12
13Author:
14
15 Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
16
17--*/
18
19#ifndef _EXTYPES_H
20#define _EXTYPES_H
21
22//
23// Dependencies
24//
25#include <umtypes.h>
26#include <cfg.h>
27#if !defined(NTOS_MODE_USER)
28#include <ntimage.h>
29#endif
30#include <cmtypes.h>
31#include <ketypes.h>
32#include <potypes.h>
33#include <lpctypes.h>
34#ifdef NTOS_MODE_USER
35#include <obtypes.h>
36#endif
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42//
43// GCC compatibility
44//
45#if defined(__GNUC__)
46#define __ALIGNED(n) __attribute__((aligned (n)))
47#elif defined(_MSC_VER)
48#define __ALIGNED(n) __declspec(align(n))
49#else
50#error __ALIGNED not defined for your compiler!
51#endif
52
53//
54// Rtl Atom
55//
56typedef USHORT RTL_ATOM, *PRTL_ATOM;
57
58#ifndef NTOS_MODE_USER
59
60//
61// Kernel Exported Object Types
62//
63extern POBJECT_TYPE NTSYSAPI ExDesktopObjectType;
64extern POBJECT_TYPE NTSYSAPI ExWindowStationObjectType;
65extern POBJECT_TYPE NTSYSAPI ExIoCompletionType;
66extern POBJECT_TYPE NTSYSAPI ExMutantObjectType;
67extern POBJECT_TYPE NTSYSAPI ExTimerType;
68
69//
70// Exported NT Build Number
71//
72extern ULONG NTSYSAPI NtBuildNumber;
73
74//
75// Invalid Handle Value Constant
76//
77#define INVALID_HANDLE_VALUE (HANDLE)-1
78
79#endif
80
81//
82// Increments
83//
84#define MUTANT_INCREMENT 1
85
86//
87// Callback Object Access Mask
88//
89#define CALLBACK_MODIFY_STATE 0x0001
90#define CALLBACK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \
91 SYNCHRONIZE | \
92 CALLBACK_MODIFY_STATE)
93
94//
95// Event Object Access Masks
96//
97#ifdef NTOS_MODE_USER
98#define EVENT_QUERY_STATE 0x0001
99
100//
101// Semaphore Object Access Masks
102//
103#define SEMAPHORE_QUERY_STATE 0x0001
104#else
105
106//
107// Mutant Object Access Masks
108//
109#define MUTANT_QUERY_STATE 0x0001
110#define MUTANT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \
111 SYNCHRONIZE | \
112 MUTANT_QUERY_STATE)
113
114#define TIMER_QUERY_STATE 0x0001
115#define TIMER_MODIFY_STATE 0x0002
116#define TIMER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \
117 SYNCHRONIZE | \
118 TIMER_QUERY_STATE | \
119 TIMER_MODIFY_STATE)
120#endif
121
122//
123// Event Pair Access Masks
124//
125#define EVENT_PAIR_ALL_ACCESS 0x1F0000L
126
127//
128// Profile Object Access Masks
129//
130#define PROFILE_CONTROL 0x0001
131#define PROFILE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | PROFILE_CONTROL)
132
133//
134// Keyed Event Object Access Masks
135//
136#define KEYEDEVENT_WAIT 0x0001
137#define KEYEDEVENT_WAKE 0x0002
138#define KEYEDEVENT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \
139 KEYEDEVENT_WAIT | \
140 KEYEDEVENT_WAKE)
141
142//
143// NtRaiseHardError-related parameters
144//
145#define MAXIMUM_HARDERROR_PARAMETERS 5
146#define HARDERROR_OVERRIDE_ERRORMODE 0x10000000
147
148//
149// Pushlock bits
150//
151#define EX_PUSH_LOCK_LOCK_V ((ULONG_PTR)0x0)
152#define EX_PUSH_LOCK_LOCK ((ULONG_PTR)0x1)
153#define EX_PUSH_LOCK_WAITING ((ULONG_PTR)0x2)
154#define EX_PUSH_LOCK_WAKING ((ULONG_PTR)0x4)
155#define EX_PUSH_LOCK_MULTIPLE_SHARED ((ULONG_PTR)0x8)
156#define EX_PUSH_LOCK_SHARE_INC ((ULONG_PTR)0x10)
157#define EX_PUSH_LOCK_PTR_BITS ((ULONG_PTR)0xf)
158
159//
160// Pushlock Wait Block Flags
161//
162#define EX_PUSH_LOCK_FLAGS_EXCLUSIVE 1
163#define EX_PUSH_LOCK_FLAGS_WAIT_V 1
164#define EX_PUSH_LOCK_FLAGS_WAIT 2
165
166//
167// Resource (ERESOURCE) Flags
168//
169#define ResourceHasDisabledPriorityBoost 0x08
170
171//
172// Shutdown types for NtShutdownSystem
173//
174typedef enum _SHUTDOWN_ACTION
175{
176 ShutdownNoReboot,
177 ShutdownReboot,
178 ShutdownPowerOff
179} SHUTDOWN_ACTION;
180
181//
182// Responses for NtRaiseHardError
183//
184typedef enum _HARDERROR_RESPONSE_OPTION
185{
186 OptionAbortRetryIgnore,
187 OptionOk,
188 OptionOkCancel,
189 OptionRetryCancel,
190 OptionYesNo,
191 OptionYesNoCancel,
192 OptionShutdownSystem,
193 OptionOkNoWait,
194 OptionCancelTryContinue
195} HARDERROR_RESPONSE_OPTION, *PHARDERROR_RESPONSE_OPTION;
196
197typedef enum _HARDERROR_RESPONSE
198{
199 ResponseReturnToCaller,
200 ResponseNotHandled,
201 ResponseAbort,
202 ResponseCancel,
203 ResponseIgnore,
204 ResponseNo,
205 ResponseOk,
206 ResponseRetry,
207 ResponseYes,
208 ResponseTryAgain,
209 ResponseContinue
210} HARDERROR_RESPONSE, *PHARDERROR_RESPONSE;
211
212//
213// System Information Classes for NtQuerySystemInformation
214//
215typedef enum _SYSTEM_INFORMATION_CLASS
216{
217 SystemBasicInformation = 0, // 0x0
218 SystemProcessorInformation = 1, // 0x1
219 SystemPerformanceInformation = 2, // 0x2
220 SystemTimeOfDayInformation = 3, // 0x3
221 SystemPathInformation = 4, // 0x4 - Obsolete: Use KUSER_SHARED_DATA
222 SystemProcessInformation = 5, // 0x5
223 SystemCallCountInformation = 6, // 0x6
224 SystemDeviceInformation = 7, // 0x7
225 SystemProcessorPerformanceInformation = 8, // 0x8
226 SystemFlagsInformation = 9, // 0x9
227 SystemCallTimeInformation = 10, // 0xA
228 SystemModuleInformation = 11, // 0xB
229 SystemLocksInformation = 12, // 0xC
230 SystemStackTraceInformation = 13, // 0xD
231 SystemPagedPoolInformation = 14, // 0xE
232 SystemNonPagedPoolInformation = 15, // 0xF
233 SystemHandleInformation = 16, // 0x10
234 SystemObjectInformation = 17, // 0x11
235 SystemPageFileInformation = 18, // 0x12
236 SystemVdmInstemulInformation = 19, // 0x13
237 SystemVdmBopInformation = 20, // 0x14
238 SystemFileCacheInformation = 21, // 0x15
239 SystemPoolTagInformation = 22, // 0x16
240 SystemInterruptInformation = 23, // 0x17
241 SystemDpcBehaviorInformation = 24, // 0x18
242 SystemFullMemoryInformation = 25, // 0x19
243 SystemLoadGdiDriverInformation = 26, // 0x1A
244 SystemUnloadGdiDriverInformation = 27, // 0x1B
245 SystemTimeAdjustmentInformation = 28, // 0x1C
246 SystemSummaryMemoryInformation = 29, // 0x1D
247 SystemMirrorMemoryInformation = 30, // 0x1E
248 SystemPerformanceTraceInformation = 31, // 0x1F
249 SystemObsolete0 = 32, // 0x20
250 SystemExceptionInformation = 33, // 0x21
251 SystemCrashDumpStateInformation = 34, // 0x22
252 SystemKernelDebuggerInformation = 35, // 0x23
253 SystemContextSwitchInformation = 36, // 0x24
254 SystemRegistryQuotaInformation = 37, // 0x25
255 SystemExtendServiceTableInformation = 38, // 0x26
256 SystemPrioritySeperation = 39, // 0x27
257 SystemVerifierAddDriverInformation = 40, // 0x28
258 SystemVerifierRemoveDriverInformation = 41, // 0x29
259 SystemProcessorIdleInformation = 42, // 0x2A
260 SystemLegacyDriverInformation = 43, // 0x2B
261 SystemCurrentTimeZoneInformation = 44, // 0x2C
262 SystemLookasideInformation = 45, // 0x2D
263 SystemTimeSlipNotification = 46, // 0x2E
264 SystemSessionCreate = 47, // 0x2F
265 SystemSessionDetach = 48, // 0x30
266 SystemSessionInformation = 49, // 0x31
267 SystemRangeStartInformation = 50, // 0x32
268 SystemVerifierInformation = 51, // 0x33
269 SystemVerifierThunkExtend = 52, // 0x34 - Win 11: SystemVerifierReserved
270 SystemSessionProcessInformation = 53, // 0x35
271 SystemLoadGdiDriverInSystemSpace = 54, // 0x36
272 SystemNumaProcessorMap = 55, // 0x37
273 SystemPrefetcherInformation = 56, // 0x38
274 SystemExtendedProcessInformation = 57, // 0x39
275 SystemRecommendedSharedDataAlignment = 58, // 0x3A
276 SystemComPlusPackage = 59, // 0x3B
277 SystemNumaAvailableMemory = 60, // 0x3C
278 SystemProcessorPowerInformation = 61, // 0x3D
279 SystemEmulationBasicInformation = 62, // 0x3E
280 SystemEmulationProcessorInformation = 63, // 0x3F
281 SystemExtendedHandleInformation = 64, // 0x40
282 SystemLostDelayedWriteInformation = 65, // 0x41
283 SystemBigPoolInformation = 66, // 0x42
284 SystemSessionPoolTagInformation = 67, // 0x43
285 SystemSessionMappedViewInformation = 68, // 0x44
286 SystemHotpatchInformation = 69, // 0x45
287 SystemObjectSecurityMode = 70, // 0x46
288 SystemWatchdogTimerHandler = 71, // 0x47
289 SystemWatchdogTimerInformation = 72, // 0x48
290 SystemLogicalProcessorInformation = 73, // 0x49
291 SystemWow64SharedInformationObsolete = 74, // 0x4A
292 SystemRegisterFirmwareTableInformationHandler = 75, // 0x4B
293 SystemFirmwareTableInformation = 76, // 0x4C
294
295#if (NTDDI_VERSION >= NTDDI_VISTA) || defined(__REACTOS__)
296 SystemModuleInformationEx = 77, // 0x4D
297 SystemVerifierTriageInformation = 78, // 0x4E
298 SystemSuperfetchInformation = 79, // 0x4F
299 SystemMemoryListInformation = 80, // 0x50
300 SystemFileCacheInformationEx = 81, // 0x51
301 SystemThreadPriorityClientIdInformation = 82, // 0x52
302 SystemProcessorIdleCycleTimeInformation = 83, // 0x53
303 SystemVerifierCancellationInformation = 84, // 0x54
304 SystemProcessorPowerInformationEx = 85, // 0x55
305 SystemRefTraceInformation = 86, // 0x56
306 SystemSpecialPoolInformation = 87, // 0x57
307 SystemProcessIdInformation = 88, // 0x58
308 SystemErrorPortInformation = 89, // 0x59
309 SystemBootEnvironmentInformation = 90, // 0x5A
310 SystemHypervisorInformation = 91, // 0x5B
311 SystemVerifierInformationEx = 92, // 0x5C
312 SystemTimeZoneInformation = 93, // 0x5D
313 SystemImageFileExecutionOptionsInformation = 94, // 0x5E
314 SystemCoverageInformation = 95, // 0x5F
315 SystemPrefetchPatchInformation = 96, // 0x60
316 SystemVerifierFaultsInformation = 97, // 0x61
317 SystemSystemPartitionInformation = 98, // 0x62
318 SystemSystemDiskInformation = 99, // 0x63
319 SystemProcessorPerformanceDistribution = 100, // 0x64
320 SystemNumaProximityNodeInformation = 101, // 0x65
321 SystemDynamicTimeZoneInformation = 102, // 0x66
322 SystemCodeIntegrityInformation = 103, // 0x67
323 SystemProcessorMicrocodeUpdateInformation = 104, // 0x68
324 SystemProcessorBrandString = 105, // 0x69
325 SystemVirtualAddressInformation = 106, // 0x6A
326#endif // (NTDDI_VERSION >= NTDDI_VISTA)
327
328#if (NTDDI_VERSION >= NTDDI_WIN7) || defined(__REACTOS__)
329 SystemLogicalProcessorAndGroupInformation = 107, // 0x6B
330 SystemProcessorCycleTimeInformation = 108, // 0x6C
331 SystemStoreInformation = 109, // 0x6D
332 SystemRegistryAppendString = 110, // 0x6E
333 SystemAitSamplingValue = 111, // 0x6F
334 SystemVhdBootInformation = 112, // 0x70
335 SystemCpuQuotaInformation = 113, // 0x71
336 SystemNativeBasicInformation = 114, // 0x72
337 SystemErrorPortTimeouts = 115, // 0x73
338 SystemLowPriorityIoInformation = 116, // 0x74
339 SystemBootEntropyInformation = 117, // 0x75
340 SystemVerifierCountersInformation = 118, // 0x76
341 SystemPagedPoolInformationEx = 119, // 0x77
342 SystemSystemPtesInformationEx = 120, // 0x78
343 SystemNodeDistanceInformation = 121, // 0x79
344 SystemAcpiAuditInformation = 122, // 0x7A
345 SystemBasicPerformanceInformation = 123, // 0x7B
346 SystemQueryPerformanceCounterInformation = 124, // 0x7C
347#endif // (NTDDI_VERSION >= NTDDI_WIN7)
348
349#if (NTDDI_VERSION >= NTDDI_WIN8)
350 SystemSessionBigPoolInformation = 125, // 0x7D
351 SystemBootGraphicsInformation = 126, // 0x7E
352 SystemScrubPhysicalMemoryInformation = 127, // 0x7F
353 SystemBadPageInformation = 128, // 0x80
354 SystemProcessorProfileControlArea = 129, // 0x81
355 SystemCombinePhysicalMemoryInformation = 130, // 0x82
356 SystemEntropyInterruptTimingInformation = 131, // 0x83
357 SystemConsoleInformation = 132, // 0x84
358 SystemPlatformBinaryInformation = 133, // 0x85
359 SystemThrottleNotificationInformation = 134, // 0x86 - 6.2 only
360 SystemPolicyInformation = 134, // 0x86 - 6.3 and higher
361 SystemHypervisorProcessorCountInformation = 135, // 0x87
362 SystemDeviceDataInformation = 136, // 0x88
363 SystemDeviceDataEnumerationInformation = 137, // 0x89
364 SystemMemoryTopologyInformation = 138, // 0x8A
365 SystemMemoryChannelInformation = 139, // 0x8B
366 SystemBootLogoInformation = 140, // 0x8C
367 SystemProcessorPerformanceInformationEx = 141, // 0x8D
368 SystemSpare0 = 142, // 0x8E - 6.2 to 1511
369 SystemCriticalProcessErrorLogInformation = 142, // 0x8E - 1607 and higher
370 SystemSecureBootPolicyInformation = 143, // 0x8F
371 SystemPageFileInformationEx = 144, // 0x90
372 SystemSecureBootInformation = 145, // 0x91
373 SystemEntropyInterruptTimingRawInformation = 146, // 0x92
374 SystemPortableWorkspaceEfiLauncherInformation = 147, // 0x93
375 SystemFullProcessInformation = 148, // 0x94
376#endif // (NTDDI_VERSION >= NTDDI_WIN8)
377
378#if (NTDDI_VERSION >= NTDDI_WINBLUE)
379 SystemKernelDebuggerInformationEx = 149, // 0x95
380 SystemBootMetadataInformation = 150, // 0x96
381 SystemSoftRebootInformation = 151, // 0x97
382 SystemElamCertificateInformation = 152, // 0x98
383 SystemOfflineDumpConfigInformation = 153, // 0x99
384 SystemProcessorFeaturesInformation = 154, // 0x9A
385 SystemRegistryReconciliationInformation = 155, // 0x9B
386 SystemEdidInformation = 156, // 0x9C
387#endif // (NTDDI_VERSION >= NTDDI_WINBLUE)
388
389#if (NTDDI_VERSION >= NTDDI_WIN10)
390 SystemManufacturingInformation = 157, // 0x9D
391 SystemEnergyEstimationConfigInformation = 158, // 0x9E
392 SystemHypervisorDetailInformation = 159, // 0x9F
393 SystemProcessorCycleStatsInformation = 160, // 0xA0
394 SystemVmGenerationCountInformation = 161, // 0xA1
395 SystemTrustedPlatformModuleInformation = 162, // 0xA2
396 SystemKernelDebuggerFlags = 163, // 0xA3
397 SystemCodeIntegrityPolicyInformation = 164, // 0xA4
398 SystemIsolatedUserModeInformation = 165, // 0xA5
399 SystemHardwareSecurityTestInterfaceResultsInformation = 166, // 0xA6
400 SystemSingleModuleInformation = 167, // 0xA7
401 SystemAllowedCpuSetsInformation = 168, // 0xA8
402 SystemVsmProtectionInformation = 169, // 0xA9 - aka SystemDmaProtectionInformation
403 SystemInterruptCpuSetsInformation = 170, // 0xAA
404 SystemSecureBootPolicyFullInformation = 171, // 0xAB
405 SystemCodeIntegrityPolicyFullInformation = 172, // 0xAC
406 SystemAffinitizedInterruptProcessorInformation = 173, // 0xAD
407 SystemRootSiloInformation = 174, // 0xAE
408 SystemCpuSetInformation = 175, // 0xAF
409 SystemCpuSetTagInformation = 176, // 0xB0
410 SystemWin32WerStartCallout = 177, // 0xB1
411 SystemSecureKernelProfileInformation = 178, // 0xB2
412 SystemCodeIntegrityPlatformManifestInformation = 179, // 0xB3
413 SystemInterruptSteeringInformation = 180, // 0xB4
414 SystemSupportedProcessorArchitectures = 181, // 0xB5
415 SystemMemoryUsageInformation = 182, // 0xB6
416 SystemCodeIntegrityCertificateInformation = 183, // 0xB7
417 SystemPhysicalMemoryInformation = 184, // 0xB8
418 SystemControlFlowTransition = 185, // 0xB9
419 SystemKernelDebuggingAllowed = 186, // 0xBA
420 SystemActivityModerationExeState = 187, // 0xBB
421 SystemActivityModerationUserSettings = 188, // 0xBC
422 SystemCodeIntegrityPoliciesFullInformation = 189, // 0xBD
423 SystemCodeIntegrityUnlockInformation = 190, // 0xBE
424 SystemIntegrityQuotaInformation = 191, // 0xBF
425 SystemFlushInformation = 192, // 0xC0
426 SystemProcessorIdleMaskInformation = 193, // 0xC1
427 SystemSecureDumpEncryptionInformation = 194, // 0xC2
428 SystemWriteConstraintInformation = 195, // 0xC3
429 SystemKernelVaShadowInformation = 196, // 0xC4
430 SystemHypervisorSharedPageInformation = 197, // 0xC5
431 SystemFirmwareBootPerformanceInformation = 198, // 0xC6
432 SystemCodeIntegrityVerificationInformation = 199, // 0xC7
433 SystemFirmwarePartitionInformation = 200, // 0xC8
434 SystemSpeculationControlInformation = 201, // 0xC9
435 SystemDmaGuardPolicyInformation = 202, // 0xCA
436 SystemEnclaveLaunchControlInformation = 203, // 0xCB
437 SystemWorkloadAllowedCpuSetsInformation = 204, // 0xCC
438 SystemCodeIntegrityUnlockModeInformation = 205, // 0xCD
439 SystemLeapSecondInformation = 206, // 0xCE
440 SystemFlags2Information = 207, // 0xCF
441 SystemSecurityModelInformation = 208, // 0xD0
442 SystemCodeIntegritySyntheticCacheInformation = 209, // 0xD1
443 SystemFeatureConfigurationInformation = 210, // 0xD2
444 SystemFeatureConfigurationSectionInformation = 211, // 0xD3
445 SystemFeatureUsageSubscriptionInformation = 212, // 0xD4
446 SystemSecureSpeculationControlInformation = 213, // 0xD5
447 SystemSpacesBootInformation = 214, // 0xD6
448 SystemFwRamdiskInformation = 215, // 0xD7
449 SystemWheaIpmiHardwareInformation = 216, // 0xD8
450 SystemDifSetRuleClassInformation = 217, // 0xD9
451 SystemDifClearRuleClassInformation = 218, // 0xDA
452 SystemDifApplyPluginVerificationOnDriver = 219, // 0xDB
453 SystemDifRemovePluginVerificationOnDriver = 220, // 0xDC
454 SystemShadowStackInformation = 221, // 0xDD
455 SystemBuildVersionInformation = 222, // 0xDE
456 SystemPoolLimitInformation = 223, // 0xDF
457 SystemCodeIntegrityAddDynamicStore = 224, // 0xE0
458 SystemCodeIntegrityClearDynamicStores = 225, // 0xE1
459 SystemDifPoolTrackingInformation = 226, // 0xE2 - Win 11
460 SystemPoolZeroingInformation = 227, // 0xE3
461#endif // (NTDDI_VERSION >= NTDDI_WIN10)
462
463#if (NTDDI_VERSION >= NTDDI_WIN11)
464 SystemDpcWatchdogInformation = 228, // 0xE4
465 SystemDpcWatchdogInformation2 = 229, // 0xE5
466 SystemSupportedProcessorArchitectures2 = 230, // 0xE6
467 SystemSingleProcessorRelationshipInformation = 231, // 0xE7
468 SystemXfgCheckFailureInformation = 232, // 0xE8
469 SystemIommuStateInformation = 233, // 0xE9
470 SystemHypervisorMinrootInformation = 234, // 0xEA
471 SystemHypervisorBootPagesInformation = 235, // 0xEB
472 SystemPointerAuthInformation = 236, // 0xEC
473 SystemSecureKernelDebuggerInformation = 237, // 0xED
474 SystemOriginalImageFeatureInformation = 238, // 0xEE
475 SystemMemoryNumaInformation = 239, // 0xEF
476 SystemMemoryNumaPerformanceInformation = 240, // 0xF0
477 SystemCodeIntegritySignedPoliciesFullInformation = 241, // 0xF1
478 SystemSecureSecretsInformation = 242, // 0xF2
479 SystemTrustedAppsRuntimeInformation = 243, // 0xF3
480 SystemBadPageInformationEx = 244, // 0xF4
481 SystemResourceDeadlockTimeout = 245, // 0xF5
482 SystemBreakOnContextUnwindFailureInformation = 246, // 0xF6
483 SystemOslRamdiskInformation = 247, // 0xF7
484#endif // (NTDDI_VERSION >= NTDDI_WIN11)
485
486 MaxSystemInfoClass
487} SYSTEM_INFORMATION_CLASS, *PSYSTEM_INFORMATION_CLASS;
488
489//
490// System Information Classes for NtQueryMutant
491//
492typedef enum _MUTANT_INFORMATION_CLASS
493{
494 MutantBasicInformation,
495 MutantOwnerInformation
496} MUTANT_INFORMATION_CLASS;
497
498//
499// System Information Classes for NtQueryAtom
500//
501typedef enum _ATOM_INFORMATION_CLASS
502{
503 AtomBasicInformation,
504 AtomTableInformation,
505} ATOM_INFORMATION_CLASS;
506
507//
508// System Information Classes for NtQueryTimer
509//
510typedef enum _TIMER_INFORMATION_CLASS
511{
512 TimerBasicInformation
513} TIMER_INFORMATION_CLASS;
514
515//
516// System Information Classes for NtQuerySemaphore
517//
518typedef enum _SEMAPHORE_INFORMATION_CLASS
519{
520 SemaphoreBasicInformation
521} SEMAPHORE_INFORMATION_CLASS;
522
523//
524// System Information Classes for NtQueryEvent
525//
526typedef enum _EVENT_INFORMATION_CLASS
527{
528 EventBasicInformation
529} EVENT_INFORMATION_CLASS;
530
531#ifdef NTOS_MODE_USER
532
533//
534// Firmware Table Actions for SystemFirmwareTableInformation
535//
536typedef enum _SYSTEM_FIRMWARE_TABLE_ACTION
537{
538 SystemFirmwareTable_Enumerate = 0,
539 SystemFirmwareTable_Get = 1,
540} SYSTEM_FIRMWARE_TABLE_ACTION, *PSYSTEM_FIRMWARE_TABLE_ACTION;
541
542//
543// Firmware Handler Callback
544//
545struct _SYSTEM_FIRMWARE_TABLE_INFORMATION;
546typedef
547NTSTATUS
548(__cdecl *PFNFTH)(
549 _In_ struct _SYSTEM_FIRMWARE_TABLE_INFORMATION *FirmwareTableInformation
550);
551
552#else
553
554//
555// Handle Enumeration Callback
556//
557struct _HANDLE_TABLE_ENTRY;
558typedef BOOLEAN
559(NTAPI *PEX_ENUM_HANDLE_CALLBACK)(
560 _In_ struct _HANDLE_TABLE_ENTRY *HandleTableEntry,
561 _In_ HANDLE Handle,
562 _In_ PVOID Context
563);
564
565//
566// Executive Work Queue Structures
567//
568typedef struct _EX_QUEUE_WORKER_INFO
569{
570 ULONG QueueDisabled:1;
571 ULONG MakeThreadsAsNecessary:1;
572 ULONG WaitMode:1;
573 ULONG WorkerCount:29;
574} EX_QUEUE_WORKER_INFO, *PEX_QUEUE_WORKER_INFO;
575
576typedef struct _EX_WORK_QUEUE
577{
578 KQUEUE WorkerQueue;
579 LONG DynamicThreadCount;
580 ULONG WorkItemsProcessed;
581 ULONG WorkItemsProcessedLastPass;
582 ULONG QueueDepthLastPass;
583 EX_QUEUE_WORKER_INFO Info;
584} EX_WORK_QUEUE, *PEX_WORK_QUEUE;
585
586//
587// Executive Fast Reference Structure
588//
589typedef struct _EX_FAST_REF
590{
591 union
592 {
593 PVOID Object;
594 ULONG_PTR RefCnt:3;
595 ULONG_PTR Value;
596 };
597} EX_FAST_REF, *PEX_FAST_REF;
598
599//
600// Executive Cache-Aware Rundown Reference Descriptor
601//
602typedef struct _EX_RUNDOWN_REF_CACHE_AWARE
603{
604 PEX_RUNDOWN_REF RunRefs;
605 PVOID PoolToFree;
606 ULONG RunRefSize;
607 ULONG Number;
608} EX_RUNDOWN_REF_CACHE_AWARE;
609
610//
611// Executive Rundown Wait Block
612//
613typedef struct _EX_RUNDOWN_WAIT_BLOCK
614{
615 ULONG_PTR Count;
616 KEVENT WakeEvent;
617} EX_RUNDOWN_WAIT_BLOCK, *PEX_RUNDOWN_WAIT_BLOCK;
618
619//
620// Executive Pushlock
621//
622#undef EX_PUSH_LOCK
623#undef PEX_PUSH_LOCK
624typedef struct _EX_PUSH_LOCK
625{
626 union
627 {
628 struct
629 {
630 ULONG_PTR Locked:1;
631 ULONG_PTR Waiting:1;
632 ULONG_PTR Waking:1;
633 ULONG_PTR MultipleShared:1;
634 ULONG_PTR Shared:sizeof (ULONG_PTR) * 8 - 4;
635 };
636 ULONG_PTR Value;
637 PVOID Ptr;
638 };
639} EX_PUSH_LOCK, *PEX_PUSH_LOCK;
640
641//
642// Executive Pushlock Wait Block
643//
644
645//
646// The wait block has to be properly aligned
647// on a non-checked build even if the debug data isn't there.
648//
649#if defined(_MSC_VER)
650#pragma warning(push)
651#pragma warning(disable:4324)
652#endif
653
654typedef __ALIGNED(16) struct _EX_PUSH_LOCK_WAIT_BLOCK
655{
656 union
657 {
658 KGATE WakeGate;
659 KEVENT WakeEvent;
660 };
661 struct _EX_PUSH_LOCK_WAIT_BLOCK *Next;
662 struct _EX_PUSH_LOCK_WAIT_BLOCK *Last;
663 struct _EX_PUSH_LOCK_WAIT_BLOCK *Previous;
664 LONG ShareCount;
665 LONG Flags;
666#if DBG
667 BOOLEAN Signaled;
668 EX_PUSH_LOCK NewValue;
669 EX_PUSH_LOCK OldValue;
670 PEX_PUSH_LOCK PushLock;
671#endif
672} EX_PUSH_LOCK_WAIT_BLOCK, *PEX_PUSH_LOCK_WAIT_BLOCK;
673
674#if defined(_MSC_VER)
675#pragma warning(pop)
676#endif
677
678//
679// Callback Object
680//
681typedef struct _CALLBACK_OBJECT
682{
683 ULONG Signature;
684 KSPIN_LOCK Lock;
685 LIST_ENTRY RegisteredCallbacks;
686 BOOLEAN AllowMultipleCallbacks;
687 UCHAR reserved[3];
688} CALLBACK_OBJECT;
689
690//
691// Callback Handle
692//
693typedef struct _CALLBACK_REGISTRATION
694{
695 LIST_ENTRY Link;
696 PCALLBACK_OBJECT CallbackObject;
697 PCALLBACK_FUNCTION CallbackFunction;
698 PVOID CallbackContext;
699 ULONG Busy;
700 BOOLEAN UnregisterWaiting;
701} CALLBACK_REGISTRATION, *PCALLBACK_REGISTRATION;
702
703//
704// Internal Callback Object
705//
706typedef struct _EX_CALLBACK_ROUTINE_BLOCK
707{
708 EX_RUNDOWN_REF RundownProtect;
709 PEX_CALLBACK_FUNCTION Function;
710 PVOID Context;
711} EX_CALLBACK_ROUTINE_BLOCK, *PEX_CALLBACK_ROUTINE_BLOCK;
712
713//
714// Internal Callback Handle
715//
716typedef struct _EX_CALLBACK
717{
718 EX_FAST_REF RoutineBlock;
719} EX_CALLBACK, *PEX_CALLBACK;
720
721//
722// Profile Object
723//
724typedef struct _EPROFILE
725{
726 PEPROCESS Process;
727 PVOID RangeBase;
728 SIZE_T RangeSize;
729 PVOID Buffer;
730 ULONG BufferSize;
731 ULONG BucketSize;
732 PKPROFILE ProfileObject;
733 PVOID LockedBufferAddress;
734 PMDL Mdl;
735 ULONG_PTR Segment;
736 KPROFILE_SOURCE ProfileSource;
737 KAFFINITY Affinity;
738} EPROFILE, *PEPROFILE;
739
740//
741// Handle Table Structures
742//
743typedef struct _HANDLE_TRACE_DB_ENTRY
744{
745 CLIENT_ID ClientId;
746 HANDLE Handle;
747 ULONG Type;
748 PVOID StackTrace[16];
749} HANDLE_TRACE_DB_ENTRY, *PHANDLE_TRACE_DB_ENTRY;
750
751typedef struct _HANDLE_TRACE_DEBUG_INFO
752{
753 LONG RefCount;
754 ULONG TableSize;
755 ULONG BitMaskFlags;
756 FAST_MUTEX CloseCompactionLock;
757 ULONG CurrentStackIndex;
758 HANDLE_TRACE_DB_ENTRY TraceDb[1];
759} HANDLE_TRACE_DEBUG_INFO, *PHANDLE_TRACE_DEBUG_INFO;
760
761typedef struct _HANDLE_TABLE_ENTRY_INFO
762{
763 ULONG AuditMask;
764} HANDLE_TABLE_ENTRY_INFO, *PHANDLE_TABLE_ENTRY_INFO;
765
766typedef struct _HANDLE_TABLE_ENTRY
767{
768 union
769 {
770 PVOID Object;
771 ULONG_PTR ObAttributes;
772 PHANDLE_TABLE_ENTRY_INFO InfoTable;
773 ULONG_PTR Value;
774 };
775 union
776 {
777 ULONG GrantedAccess;
778 struct
779 {
780 USHORT GrantedAccessIndex;
781 USHORT CreatorBackTraceIndex;
782 };
783 LONG NextFreeTableEntry;
784 };
785} HANDLE_TABLE_ENTRY, *PHANDLE_TABLE_ENTRY;
786
787typedef struct _HANDLE_TABLE
788{
789#if (NTDDI_VERSION >= NTDDI_WINXP)
790 ULONG_PTR TableCode;
791#else
792 PHANDLE_TABLE_ENTRY **Table;
793#endif
794 PEPROCESS QuotaProcess;
795 PVOID UniqueProcessId;
796#if (NTDDI_VERSION >= NTDDI_WINXP)
797 EX_PUSH_LOCK HandleTableLock[4];
798 LIST_ENTRY HandleTableList;
799 EX_PUSH_LOCK HandleContentionEvent;
800#else
801 ERESOURCE HandleLock;
802 LIST_ENTRY HandleTableList;
803 KEVENT HandleContentionEvent;
804#endif
805 PHANDLE_TRACE_DEBUG_INFO DebugInfo;
806 LONG ExtraInfoPages;
807#if (NTDDI_VERSION >= NTDDI_LONGHORN)
808 union
809 {
810 ULONG Flags;
811 UCHAR StrictFIFO:1;
812 };
813 LONG FirstFreeHandle;
814 PHANDLE_TABLE_ENTRY LastFreeHandleEntry;
815 LONG HandleCount;
816 ULONG NextHandleNeedingPool;
817#else
818 ULONG FirstFree;
819 ULONG LastFree;
820 ULONG NextHandleNeedingPool;
821 LONG HandleCount;
822 union
823 {
824 ULONG Flags;
825 UCHAR StrictFIFO:1;
826 };
827#endif
828} HANDLE_TABLE, *PHANDLE_TABLE;
829
830#endif
831
832//
833// Hard Error LPC Message
834//
835typedef struct _HARDERROR_MSG
836{
837 PORT_MESSAGE h;
838 NTSTATUS Status;
839 LARGE_INTEGER ErrorTime;
840 ULONG ValidResponseOptions;
841 ULONG Response;
842 ULONG NumberOfParameters;
843 ULONG UnicodeStringParameterMask;
844 ULONG_PTR Parameters[MAXIMUM_HARDERROR_PARAMETERS];
845} HARDERROR_MSG, *PHARDERROR_MSG;
846
847//
848// Information Structures for NtQueryMutant
849//
850typedef struct _MUTANT_BASIC_INFORMATION
851{
852 LONG CurrentCount;
853 BOOLEAN OwnedByCaller;
854 BOOLEAN AbandonedState;
855} MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
856
857typedef struct _MUTANT_OWNER_INFORMATION
858{
859 CLIENT_ID ClientId;
860} MUTANT_OWNER_INFORMATION, *PMUTANT_OWNER_INFORMATION;
861
862//
863// Information Structures for NtQueryAtom
864//
865typedef struct _ATOM_BASIC_INFORMATION
866{
867 USHORT UsageCount;
868 USHORT Flags;
869 USHORT NameLength;
870 WCHAR Name[1];
871} ATOM_BASIC_INFORMATION, *PATOM_BASIC_INFORMATION;
872
873typedef struct _ATOM_TABLE_INFORMATION
874{
875 ULONG NumberOfAtoms;
876 USHORT Atoms[1];
877} ATOM_TABLE_INFORMATION, *PATOM_TABLE_INFORMATION;
878
879//
880// Information Structures for NtQueryTimer
881//
882typedef struct _TIMER_BASIC_INFORMATION
883{
884 LARGE_INTEGER TimeRemaining;
885 BOOLEAN SignalState;
886} TIMER_BASIC_INFORMATION, *PTIMER_BASIC_INFORMATION;
887
888//
889// Information Structures for NtQuerySemaphore
890//
891typedef struct _SEMAPHORE_BASIC_INFORMATION
892{
893 LONG CurrentCount;
894 LONG MaximumCount;
895} SEMAPHORE_BASIC_INFORMATION, *PSEMAPHORE_BASIC_INFORMATION;
896
897//
898// Information Structures for NtQueryEvent
899//
900typedef struct _EVENT_BASIC_INFORMATION
901{
902 EVENT_TYPE EventType;
903 LONG EventState;
904} EVENT_BASIC_INFORMATION, *PEVENT_BASIC_INFORMATION;
905
906//
907// Information Structures for NtQuerySystemInformation
908//
909typedef struct _SYSTEM_BASIC_INFORMATION
910{
911 ULONG Reserved;
912 ULONG TimerResolution;
913 ULONG PageSize;
914 ULONG NumberOfPhysicalPages;
915 ULONG LowestPhysicalPageNumber;
916 ULONG HighestPhysicalPageNumber;
917 ULONG AllocationGranularity;
918 ULONG_PTR MinimumUserModeAddress;
919 ULONG_PTR MaximumUserModeAddress;
920 ULONG_PTR ActiveProcessorsAffinityMask;
921 CCHAR NumberOfProcessors;
922} SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
923
924// Class 1
925typedef struct _SYSTEM_PROCESSOR_INFORMATION
926{
927 USHORT ProcessorArchitecture;
928 USHORT ProcessorLevel;
929 USHORT ProcessorRevision;
930#if (NTDDI_VERSION < NTDDI_WIN8)
931 USHORT Reserved;
932#else
933 USHORT MaximumProcessors;
934#endif
935#if (NTDDI_VERSION >= NTDDI_WIN10) || ((NTDDI_VERSION >= NTDDI_WINBLUE) && defined(_WIN64))
936 ULONG64 ProcessorFeatureBits;
937#else
938 ULONG ProcessorFeatureBits;
939#endif
940} SYSTEM_PROCESSOR_INFORMATION, *PSYSTEM_PROCESSOR_INFORMATION;
941
942// Class 2
943typedef struct _SYSTEM_PERFORMANCE_INFORMATION
944{
945 LARGE_INTEGER IdleProcessTime;
946 LARGE_INTEGER IoReadTransferCount;
947 LARGE_INTEGER IoWriteTransferCount;
948 LARGE_INTEGER IoOtherTransferCount;
949 ULONG IoReadOperationCount;
950 ULONG IoWriteOperationCount;
951 ULONG IoOtherOperationCount;
952 ULONG AvailablePages;
953 ULONG CommittedPages;
954 ULONG CommitLimit;
955 ULONG PeakCommitment;
956 ULONG PageFaultCount;
957 ULONG CopyOnWriteCount;
958 ULONG TransitionCount;
959 ULONG CacheTransitionCount;
960 ULONG DemandZeroCount;
961 ULONG PageReadCount;
962 ULONG PageReadIoCount;
963 ULONG CacheReadCount;
964 ULONG CacheIoCount;
965 ULONG DirtyPagesWriteCount;
966 ULONG DirtyWriteIoCount;
967 ULONG MappedPagesWriteCount;
968 ULONG MappedWriteIoCount;
969 ULONG PagedPoolPages;
970 ULONG NonPagedPoolPages;
971 ULONG PagedPoolAllocs;
972 ULONG PagedPoolFrees;
973 ULONG NonPagedPoolAllocs;
974 ULONG NonPagedPoolFrees;
975 ULONG FreeSystemPtes;
976 ULONG ResidentSystemCodePage;
977 ULONG TotalSystemDriverPages;
978 ULONG TotalSystemCodePages;
979 ULONG NonPagedPoolLookasideHits;
980 ULONG PagedPoolLookasideHits;
981 ULONG Spare3Count;
982 ULONG ResidentSystemCachePage;
983 ULONG ResidentPagedPoolPage;
984 ULONG ResidentSystemDriverPage;
985 ULONG CcFastReadNoWait;
986 ULONG CcFastReadWait;
987 ULONG CcFastReadResourceMiss;
988 ULONG CcFastReadNotPossible;
989 ULONG CcFastMdlReadNoWait;
990 ULONG CcFastMdlReadWait;
991 ULONG CcFastMdlReadResourceMiss;
992 ULONG CcFastMdlReadNotPossible;
993 ULONG CcMapDataNoWait;
994 ULONG CcMapDataWait;
995 ULONG CcMapDataNoWaitMiss;
996 ULONG CcMapDataWaitMiss;
997 ULONG CcPinMappedDataCount;
998 ULONG CcPinReadNoWait;
999 ULONG CcPinReadWait;
1000 ULONG CcPinReadNoWaitMiss;
1001 ULONG CcPinReadWaitMiss;
1002 ULONG CcCopyReadNoWait;
1003 ULONG CcCopyReadWait;
1004 ULONG CcCopyReadNoWaitMiss;
1005 ULONG CcCopyReadWaitMiss;
1006 ULONG CcMdlReadNoWait;
1007 ULONG CcMdlReadWait;
1008 ULONG CcMdlReadNoWaitMiss;
1009 ULONG CcMdlReadWaitMiss;
1010 ULONG CcReadAheadIos;
1011 ULONG CcLazyWriteIos;
1012 ULONG CcLazyWritePages;
1013 ULONG CcDataFlushes;
1014 ULONG CcDataPages;
1015 ULONG ContextSwitches;
1016 ULONG FirstLevelTbFills;
1017 ULONG SecondLevelTbFills;
1018 ULONG SystemCalls;
1019#if (NTDDI_VERSION >= NTDDI_WIN7)
1020 ULONGLONG CcTotalDirtyPages;
1021 ULONGLONG CcDirtyPageThreshold;
1022#endif
1023#if (NTDDI_VERSION >= NTDDI_WIN8)
1024 LONGLONG ResidentAvailablePages;
1025 ULONGLONG SharedCommittedPages;
1026#endif
1027} SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;
1028
1029// Class 3
1030typedef struct _SYSTEM_TIMEOFDAY_INFORMATION
1031{
1032 LARGE_INTEGER BootTime;
1033 LARGE_INTEGER CurrentTime;
1034 LARGE_INTEGER TimeZoneBias;
1035 ULONG TimeZoneId;
1036 ULONG Reserved;
1037#if (NTDDI_VERSION >= NTDDI_WIN2K)
1038 ULONGLONG BootTimeBias;
1039 ULONGLONG SleepTimeBias;
1040#endif
1041} SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION;
1042
1043// Class 4
1044// This class is obsolete, please use KUSER_SHARED_DATA instead
1045
1046// Class 5
1047typedef struct _SYSTEM_THREAD_INFORMATION
1048{
1049 LARGE_INTEGER KernelTime;
1050 LARGE_INTEGER UserTime;
1051 LARGE_INTEGER CreateTime;
1052 ULONG WaitTime;
1053 PVOID StartAddress;
1054 CLIENT_ID ClientId;
1055 KPRIORITY Priority;
1056 LONG BasePriority;
1057 ULONG ContextSwitches;
1058 ULONG ThreadState;
1059 ULONG WaitReason;
1060 ULONG PadPadAlignment;
1061} SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION;
1062#ifndef _WIN64
1063C_ASSERT(sizeof(SYSTEM_THREAD_INFORMATION) == 0x40); // Must be 8-byte aligned
1064#endif
1065
1066typedef struct _SYSTEM_PROCESS_INFORMATION
1067{
1068 ULONG NextEntryOffset;
1069 ULONG NumberOfThreads;
1070 LARGE_INTEGER WorkingSetPrivateSize; //VISTA
1071 ULONG HardFaultCount; //WIN7
1072 ULONG NumberOfThreadsHighWatermark; //WIN7
1073 ULONGLONG CycleTime; //WIN7
1074 LARGE_INTEGER CreateTime;
1075 LARGE_INTEGER UserTime;
1076 LARGE_INTEGER KernelTime;
1077 UNICODE_STRING ImageName;
1078 KPRIORITY BasePriority;
1079 HANDLE UniqueProcessId;
1080 HANDLE InheritedFromUniqueProcessId;
1081 ULONG HandleCount;
1082 ULONG SessionId;
1083 ULONG_PTR PageDirectoryBase;
1084
1085 //
1086 // This part corresponds to VM_COUNTERS_EX.
1087 // NOTE: *NOT* THE SAME AS VM_COUNTERS!
1088 //
1089 SIZE_T PeakVirtualSize;
1090 SIZE_T VirtualSize;
1091 ULONG PageFaultCount;
1092 SIZE_T PeakWorkingSetSize;
1093 SIZE_T WorkingSetSize;
1094 SIZE_T QuotaPeakPagedPoolUsage;
1095 SIZE_T QuotaPagedPoolUsage;
1096 SIZE_T QuotaPeakNonPagedPoolUsage;
1097 SIZE_T QuotaNonPagedPoolUsage;
1098 SIZE_T PagefileUsage;
1099 SIZE_T PeakPagefileUsage;
1100 SIZE_T PrivatePageCount;
1101
1102 //
1103 // This part corresponds to IO_COUNTERS
1104 //
1105 LARGE_INTEGER ReadOperationCount;
1106 LARGE_INTEGER WriteOperationCount;
1107 LARGE_INTEGER OtherOperationCount;
1108 LARGE_INTEGER ReadTransferCount;
1109 LARGE_INTEGER WriteTransferCount;
1110 LARGE_INTEGER OtherTransferCount;
1111// SYSTEM_THREAD_INFORMATION TH[1];
1112} SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
1113#ifndef _WIN64
1114C_ASSERT(sizeof(SYSTEM_PROCESS_INFORMATION) == 0xB8); // Must be 8-byte aligned
1115#endif
1116
1117//
1118// Class 6
1119typedef struct _SYSTEM_CALL_COUNT_INFORMATION
1120{
1121 ULONG Length;
1122 ULONG NumberOfTables;
1123} SYSTEM_CALL_COUNT_INFORMATION, *PSYSTEM_CALL_COUNT_INFORMATION;
1124
1125// Class 7
1126typedef struct _SYSTEM_DEVICE_INFORMATION
1127{
1128 ULONG NumberOfDisks;
1129 ULONG NumberOfFloppies;
1130 ULONG NumberOfCdRoms;
1131 ULONG NumberOfTapes;
1132 ULONG NumberOfSerialPorts;
1133 ULONG NumberOfParallelPorts;
1134} SYSTEM_DEVICE_INFORMATION, *PSYSTEM_DEVICE_INFORMATION;
1135
1136// Class 8
1137typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
1138{
1139 LARGE_INTEGER IdleTime;
1140 LARGE_INTEGER KernelTime;
1141 LARGE_INTEGER UserTime;
1142 LARGE_INTEGER DpcTime;
1143 LARGE_INTEGER InterruptTime;
1144 ULONG InterruptCount;
1145} SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
1146
1147// Class 9
1148typedef struct _SYSTEM_FLAGS_INFORMATION
1149{
1150 ULONG Flags;
1151} SYSTEM_FLAGS_INFORMATION, *PSYSTEM_FLAGS_INFORMATION;
1152
1153// Class 10
1154typedef struct _SYSTEM_CALL_TIME_INFORMATION
1155{
1156 ULONG Length;
1157 ULONG TotalCalls;
1158 LARGE_INTEGER TimeOfCalls[1];
1159} SYSTEM_CALL_TIME_INFORMATION, *PSYSTEM_CALL_TIME_INFORMATION;
1160
1161// Class 11 - See RTL_PROCESS_MODULES
1162
1163// Class 12 - See RTL_PROCESS_LOCKS
1164
1165// Class 13 - See RTL_PROCESS_BACKTRACES
1166
1167// Class 14 - 15
1168typedef struct _SYSTEM_POOL_ENTRY
1169{
1170 BOOLEAN Allocated;
1171 BOOLEAN Spare0;
1172 USHORT AllocatorBackTraceIndex;
1173 ULONG Size;
1174 union
1175 {
1176 UCHAR Tag[4];
1177 ULONG TagUlong;
1178 PVOID ProcessChargedQuota;
1179 };
1180} SYSTEM_POOL_ENTRY, *PSYSTEM_POOL_ENTRY;
1181
1182typedef struct _SYSTEM_POOL_INFORMATION
1183{
1184 SIZE_T TotalSize;
1185 PVOID FirstEntry;
1186 USHORT EntryOverhead;
1187 BOOLEAN PoolTagPresent;
1188 BOOLEAN Spare0;
1189 ULONG NumberOfEntries;
1190 SYSTEM_POOL_ENTRY Entries[1];
1191} SYSTEM_POOL_INFORMATION, *PSYSTEM_POOL_INFORMATION;
1192
1193// Class 16
1194typedef struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO
1195{
1196 USHORT UniqueProcessId;
1197 USHORT CreatorBackTraceIndex;
1198 UCHAR ObjectTypeIndex;
1199 UCHAR HandleAttributes;
1200 USHORT HandleValue;
1201 PVOID Object;
1202 ULONG GrantedAccess;
1203} SYSTEM_HANDLE_TABLE_ENTRY_INFO, *PSYSTEM_HANDLE_TABLE_ENTRY_INFO;
1204
1205typedef struct _SYSTEM_HANDLE_INFORMATION
1206{
1207 ULONG NumberOfHandles;
1208 SYSTEM_HANDLE_TABLE_ENTRY_INFO Handles[1];
1209} SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
1210
1211// Class 17
1212typedef struct _SYSTEM_OBJECTTYPE_INFORMATION
1213{
1214 ULONG NextEntryOffset;
1215 ULONG NumberOfObjects;
1216 ULONG NumberOfHandles;
1217 ULONG TypeIndex;
1218 ULONG InvalidAttributes;
1219 GENERIC_MAPPING GenericMapping;
1220 ULONG ValidAccessMask;
1221 ULONG PoolType;
1222 BOOLEAN SecurityRequired;
1223 BOOLEAN WaitableObject;
1224 UNICODE_STRING TypeName;
1225} SYSTEM_OBJECTTYPE_INFORMATION, *PSYSTEM_OBJECTTYPE_INFORMATION;
1226
1227typedef struct _SYSTEM_OBJECT_INFORMATION
1228{
1229 ULONG NextEntryOffset;
1230 PVOID Object;
1231 HANDLE CreatorUniqueProcess;
1232 USHORT CreatorBackTraceIndex;
1233 USHORT Flags;
1234 LONG PointerCount;
1235 LONG HandleCount;
1236 ULONG PagedPoolCharge;
1237 ULONG NonPagedPoolCharge;
1238 HANDLE ExclusiveProcessId;
1239 PVOID SecurityDescriptor;
1240 OBJECT_NAME_INFORMATION NameInfo;
1241} SYSTEM_OBJECT_INFORMATION, *PSYSTEM_OBJECT_INFORMATION;
1242
1243// Class 18
1244typedef struct _SYSTEM_PAGEFILE_INFORMATION
1245{
1246 ULONG NextEntryOffset;
1247 ULONG TotalSize;
1248 ULONG TotalInUse;
1249 ULONG PeakUsage;
1250 UNICODE_STRING PageFileName;
1251} SYSTEM_PAGEFILE_INFORMATION, *PSYSTEM_PAGEFILE_INFORMATION;
1252
1253// Class 19
1254typedef struct _SYSTEM_VDM_INSTEMUL_INFO
1255{
1256 ULONG SegmentNotPresent;
1257 ULONG VdmOpcode0F;
1258 ULONG OpcodeESPrefix;
1259 ULONG OpcodeCSPrefix;
1260 ULONG OpcodeSSPrefix;
1261 ULONG OpcodeDSPrefix;
1262 ULONG OpcodeFSPrefix;
1263 ULONG OpcodeGSPrefix;
1264 ULONG OpcodeOPER32Prefix;
1265 ULONG OpcodeADDR32Prefix;
1266 ULONG OpcodeINSB;
1267 ULONG OpcodeINSW;
1268 ULONG OpcodeOUTSB;
1269 ULONG OpcodeOUTSW;
1270 ULONG OpcodePUSHF;
1271 ULONG OpcodePOPF;
1272 ULONG OpcodeINTnn;
1273 ULONG OpcodeINTO;
1274 ULONG OpcodeIRET;
1275 ULONG OpcodeINBimm;
1276 ULONG OpcodeINWimm;
1277 ULONG OpcodeOUTBimm;
1278 ULONG OpcodeOUTWimm ;
1279 ULONG OpcodeINB;
1280 ULONG OpcodeINW;
1281 ULONG OpcodeOUTB;
1282 ULONG OpcodeOUTW;
1283 ULONG OpcodeLOCKPrefix;
1284 ULONG OpcodeREPNEPrefix;
1285 ULONG OpcodeREPPrefix;
1286 ULONG OpcodeHLT;
1287 ULONG OpcodeCLI;
1288 ULONG OpcodeSTI;
1289 ULONG BopCount;
1290} SYSTEM_VDM_INSTEMUL_INFO, *PSYSTEM_VDM_INSTEMUL_INFO;
1291
1292// Class 20 - ULONG VDMBOPINFO
1293
1294// Class 21
1295typedef struct _SYSTEM_FILECACHE_INFORMATION
1296{
1297 SIZE_T CurrentSize;
1298 SIZE_T PeakSize;
1299 ULONG PageFaultCount;
1300 SIZE_T MinimumWorkingSet;
1301 SIZE_T MaximumWorkingSet;
1302 SIZE_T CurrentSizeIncludingTransitionInPages;
1303 SIZE_T PeakSizeIncludingTransitionInPages;
1304 ULONG TransitionRePurposeCount;
1305 ULONG Flags;
1306} SYSTEM_FILECACHE_INFORMATION, *PSYSTEM_FILECACHE_INFORMATION;
1307
1308// Class 22
1309typedef struct _SYSTEM_POOLTAG
1310{
1311 union
1312 {
1313 UCHAR Tag[4];
1314 ULONG TagUlong;
1315 };
1316 ULONG PagedAllocs;
1317 ULONG PagedFrees;
1318 SIZE_T PagedUsed;
1319 ULONG NonPagedAllocs;
1320 ULONG NonPagedFrees;
1321 SIZE_T NonPagedUsed;
1322} SYSTEM_POOLTAG, *PSYSTEM_POOLTAG;
1323
1324typedef struct _SYSTEM_POOLTAG_INFORMATION
1325{
1326 ULONG Count;
1327 SYSTEM_POOLTAG TagInfo[1];
1328} SYSTEM_POOLTAG_INFORMATION, *PSYSTEM_POOLTAG_INFORMATION;
1329
1330// Class 23
1331typedef struct _SYSTEM_INTERRUPT_INFORMATION
1332{
1333 ULONG ContextSwitches;
1334 ULONG DpcCount;
1335 ULONG DpcRate;
1336 ULONG TimeIncrement;
1337 ULONG DpcBypassCount;
1338 ULONG ApcBypassCount;
1339} SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION;
1340
1341// Class 24
1342typedef struct _SYSTEM_DPC_BEHAVIOR_INFORMATION
1343{
1344 ULONG Spare;
1345 ULONG DpcQueueDepth;
1346 ULONG MinimumDpcRate;
1347 ULONG AdjustDpcThreshold;
1348 ULONG IdealDpcRate;
1349} SYSTEM_DPC_BEHAVIOR_INFORMATION, *PSYSTEM_DPC_BEHAVIOR_INFORMATION;
1350
1351// Class 25
1352typedef struct _SYSTEM_MEMORY_INFO
1353{
1354 PUCHAR StringOffset;
1355 USHORT ValidCount;
1356 USHORT TransitionCount;
1357 USHORT ModifiedCount;
1358 USHORT PageTableCount;
1359} SYSTEM_MEMORY_INFO, *PSYSTEM_MEMORY_INFO;
1360
1361typedef struct _SYSTEM_MEMORY_INFORMATION
1362{
1363 ULONG InfoSize;
1364 ULONG StringStart;
1365 SYSTEM_MEMORY_INFO Memory[1];
1366} SYSTEM_MEMORY_INFORMATION, *PSYSTEM_MEMORY_INFORMATION;
1367
1368// Class 26
1369// See https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/ex/sysinfo/gdi_driver.htm.
1370typedef struct _SYSTEM_GDI_DRIVER_INFORMATION
1371{
1372 UNICODE_STRING DriverName;
1373 PVOID ImageAddress;
1374 PVOID SectionPointer;
1375 PVOID EntryPoint;
1376 PIMAGE_EXPORT_DIRECTORY ExportSectionPointer;
1377 ULONG ImageLength;
1378} SYSTEM_GDI_DRIVER_INFORMATION, *PSYSTEM_GDI_DRIVER_INFORMATION;
1379
1380// Class 27
1381// Not an actually class, simply a PVOID to the ImageAddress
1382
1383// Class 28
1384typedef struct _SYSTEM_QUERY_TIME_ADJUST_INFORMATION
1385{
1386 ULONG TimeAdjustment;
1387 ULONG TimeIncrement;
1388 BOOLEAN Enable;
1389} SYSTEM_QUERY_TIME_ADJUST_INFORMATION, *PSYSTEM_QUERY_TIME_ADJUST_INFORMATION;
1390
1391typedef struct _SYSTEM_SET_TIME_ADJUST_INFORMATION
1392{
1393 ULONG TimeAdjustment;
1394 BOOLEAN Enable;
1395} SYSTEM_SET_TIME_ADJUST_INFORMATION, *PSYSTEM_SET_TIME_ADJUST_INFORMATION;
1396
1397// Class 29 - Same as 25
1398
1399// FIXME: Class 30
1400
1401// Class 31
1402typedef struct _SYSTEM_REF_TRACE_INFORMATION
1403{
1404 UCHAR TraceEnable;
1405 UCHAR TracePermanent;
1406 UNICODE_STRING TraceProcessName;
1407 UNICODE_STRING TracePoolTags;
1408} SYSTEM_REF_TRACE_INFORMATION, *PSYSTEM_REF_TRACE_INFORMATION;
1409
1410// Class 32 - OBSOLETE
1411
1412// Class 33
1413typedef struct _SYSTEM_EXCEPTION_INFORMATION
1414{
1415 ULONG AlignmentFixupCount;
1416 ULONG ExceptionDispatchCount;
1417 ULONG FloatingEmulationCount;
1418 ULONG ByteWordEmulationCount;
1419} SYSTEM_EXCEPTION_INFORMATION, *PSYSTEM_EXCEPTION_INFORMATION;
1420
1421// Class 34
1422typedef struct _SYSTEM_CRASH_STATE_INFORMATION
1423{
1424 ULONG ValidCrashDump;
1425} SYSTEM_CRASH_STATE_INFORMATION, *PSYSTEM_CRASH_STATE_INFORMATION;
1426
1427// Class 35
1428typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION
1429{
1430 BOOLEAN KernelDebuggerEnabled;
1431 BOOLEAN KernelDebuggerNotPresent;
1432} SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
1433
1434// Class 36
1435typedef struct _SYSTEM_CONTEXT_SWITCH_INFORMATION
1436{
1437 ULONG ContextSwitches;
1438 ULONG FindAny;
1439 ULONG FindLast;
1440 ULONG FindIdeal;
1441 ULONG IdleAny;
1442 ULONG IdleCurrent;
1443 ULONG IdleLast;
1444 ULONG IdleIdeal;
1445 ULONG PreemptAny;
1446 ULONG PreemptCurrent;
1447 ULONG PreemptLast;
1448 ULONG SwitchToIdle;
1449} SYSTEM_CONTEXT_SWITCH_INFORMATION, *PSYSTEM_CONTEXT_SWITCH_INFORMATION;
1450
1451// Class 37
1452typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION
1453{
1454 ULONG RegistryQuotaAllowed;
1455 ULONG RegistryQuotaUsed;
1456 SIZE_T PagedPoolSize;
1457} SYSTEM_REGISTRY_QUOTA_INFORMATION, *PSYSTEM_REGISTRY_QUOTA_INFORMATION;
1458
1459// Class 38
1460// Not a structure, simply send the UNICODE_STRING
1461
1462// Class 39
1463// Not a structure, simply send a ULONG containing the new separation
1464
1465// Class 40
1466typedef struct _SYSTEM_PLUGPLAY_BUS_INFORMATION
1467{
1468 ULONG BusCount;
1469 PLUGPLAY_BUS_INSTANCE BusInstance[1];
1470} SYSTEM_PLUGPLAY_BUS_INFORMATION, *PSYSTEM_PLUGPLAY_BUS_INFORMATION;
1471
1472// Class 41
1473typedef struct _SYSTEM_DOCK_INFORMATION
1474{
1475 SYSTEM_DOCK_STATE DockState;
1476 INTERFACE_TYPE DeviceBusType;
1477 ULONG DeviceBusNumber;
1478 ULONG SlotNumber;
1479} SYSTEM_DOCK_INFORMATION, *PSYSTEM_DOCK_INFORMATION;
1480
1481// Class 42
1482typedef struct _SYSTEM_POWER_INFORMATION_NATIVE
1483{
1484 BOOLEAN SystemSuspendSupported;
1485 BOOLEAN SystemHibernateSupported;
1486 BOOLEAN ResumeTimerSupportsSuspend;
1487 BOOLEAN ResumeTimerSupportsHibernate;
1488 BOOLEAN LidSupported;
1489 BOOLEAN TurboSettingSupported;
1490 BOOLEAN TurboMode;
1491 BOOLEAN SystemAcOrDc;
1492 BOOLEAN PowerDownDisabled;
1493 LARGE_INTEGER SpindownDrives;
1494} SYSTEM_POWER_INFORMATION_NATIVE, *PSYSTEM_POWER_INFORMATION_NATIVE;
1495
1496// Class 43
1497typedef struct _SYSTEM_LEGACY_DRIVER_INFORMATION
1498{
1499 PNP_VETO_TYPE VetoType;
1500 UNICODE_STRING VetoDriver;
1501} SYSTEM_LEGACY_DRIVER_INFORMATION, *PSYSTEM_LEGACY_DRIVER_INFORMATION;
1502
1503// Class 44
1504//typedef struct _TIME_ZONE_INFORMATION RTL_TIME_ZONE_INFORMATION;
1505
1506// Class 45
1507typedef struct _SYSTEM_LOOKASIDE_INFORMATION
1508{
1509 USHORT CurrentDepth;
1510 USHORT MaximumDepth;
1511 ULONG TotalAllocates;
1512 ULONG AllocateMisses;
1513 ULONG TotalFrees;
1514 ULONG FreeMisses;
1515 ULONG Type;
1516 ULONG Tag;
1517 ULONG Size;
1518} SYSTEM_LOOKASIDE_INFORMATION, *PSYSTEM_LOOKASIDE_INFORMATION;
1519
1520// Class 46
1521// Not a structure. Only a HANDLE for the SlipEvent;
1522
1523// Class 47
1524// Not a structure. Only a ULONG for the SessionId;
1525
1526// Class 48
1527// Not a structure. Only a ULONG for the SessionId;
1528
1529// FIXME: Class 49
1530
1531// Class 50
1532// Not a structure. Only a ULONG_PTR for the SystemRangeStart
1533
1534// Class 51
1535typedef struct _SYSTEM_VERIFIER_INFORMATION
1536{
1537 ULONG NextEntryOffset;
1538 ULONG Level;
1539 UNICODE_STRING DriverName;
1540 ULONG RaiseIrqls;
1541 ULONG AcquireSpinLocks;
1542 ULONG SynchronizeExecutions;
1543 ULONG AllocationsAttempted;
1544 ULONG AllocationsSucceeded;
1545 ULONG AllocationsSucceededSpecialPool;
1546 ULONG AllocationsWithNoTag;
1547 ULONG TrimRequests;
1548 ULONG Trims;
1549 ULONG AllocationsFailed;
1550 ULONG AllocationsFailedDeliberately;
1551 ULONG Loads;
1552 ULONG Unloads;
1553 ULONG UnTrackedPool;
1554 ULONG CurrentPagedPoolAllocations;
1555 ULONG CurrentNonPagedPoolAllocations;
1556 ULONG PeakPagedPoolAllocations;
1557 ULONG PeakNonPagedPoolAllocations;
1558 SIZE_T PagedPoolUsageInBytes;
1559 SIZE_T NonPagedPoolUsageInBytes;
1560 SIZE_T PeakPagedPoolUsageInBytes;
1561 SIZE_T PeakNonPagedPoolUsageInBytes;
1562} SYSTEM_VERIFIER_INFORMATION, *PSYSTEM_VERIFIER_INFORMATION;
1563
1564// FIXME: Class 52
1565
1566// Class 53
1567typedef struct _SYSTEM_SESSION_PROCESS_INFORMATION
1568{
1569 ULONG SessionId;
1570 ULONG SizeOfBuf;
1571 PVOID Buffer; // Same format as in SystemProcessInformation
1572} SYSTEM_SESSION_PROCESS_INFORMATION, *PSYSTEM_SESSION_PROCESS_INFORMATION;
1573
1574// FIXME: Class 54
1575
1576// Class 55
1577#define MAXIMUM_NUMA_NODES 16
1578typedef struct _SYSTEM_NUMA_INFORMATION
1579{
1580 ULONG HighestNodeNumber;
1581 ULONG Reserved;
1582 union
1583 {
1584 ULONGLONG ActiveProcessorsAffinityMask[MAXIMUM_NUMA_NODES];
1585 ULONGLONG AvailableMemory[MAXIMUM_NUMA_NODES];
1586 };
1587} SYSTEM_NUMA_INFORMATION, *PSYSTEM_NUMA_INFORMATION;
1588
1589// FIXME: Class 56-63
1590
1591// Class 64
1592typedef struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX
1593{
1594 PVOID Object;
1595 ULONG_PTR UniqueProcessId;
1596 ULONG_PTR HandleValue;
1597 ULONG GrantedAccess;
1598 USHORT CreatorBackTraceIndex;
1599 USHORT ObjectTypeIndex;
1600 ULONG HandleAttributes;
1601 ULONG Reserved;
1602} SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX, *PSYSTEM_HANDLE_TABLE_ENTRY_INFO_EX;
1603
1604typedef struct _SYSTEM_HANDLE_INFORMATION_EX
1605{
1606 ULONG_PTR NumberOfHandles;
1607 ULONG_PTR Reserved;
1608 SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX Handles[1];
1609} SYSTEM_HANDLE_INFORMATION_EX, *PSYSTEM_HANDLE_INFORMATION_EX;
1610
1611// FIXME: Class 65-89
1612
1613// Class 90
1614#if (NTDDI_VERSION >= NTDDI_LONGHORN)
1615typedef struct _SYSTEM_BOOT_ENVIRONMENT_INFORMATION
1616{
1617 GUID BootIdentifier;
1618 FIRMWARE_TYPE FirmwareType;
1619#if (NTDDI_VERSION >= NTDDI_WIN8)
1620 ULONGLONG BootFlags;
1621#endif
1622} SYSTEM_BOOT_ENVIRONMENT_INFORMATION, *PSYSTEM_BOOT_ENVIRONMENT_INFORMATION;
1623#endif
1624
1625#if (NTDDI_VERSION >= NTDDI_WIN8)
1626typedef struct _SYSTEM_BOOT_ENVIRONMENT_V1
1627{
1628 GUID BootIdentifier;
1629 FIRMWARE_TYPE FirmwareType;
1630} SYSTEM_BOOT_ENVIRONMENT_V1, *PSYSTEM_BOOT_ENVIRONMENT_V1;
1631#endif
1632
1633// FIXME: Class 91-97
1634
1635#if (NTDDI_VERSION >= NTDDI_VISTA)
1636// Class 98
1637typedef struct _SYSTEM_SYSTEM_PARTITION_INFORMATION
1638{
1639 UNICODE_STRING SystemPartition;
1640} SYSTEM_SYSTEM_PARTITION_INFORMATION, *PSYSTEM_SYSTEM_PARTITION_INFORMATION;
1641
1642// Class 99
1643typedef struct _SYSTEM_SYSTEM_DISK_INFORMATION
1644{
1645 UNICODE_STRING SystemDisk;
1646} SYSTEM_SYSTEM_DISK_INFORMATION, *PSYSTEM_SYSTEM_DISK_INFORMATION;
1647#endif
1648
1649//
1650// Hotpatch flags
1651//
1652#define RTL_HOTPATCH_SUPPORTED_FLAG 0x01
1653#define RTL_HOTPATCH_SWAP_OBJECT_NAMES 0x08 << 24
1654#define RTL_HOTPATCH_SYNC_RENAME_FILES 0x10 << 24
1655#define RTL_HOTPATCH_PATCH_USER_MODE 0x20 << 24
1656#define RTL_HOTPATCH_REMAP_SYSTEM_DLL 0x40 << 24
1657#define RTL_HOTPATCH_PATCH_KERNEL_MODE 0x80 << 24
1658
1659
1660// Class 69
1661typedef struct _SYSTEM_HOTPATCH_CODE_INFORMATION
1662{
1663 ULONG Flags;
1664 ULONG InfoSize;
1665 union
1666 {
1667 struct
1668 {
1669 ULONG Foo;
1670 } CodeInfo;
1671 struct
1672 {
1673 USHORT NameOffset;
1674 USHORT NameLength;
1675 } KernelInfo;
1676 struct
1677 {
1678 USHORT NameOffset;
1679 USHORT NameLength;
1680 USHORT TargetNameOffset;
1681 USHORT TargetNameLength;
1682 UCHAR PatchingFinished;
1683 } UserModeInfo;
1684 struct
1685 {
1686 USHORT NameOffset;
1687 USHORT NameLength;
1688 USHORT TargetNameOffset;
1689 USHORT TargetNameLength;
1690 UCHAR PatchingFinished;
1691 NTSTATUS ReturnCode;
1692 HANDLE TargetProcess;
1693 } InjectionInfo;
1694 struct
1695 {
1696 HANDLE FileHandle1;
1697 PIO_STATUS_BLOCK IoStatusBlock1;
1698 PVOID RenameInformation1;
1699 PVOID RenameInformationLength1;
1700 HANDLE FileHandle2;
1701 PIO_STATUS_BLOCK IoStatusBlock2;
1702 PVOID RenameInformation2;
1703 PVOID RenameInformationLength2;
1704 } RenameInfo;
1705 struct
1706 {
1707 HANDLE ParentDirectory;
1708 HANDLE ObjectHandle1;
1709 HANDLE ObjectHandle2;
1710 } AtomicSwap;
1711 };
1712} SYSTEM_HOTPATCH_CODE_INFORMATION, *PSYSTEM_HOTPATCH_CODE_INFORMATION;
1713
1714//
1715// Class 75
1716//
1717#ifdef NTOS_MODE_USER
1718typedef struct _SYSTEM_FIRMWARE_TABLE_HANDLER
1719{
1720 ULONG ProviderSignature;
1721 BOOLEAN Register;
1722 PFNFTH FirmwareTableHandler;
1723 PVOID DriverObject;
1724} SYSTEM_FIRMWARE_TABLE_HANDLER, *PSYSTEM_FIRMWARE_TABLE_HANDLER;
1725
1726//
1727// Class 76
1728//
1729typedef struct _SYSTEM_FIRMWARE_TABLE_INFORMATION
1730{
1731 ULONG ProviderSignature;
1732 SYSTEM_FIRMWARE_TABLE_ACTION Action;
1733 ULONG TableID;
1734 ULONG TableBufferLength;
1735 UCHAR TableBuffer[1];
1736} SYSTEM_FIRMWARE_TABLE_INFORMATION, *PSYSTEM_FIRMWARE_TABLE_INFORMATION;
1737
1738#endif // !NTOS_MODE_USER
1739
1740//
1741// Class 80
1742//
1743typedef struct _SYSTEM_MEMORY_LIST_INFORMATION
1744{
1745 SIZE_T ZeroPageCount;
1746 SIZE_T FreePageCount;
1747 SIZE_T ModifiedPageCount;
1748 SIZE_T ModifiedNoWritePageCount;
1749 SIZE_T BadPageCount;
1750 SIZE_T PageCountByPriority[8];
1751 SIZE_T RepurposedPagesByPriority[8];
1752 SIZE_T ModifiedPageCountPageFile;
1753} SYSTEM_MEMORY_LIST_INFORMATION, *PSYSTEM_MEMORY_LIST_INFORMATION;
1754
1755//
1756// Firmware variable attributes
1757//
1758#define VARIABLE_ATTRIBUTE_NON_VOLATILE 0x00000001
1759#define VARIABLE_ATTRIBUTE_BOOTSERVICE_ACCESS 0x00000002
1760#define VARIABLE_ATTRIBUTE_RUNTIME_ACCESS 0x00000004
1761#define VARIABLE_ATTRIBUTE_HARDWARE_ERROR_RECORD 0x00000008
1762#define VARIABLE_ATTRIBUTE_AUTHENTICATED_WRITE_ACCESS 0x00000010
1763#define VARIABLE_ATTRIBUTE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x00000020
1764#define VARIABLE_ATTRIBUTE_APPEND_WRITE 0x00000040
1765
1766#ifdef __cplusplus
1767}; // extern "C"
1768#endif
1769
1770#endif // !_EXTYPES_H