-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsystem.h
More file actions
3295 lines (3078 loc) · 101 KB
/
system.h
File metadata and controls
3295 lines (3078 loc) · 101 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#pragma once
// @todo: requires "object.h"
// @todo: requires "process.h"; used: "_PROCESS_ENERGY_VALUES"
// @todo: requires "kernel.h"; used: "_KAFFINITY_EX"
// @todo: requires "wnf.h"; used: "_WNF_STATE_NAME"
#pragma pack(push, 8)
using SYSTEM_INFORMATION_CLASS = enum _SYSTEM_INFORMATION_CLASS
{
SystemBasicInformation = 0,
SystemProcessorInformation = 1,
SystemPerformanceInformation = 2,
SystemTimeOfDayInformation = 3,
SystemPathInformation = 4,
SystemProcessInformation = 5,
SystemCallCountInformation = 6,
SystemDeviceInformation = 7,
SystemProcessorPerformanceInformation = 8,
SystemFlagsInformation = 9,
SystemCallTimeInformation = 10,
SystemModuleInformation = 11,
SystemLocksInformation = 12,
SystemStackTraceInformation = 13,
SystemPagedPoolInformation = 14,
SystemNonPagedPoolInformation = 15,
SystemHandleInformation = 16,
SystemObjectInformation = 17,
SystemPageFileInformation = 18,
SystemVdmInstemulInformation = 19,
SystemVdmBopInformation = 20,
SystemFileCacheInformation = 21,
SystemPoolTagInformation = 22,
SystemInterruptInformation = 23,
SystemDpcBehaviorInformation = 24,
SystemFullMemoryInformation = 25,
SystemLoadGdiDriverInformation = 26,
SystemUnloadGdiDriverInformation = 27,
SystemTimeAdjustmentInformation = 28,
SystemSummaryMemoryInformation = 29,
SystemMirrorMemoryInformation = 30,
#if Q_NT_VERSION >= Q_NT_VISTA
SystemPerformanceTraceInformation = 31,
#endif
SystemObsolete0 = 32,
SystemExceptionInformation = 33,
SystemCrashDumpStateInformation = 34,
SystemKernelDebuggerInformation = 35,
SystemContextSwitchInformation = 36,
SystemRegistryQuotaInformation = 37,
SystemExtendServiceTableInformation = 38,
SystemPrioritySeperation = 39,
SystemVerifierAddDriverInformation = 40,
SystemVerifierRemoveDriverInformation = 41,
SystemProcessorIdleInformation = 42,
SystemLegacyDriverInformation = 43,
SystemCurrentTimeZoneInformation = 44,
SystemLookasideInformation = 45,
SystemTimeSlipNotification = 46,
SystemSessionCreate = 47,
SystemSessionDetach = 48,
SystemSessionInformation = 49,
SystemRangeStartInformation = 50,
SystemVerifierInformation = 51,
SystemVerifierThunkExtend = 52,
SystemSessionProcessInformation = 53,
SystemLoadGdiDriverInSystemSpace = 54,
SystemNumaProcessorMap = 55,
SystemPrefetcherInformation = 56,
SystemExtendedProcessInformation = 57,
SystemRecommendedSharedDataAlignment = 58,
SystemComPlusPackage = 59,
SystemNumaAvailableMemory = 60,
SystemProcessorPowerInformation = 61,
SystemEmulationBasicInformation = 62,
SystemEmulationProcessorInformation = 63,
SystemExtendedHandleInformation = 64,
SystemLostDelayedWriteInformation = 65,
SystemBigPoolInformation = 66,
SystemSessionPoolTagInformation = 67,
SystemSessionMappedViewInformation = 68,
SystemHotpatchInformation = 69,
SystemObjectSecurityMode = 70,
SystemWatchdogTimerHandler = 71,
SystemWatchdogTimerInformation = 72,
SystemLogicalProcessorInformation = 73,
SystemWow64SharedInformationObsolete = 74,
SystemRegisterFirmwareTableInformationHandler = 75,
SystemFirmwareTableInformation = 76,
#if Q_NT_VERSION >= Q_NT_VISTA
SystemModuleInformationEx = 77,
SystemVerifierTriageInformation = 78,
SystemSuperfetchInformation = 79,
SystemMemoryListInformation = 80,
SystemFileCacheInformationEx = 81, // @todo: since Q_NT_WS03_SP1/2/3/4 idk
SystemThreadPriorityClientIdInformation = 82,
SystemProcessorIdleCycleTimeInformation = 83,
SystemVerifierCancellationInformation = 84,
SystemProcessorPowerInformationEx = 85,
SystemRefTraceInformation = 86,
SystemSpecialPoolInformation = 87,
SystemProcessIdInformation = 88,
SystemErrorPortInformation = 89,
SystemBootEnvironmentInformation = 90,
SystemHypervisorInformation = 91,
SystemVerifierInformationEx = 92,
SystemTimeZoneInformation = 93,
SystemImageFileExecutionOptionsInformation = 94,
SystemCoverageInformation = 95,
SystemPrefetchPatchInformation = 96,
SystemVerifierFaultsInformation = 97,
SystemSystemPartitionInformation = 98,
SystemSystemDiskInformation = 99,
SystemProcessorPerformanceDistribution = 100,
SystemNumaProximityNodeInformation = 101,
SystemDynamicTimeZoneInformation = 102,
SystemCodeIntegrityInformation = 103,
SystemProcessorMicrocodeUpdateInformation = 104,
#endif
#if Q_NT_VERSION >= Q_NT_VISTA_SP1
SystemProcessorBrandString = 105,
SystemVirtualAddressInformation = 106,
#endif
#if Q_NT_VERSION >= Q_NT_WIN7
SystemLogicalProcessorAndGroupInformation = 107,
SystemProcessorCycleTimeInformation = 108,
SystemStoreInformation = 109,
SystemRegistryAppendString = 110,
SystemAitSamplingValue = 111,
SystemVhdBootInformation = 112,
SystemCpuQuotaInformation = 113,
#if Q_NT_VERSION >= Q_NT_WIN8
SystemNativeBasicInformation = 114,
SystemErrorPortTimeouts = 115,
#endif
SystemLowPriorityIoInformation = 116,
SystemBootEntropyInformation = 117,
SystemVerifierCountersInformation = 118,
SystemPagedPoolInformationEx = 119,
SystemSystemPtesInformationEx = 120,
SystemNodeDistanceInformation = 121,
SystemAcpiAuditInformation = 122,
SystemBasicPerformanceInformation = 123,
#endif
#if Q_NT_VERSION >= Q_NT_WIN7_SP1
SystemQueryPerformanceCounterInformation = 124,
#endif
#if Q_NT_VERSION >= Q_NT_WIN8
SystemSessionBigPoolInformation = 125,
SystemBootGraphicsInformation = 126,
SystemScrubPhysicalMemoryInformation = 127,
SystemBadPageInformation = 128,
SystemProcessorProfileControlArea = 129,
SystemCombinePhysicalMemoryInformation = 130,
SystemEntropyInterruptTimingInformation = 131,
SystemConsoleInformation = 132,
SystemPlatformBinaryInformation = 133,
#if Q_NT_VERSION >= Q_NT_WINBLUE
SystemPolicyInformation = 134,
#else
SystemThrottleNotificationInformation = 134,
#endif
SystemHypervisorProcessorCountInformation = 135,
SystemDeviceDataInformation = 136,
SystemDeviceDataEnumerationInformation = 137,
SystemMemoryTopologyInformation = 138,
SystemMemoryChannelInformation = 139,
SystemBootLogoInformation = 140,
SystemProcessorPerformanceInformationEx = 141,
#if Q_NT_VERSION >= Q_NT_WIN10_RS1
SystemCriticalProcessErrorLogInformation = 142,
#endif
SystemSecureBootPolicyInformation = 143,
SystemPageFileInformationEx = 144,
SystemSecureBootInformation = 145,
SystemEntropyInterruptTimingRawInformation = 146,
SystemPortableWorkspaceEfiLauncherInformation = 147,
#endif
#if Q_NT_VERSION >= Q_NT_WINBLUE
SystemFullProcessInformation = 148,
SystemKernelDebuggerInformationEx = 149,
SystemBootMetadataInformation = 150,
SystemSoftRebootInformation = 151,
SystemElamCertificateInformation = 152,
SystemOfflineDumpConfigInformation = 153,
SystemProcessorFeaturesInformation = 154,
SystemRegistryReconciliationInformation = 155,
SystemEdidInformation = 156,
#endif
#if Q_NT_VERSION >= Q_NT_WIN10
SystemManufacturingInformation = 157,
SystemEnergyEstimationConfigInformation = 158,
SystemHypervisorDetailInformation = 159,
SystemProcessorCycleStatsInformation = 160,
SystemVmGenerationCountInformation = 161,
SystemTrustedPlatformModuleInformation = 162,
SystemKernelDebuggerFlags = 163,
SystemCodeIntegrityPolicyInformation = 164,
SystemIsolatedUserModeInformation = 165,
SystemHardwareSecurityTestInterfaceResultsInformation = 166,
SystemSingleModuleInformation = 167,
SystemAllowedCpuSetsInformation = 168,
#if Q_NT_VERSION >= Q_NT_WIN10_RS4
SystemVsmProtectionInformation = 169,
#else
SystemDmaProtectionInformation = 169,
#endif
SystemInterruptCpuSetsInformation = 170,
SystemSecureBootPolicyFullInformation = 171,
SystemCodeIntegrityPolicyFullInformation = 172,
SystemAffinitizedInterruptProcessorInformation = 173,
SystemRootSiloInformation = 174,
#endif
#if Q_NT_VERSION >= Q_NT_WIN10_TH2
SystemCpuSetInformation = 175,
SystemCpuSetTagInformation = 176,
SystemWin32WerStartCallout = 177,
SystemSecureKernelProfileInformation = 178,
#endif
#if Q_NT_VERSION >= Q_NT_WIN10_RS1
SystemCodeIntegrityPlatformManifestInformation = 179,
SystemInterruptSteeringInformation = 180,
SystemSupportedProcessorArchitectures = 181,
SystemMemoryUsageInformation = 182,
SystemCodeIntegrityCertificateInformation = 183,
#endif
#if Q_NT_VERSION >= Q_NT_WIN10_RS2
SystemPhysicalMemoryInformation = 184,
SystemControlFlowTransition = 185,
SystemKernelDebuggingAllowed = 186,
SystemActivityModerationExeState = 187,
SystemActivityModerationUserSettings = 188,
SystemCodeIntegrityPoliciesFullInformation = 189,
SystemCodeIntegrityUnlockInformation = 190,
SystemIntegrityQuotaInformation = 191,
SystemFlushInformation = 192,
#endif
#if Q_NT_VERSION >= Q_NT_WIN10_RS3
SystemProcessorIdleMaskInformation = 193,
SystemSecureDumpEncryptionInformation = 194,
SystemWriteConstraintInformation = 195,
SystemKernelVaShadowInformation = 196,
#endif
#if Q_NT_VERSION >= Q_NT_WIN10_RS4
SystemHypervisorSharedPageInformation = 197,
SystemFirmwareBootPerformanceInformation = 198,
SystemCodeIntegrityVerificationInformation = 199,
SystemFirmwarePartitionInformation = 200,
SystemSpeculationControlInformation = 201,
SystemDmaGuardPolicyInformation = 202,
SystemEnclaveLaunchControlInformation = 203,
#endif
#if Q_NT_VERSION >= Q_NT_WIN10_RS5
SystemWorkloadAllowedCpuSetsInformation = 204,
SystemCodeIntegrityUnlockModeInformation = 205,
SystemLeapSecondInformation = 206,
SystemFlags2Information = 207,
#endif
#if Q_NT_VERSION >= Q_NT_WIN10_19H1
SystemSecurityModelInformation = 208,
SystemCodeIntegritySyntheticCacheInformation = 209,
#endif
#if Q_NT_VERSION >= Q_NT_WIN10_20H1
SystemFeatureConfigurationInformation = 210,
SystemFeatureConfigurationSectionInformation = 211,
SystemFeatureUsageSubscriptionInformation = 212,
SystemSecureSpeculationControlInformation = 213,
#endif
#if Q_NT_VERSION >= Q_NT_WIN10_20H2
SystemSpacesBootInformation = 214,
SystemFwRamdiskInformation = 215,
SystemWheaIpmiHardwareInformation = 216,
SystemDifSetRuleClassInformation = 217,
SystemDifClearRuleClassInformation = 218,
SystemDifApplyPluginVerificationOnDriver = 219,
SystemDifRemovePluginVerificationOnDriver = 220,
SystemShadowStackInformation = 221,
SystemBuildVersionInformation = 222,
SystemPoolLimitInformation = 223,
SystemCodeIntegrityAddDynamicStore = 224,
SystemCodeIntegrityClearDynamicStores = 225,
SystemPoolZeroingInformation = 227,
#endif
#if Q_NT_VERSION >= Q_NT_WIN11
SystemDpcWatchdogInformation = 228,
SystemDpcWatchdogInformation2 = 229,
SystemSupportedProcessorArchitectures2 = 230,
SystemSingleProcessorRelationshipInformation = 231,
SystemXfgCheckFailureInformation = 232,
#endif
#if Q_NT_VERSION >= Q_NT_WIN11_22H2
SystemIommuStateInformation = 233,
SystemHypervisorMinrootInformation = 234,
SystemHypervisorBootPagesInformation = 235,
SystemPointerAuthInformation = 236,
SystemSecureKernelDebuggerInformation = 237,
SystemOriginalImageFeatureInformation = 238,
#endif
#if Q_NT_VERSION >= Q_NT_WIN11_24H2
SystemMemoryNumaInformation = 239,
SystemMemoryNumaPerformanceInformation = 240,
SystemCodeIntegritySignedPoliciesFullInformation = 241,
SystemSecureCoreInformation = 242,
SystemTrustedAppsRuntimeInformation = 243,
SystemBadPageInformationEx = 244,
SystemResourceDeadlockTimeout = 245,
SystemBreakOnContextUnwindFailureInformation = 246, // requires 'SeDebugPrivilege'
SystemOslRamdiskInformation = 247,
#endif
#if Q_NT_VERSION >= Q_NT_WIN11_25H2
SystemCodeIntegrityPolicyManagementInformation = 248,
SystemMemoryNumaCacheInformation = 249,
SystemProcessorFeaturesBitMapInformation = 250,
#endif
MaxSystemInfoClass
};
_Q_NT_BIT_TEMPLATE struct SYSTEM_BASIC_INFORMATION
{
private:
_Q_NT_BIT_TYPE
public:
std::uint32_t Reserved; // 0x00
std::uint32_t TimerResolution; // 0x04
std::uint32_t PageSize; // 0x08
std::uint32_t NumberOfPhysicalPages; // 0x0C
std::uint32_t LowestPhysicalPageNumber; // 0x10
std::uint32_t HighestPhysicalPageNumber; // 0x14
std::uint32_t AllocationGranularity; // 0x18
BitnessType_t<std::uintptr_t> MinimumUserModeAddress; // 0x1C / 0x20
BitnessType_t<std::uintptr_t> MaximumUserModeAddress; // 0x20 / 0x28
BitnessType_t<KAFFINITY> ActiveProcessorsAffinityMask; // 0x24 / 0x30
std::int8_t NumberOfProcessors; // 0x28 / 0x38
};
_Q_NT_BIT_ASSERT(SYSTEM_BASIC_INFORMATION, 0x2C, 0x40);
// @todo: find better place?
// software feature bits
#define KF_V86_VIS 0x00000001
#define KF_RDTSC 0x00000002
#define KF_CR4 0x00000004
#define KF_CMOV 0x00000008
#define KF_GLOBAL_PAGE 0x00000010
#define KF_LARGE_PAGE 0x00000020
#define KF_MTRR 0x00000040
#define KF_CMPXCHG8B 0x00000080
#define KF_MMX 0x00000100
#define KF_WORKING_PTE 0x00000200
#define KF_PAT 0x00000400
#define KF_FXSR 0x00000800
#define KF_FAST_SYSCALL 0x00001000
#define KF_XMMI 0x00002000
#define KF_3DNOW 0x00004000
#define KF_AMDK6MTRR 0x00008000
#define KF_XMMI64 0x00010000
#define KF_DTS 0x00020000
#define KF_SMT 0x00040000
#define KF_NOEXECUTE 0x20000000
// @todo: find better place?
// hardware feature bits
#define HF_FPU 0x00000001 // FPU is on chip
#define HF_VME 0x00000002 // virtual 8086 mode enhancement
#define HF_DE 0x00000004 // debugging extension
#define HF_PSE 0x00000008 // page size extension
#define HF_TSC 0x00000010 // time stamp counter
#define HF_MSR 0x00000020 // rdmsr and wrmsr support
#define HF_PAE 0x00000040 // physical address extension
#define HF_MCE 0x00000080 // machine check exception
#define HF_CXS 0x00000100 // cmpxchg8b instruction supported
#define HF_APIC 0x00000200 // APIC on chip
#define HF_UNUSED0 0x00000400 // unused bit
#define HF_SYSCALL 0x00000800 // fast system call
#define HF_MTRR 0x00001000 // memory type range registers
#define HF_PGE 0x00002000 // global page TB support
#define HF_MCA 0x00004000 // machine check architecture
#define HF_CMOV 0x00008000 // cmov instruction supported
#define HF_PAT 0x00010000 // physical attributes table
#define HF_PSE2 0x00020000 // page size extension (2)
#define HF_PSN 0x00040000 // processor serial number
#define HF_CFLUSH 0x00080000 // cache line flush
#define HF_UNUSED1 0x00100000 // unused bit
#define HF_DS 0x00200000 // debug store
#define HF_ACPI_THMON 0x00400000 // ACPI thermal monitor
#define HF_MMX 0x00800000 // MMX technology supported
#define HF_FXSR 0x01000000 // fxsr instruction supported
#define HF_XMMI 0x02000000 // xmm (SSE) registers supported
#define HF_XMMI64 0x04000000 // xmm (SSE2) registers supported
#define HF_SS 0x08000000 // self snoop
#define HF_SMT 0x10000000 // symmetric multithreading
#define HF_THERMMON 0x20000000 // thermal monitor
#define HF_UNUSED2 0x40000000 // unused bit
#define HF_PBE 0x80000000 // pending break enable
// @todo: find better place?
// extended hardware feature bits
#define XHF_NOEXECUTE 0x00100000 // no execute protection
#define XHF_MMX_EXT 0x00400000 // MMX extensions
#define XHF_FFXSR 0x02000000 // fast floating save/restore
#define XHF_LONGMODE 0x20000000 // long mode supported
#define XHF_3DNOW_EXT 0x40000000 // 3DNOW extensions
#define XHF_3DNOW 0x80000000 // 3DNOW supported
struct SYSTEM_PROCESSOR_INFORMATION
{
std::uint16_t ProcessorArchitecture; // 0x0
std::uint16_t ProcessorLevel; // 0x2
std::uint16_t ProcessorRevision; // 0x4
#if Q_NT_VERSION >= Q_NT_WIN8
std::uint16_t MaximumProcessors; // 0x6
#else
std::uint16_t Reserved; // 0x6
#endif
std::uint32_t ProcessorFeatureBits; // 0x8 // KF_*
};
static_assert(sizeof(SYSTEM_PROCESSOR_INFORMATION) == 0xC);
struct SYSTEM_PERFORMANCE_INFORMATION
{
LARGE_INTEGER IdleProcessTime; // 0x0000
LARGE_INTEGER IoReadTransferCount; // 0x0008
LARGE_INTEGER IoWriteTransferCount; // 0x0010
LARGE_INTEGER IoOtherTransferCount; // 0x0018
std::uint32_t IoReadOperationCount; // 0x0020
std::uint32_t IoWriteOperationCount; // 0x0024
std::uint32_t IoOtherOperationCount; // 0x0028
std::uint32_t AvailablePages; // 0x002C
std::uint32_t CommittedPages; // 0x0030
std::uint32_t CommitLimit; // 0x0034
std::uint32_t PeakCommitment; // 0x0038
std::uint32_t PageFaultCount; // 0x003C
std::uint32_t CopyOnWriteCount; // 0x0040
std::uint32_t TransitionCount; // 0x0044
std::uint32_t CacheTransitionCount; // 0x0048
std::uint32_t DemandZeroCount; // 0x004C
std::uint32_t PageReadCount; // 0x0050
std::uint32_t PageReadIoCount; // 0x0054
std::uint32_t CacheReadCount; // 0x0058
std::uint32_t CacheIoCount; // 0x005C
std::uint32_t DirtyPagesWriteCount; // 0x0060
std::uint32_t DirtyWriteIoCount; // 0x0064
std::uint32_t MappedPagesWriteCount; // 0x0068
std::uint32_t MappedWriteIoCount; // 0x006C
std::uint32_t PagedPoolPages; // 0x0070
std::uint32_t NonPagedPoolPages; // 0x0074
std::uint32_t PagedPoolAllocs; // 0x0078
std::uint32_t PagedPoolFrees; // 0x007C
std::uint32_t NonPagedPoolAllocs; // 0x0080
std::uint32_t NonPagedPoolFrees; // 0x0084
std::uint32_t FreeSystemPtes; // 0x0088
std::uint32_t ResidentSystemCodePage; // 0x008C
std::uint32_t TotalSystemDriverPages; // 0x0090
std::uint32_t TotalSystemCodePages; // 0x0094
std::uint32_t NonPagedPoolLookasideHits; // 0x0098
std::uint32_t PagedPoolLookasideHits; // 0x009C
std::uint32_t AvailablePagedPoolPages; // 0x00A0
std::uint32_t ResidentSystemCachePage; // 0x00A4
std::uint32_t ResidentPagedPoolPage; // 0x00A8
std::uint32_t ResidentSystemDriverPage; // 0x00AC
std::uint32_t CcFastReadNoWait; // 0x00B0
std::uint32_t CcFastReadWait; // 0x00B4
std::uint32_t CcFastReadResourceMiss; // 0x00B8
std::uint32_t CcFastReadNotPossible; // 0x00BC
std::uint32_t CcFastMdlReadNoWait; // 0x00C0
std::uint32_t CcFastMdlReadWait; // 0x00C4
std::uint32_t CcFastMdlReadResourceMiss; // 0x00C8
std::uint32_t CcFastMdlReadNotPossible; // 0x00CC
std::uint32_t CcMapDataNoWait; // 0x00D0
std::uint32_t CcMapDataWait; // 0x00D4
std::uint32_t CcMapDataNoWaitMiss; // 0x00D8
std::uint32_t CcMapDataWaitMiss; // 0x00DC
std::uint32_t CcPinMappedDataCount; // 0x00E0
std::uint32_t CcPinReadNoWait; // 0x00E4
std::uint32_t CcPinReadWait; // 0x00E8
std::uint32_t CcPinReadNoWaitMiss; // 0x00EC
std::uint32_t CcPinReadWaitMiss; // 0x00F0
std::uint32_t CcCopyReadNoWait; // 0x00F4
std::uint32_t CcCopyReadWait; // 0x00F8
std::uint32_t CcCopyReadNoWaitMiss; // 0x00FC
std::uint32_t CcCopyReadWaitMiss; // 0x0100
std::uint32_t CcMdlReadNoWait; // 0x0104
std::uint32_t CcMdlReadWait; // 0x0108
std::uint32_t CcMdlReadNoWaitMiss; // 0x010C
std::uint32_t CcMdlReadWaitMiss; // 0x0110
std::uint32_t CcReadAheadIos; // 0x0114
std::uint32_t CcLazyWriteIos; // 0x0118
std::uint32_t CcLazyWritePages; // 0x011C
std::uint32_t CcDataFlushes; // 0x0120
std::uint32_t CcDataPages; // 0x0124
std::uint32_t ContextSwitches; // 0x0128
std::uint32_t FirstLevelTbFills; // 0x012C
std::uint32_t SecondLevelTbFills; // 0x0130
std::uint32_t SystemCalls; // 0x0134
#if Q_NT_VERSION >= Q_NT_WIN7
std::uint64_t CcTotalDirtyPages; // 0x0138
std::uint64_t CcDirtyPageThreshold; // 0x0140
#endif
#if Q_NT_VERSION >= Q_NT_WIN8
std::int64_t ResidentAvailablePages; // 0x0148
std::uint64_t SharedCommittedPages; // 0x0150
#endif
#if Q_NT_VERSION >= Q_NT_WIN11_24H2
std::uint64_t MdlPagesAllocated; // 0x0158
std::uint64_t PfnDatabaseCommittedPages; // 0x0160
std::uint64_t SystemPageTableCommittedPages; // 0x0168
std::uint64_t ContiguousPagesAllocated; // 0x0170
#endif
};
static_assert(sizeof(SYSTEM_PERFORMANCE_INFORMATION) == 0x178);
struct SYSTEM_TIMEOFDAY_INFORMATION
{
LARGE_INTEGER BootTime; // 0x00
LARGE_INTEGER CurrentTime; // 0x08
LARGE_INTEGER TimeZoneBias; // 0x10
std::uint32_t TimeZoneId; // 0x18
std::uint32_t Reserved; // 0x1C
std::uint64_t BootTimeBias; // 0x20
std::uint64_t SleepTimeBias; // 0x28
};
static_assert(sizeof(SYSTEM_TIMEOFDAY_INFORMATION) == 0x30);
_Q_NT_BIT_TEMPLATE struct SYSTEM_THREAD_INFORMATION
{
private:
_Q_NT_BIT_TYPE
public:
LARGE_INTEGER KernelTime; // 0x00
LARGE_INTEGER UserTime; // 0x08
LARGE_INTEGER CreateTime; // 0x10
std::uint32_t WaitTime; // 0x18
BitnessType_t<void*> StartAddress; // 0x1C / 0x20
CLIENT_ID<nBitness> ClientId; // 0x20 / 0x28
KPRIORITY Priority; // 0x28 / 0x38
KPRIORITY BasePriority; // 0x2C / 0x3C
std::uint32_t ContextSwitches; // 0x30 / 0x40
KTHREAD_STATE ThreadState; // 0x34 / 0x44
KWAIT_REASON WaitReason; // 0x38 / 0x48
};
_Q_NT_BIT_ASSERT(SYSTEM_THREAD_INFORMATION, 0x40, 0x50);
_Q_NT_BIT_TEMPLATE struct SYSTEM_EXTENDED_THREAD_INFORMATION
{
private:
_Q_NT_BIT_TYPE
public:
SYSTEM_THREAD_INFORMATION<nBitness> ThreadInfo; // 0x00
BitnessType_t<std::uintptr_t> StackBase; // 0x40 / 0x50
BitnessType_t<std::uintptr_t> StackLimit; // 0x44 / 0x58
BitnessType_t<void*> Win32StartAddress; // 0x48 / 0x60
#if Q_NT_VERSION >= Q_NT_VISTA
BitnessType_t<void*> TebBase; // 0x4C / 0x68
#else
BitnessType_t<std::uintptr_t> Reserved1; // 0x4C / 0x68
#endif
BitnessType_t<std::uintptr_t> Reserved2; // 0x50 / 0x70
BitnessType_t<std::uintptr_t> Reserved3; // 0x54 / 0x78
BitnessType_t<std::uintptr_t> Reserved4; // 0x58 / 0x80
};
_Q_NT_BIT_ASSERT(SYSTEM_EXTENDED_THREAD_INFORMATION, 0x60, 0x88);
_Q_NT_BIT_TEMPLATE struct SYSTEM_PROCESS_INFORMATION
{
private:
_Q_NT_BIT_TYPE
public:
std::uint32_t NextEntryOffset; // 0x00
std::uint32_t NumberOfThreads; // 0x04
#if Q_NT_VERSION >= Q_NT_VISTA
LARGE_INTEGER WorkingSetPrivateSize; // 0x08
#else
LARGE_INTEGER SpareLi1; // 0x08
#endif
#if Q_NT_VERSION >= Q_NT_WIN7
std::uint32_t HardFaultCount; // 0x10
std::uint32_t NumberOfThreadsHighWatermark; // 0x14
LARGE_INTEGER CycleTime; // 0x18
#else
LARGE_INTEGER SpareLi2; // 0x10
LARGE_INTEGER SpareLi3; // 0x18
#endif
LARGE_INTEGER CreateTime; // 0x20
LARGE_INTEGER UserTime; // 0x28
LARGE_INTEGER KernelTime; // 0x30
UNICODE_STRING<nBitness> ImageName; // 0x38
KPRIORITY BasePriority; // 0x40 / 0x48
BitnessType_t<std::uintptr_t> UniqueProcessId; // 0x44 / 0x50
BitnessType_t<std::uintptr_t> InheritedFromUniqueProcessId; // 0x48 / 0x58
std::uint32_t HandleCount; // 0x4C / 0x60
std::uint32_t SessionId; // 0x50 / 0x64
BitnessType_t<HANDLE> UniqueProcessKey; // 0x54 / 0x68 // requires 'SystemExtendedProcessInformation'
BitnessType_t<std::size_t> PeakVirtualSize; // 0x58 / 0x70
BitnessType_t<std::size_t> VirtualSize; // 0x5C / 0x78
std::uint32_t PageFaultCount; // 0x60 / 0x80
BitnessType_t<std::size_t> PeakWorkingSetSize; // 0x64 / 0x88
BitnessType_t<std::size_t> WorkingSetSize; // 0x68 / 0x90
BitnessType_t<std::size_t> QuotaPeakPagedPoolUsage; // 0x6C / 0x98
BitnessType_t<std::size_t> QuotaPagedPoolUsage; // 0x70 / 0xA0
BitnessType_t<std::size_t> QuotaPeakNonPagedPoolUsage; // 0x74 / 0xA8
BitnessType_t<std::size_t> QuotaNonPagedPoolUsage; // 0x78 / 0xB0
BitnessType_t<std::size_t> PagefileUsage; // 0x7C / 0xB8
BitnessType_t<std::size_t> PeakPagefileUsage; // 0x80 / 0xC0
BitnessType_t<std::size_t> PrivatePageCount; // 0x84 / 0xC8
LARGE_INTEGER ReadOperationCount; // 0x88 / 0xD0
LARGE_INTEGER WriteOperationCount; // 0x90 / 0xD8
LARGE_INTEGER OtherOperationCount; // 0x98 / 0xE0
LARGE_INTEGER ReadTransferCount; // 0xA0 / 0xE8
LARGE_INTEGER WriteTransferCount; // 0xA8 / 0xF0
LARGE_INTEGER OtherTransferCount; // 0xB0 / 0xF8
//_SYSTEM_THREAD_INFORMATION<nBitness> Threads[ANYSIZE_ARRAY]; // requires 'SystemProcessInformation'
//_SYSTEM_EXTENDED_THREAD_INFORMATION Threads[ANYSIZE_ARRAY]; // requires 'SystemExtendedProcessInformation'
//_SYSTEM_PROCESS_INFORMATION_EXTENSION Extension; // requires 'SystemFullProcessInformation'
};
_Q_NT_BIT_ASSERT(SYSTEM_PROCESS_INFORMATION, 0xB8, 0x100);
struct SYSTEM_CALL_COUNT_INFORMATION
{
std::uint32_t Length; // 0x0
std::uint32_t NumberOfTables; // 0x4
};
static_assert(sizeof(SYSTEM_CALL_COUNT_INFORMATION) == 0x8);
struct SYSTEM_DEVICE_INFORMATION
{
std::uint32_t NumberOfDisks; // 0x00
std::uint32_t NumberOfFloppies; // 0x04
std::uint32_t NumberOfCdRoms; // 0x08
std::uint32_t NumberOfTapes; // 0x0C
std::uint32_t NumberOfSerialPorts; // 0x10
std::uint32_t NumberOfParallelPorts; // 0x14
};
static_assert(sizeof(SYSTEM_DEVICE_INFORMATION) == 0x18);
struct SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
{
LARGE_INTEGER IdleTime; // 0x00
LARGE_INTEGER KernelTime; // 0x08
LARGE_INTEGER UserTime; // 0x10
LARGE_INTEGER DpcTime; // 0x18
LARGE_INTEGER InterruptTime; // 0x20
std::uint32_t InterruptCount; // 0x28
};
static_assert(sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION) == 0x30);
// global flags that can be set to control system behavior
#define FLG_STOP_ON_EXCEPTION 0x00000001 // user and kernel mode
#define FLG_SHOW_LDR_SNAPS 0x00000002 // user and kernel mode
#define FLG_DEBUG_INITIAL_COMMAND 0x00000004 // kernel mode only up until WINLOGON started
#define FLG_STOP_ON_HUNG_GUI 0x00000008 // kernel mode only while running
#define FLG_HEAP_ENABLE_TAIL_CHECK 0x00000010 // user mode only
#define FLG_HEAP_ENABLE_FREE_CHECK 0x00000020 // user mode only
#define FLG_HEAP_VALIDATE_PARAMETERS 0x00000040 // user mode only
#define FLG_HEAP_VALIDATE_ALL 0x00000080 // user mode only
#define FLG_APPLICATION_VERIFIER 0x00000100 // user mode only
#define FLG_POOL_ENABLE_TAGGING 0x00000400 // kernel mode only
#define FLG_HEAP_ENABLE_TAGGING 0x00000800 // user mode only
#define FLG_USER_STACK_TRACE_DB 0x00001000 // x86 user mode only
#define FLG_KERNEL_STACK_TRACE_DB 0x00002000 // x86 kernel mode only at boot time
#define FLG_MAINTAIN_OBJECT_TYPELIST 0x00004000 // kernel mode only at boot time
#define FLG_HEAP_ENABLE_TAG_BY_DLL 0x00008000 // user mode only
#define FLG_DISABLE_STACK_EXTENSION 0x00010000 // user mode only
#define FLG_ENABLE_CSRDEBUG 0x00020000 // kernel mode only at boot time
#define FLG_ENABLE_KDEBUG_SYMBOL_LOAD 0x00040000 // kernel mode only
#define FLG_DISABLE_PAGE_KERNEL_STACKS 0x00080000 // kernel mode only at boot time
#define FLG_ENABLE_SYSTEM_CRIT_BREAKS 0x00100000 // user mode only
#define FLG_HEAP_DISABLE_COALESCING 0x00200000 // user mode only
#define FLG_ENABLE_CLOSE_EXCEPTIONS 0x00400000 // kernel mode only
#define FLG_ENABLE_EXCEPTION_LOGGING 0x00800000 // kernel mode only
#define FLG_ENABLE_HANDLE_TYPE_TAGGING 0x01000000 // kernel mode only
#define FLG_HEAP_PAGE_ALLOCS 0x02000000 // user mode only
#define FLG_DEBUG_INITIAL_COMMAND_EX 0x04000000 // kernel mode only up until WINLOGON started
#define FLG_DISABLE_DBGPRINT 0x08000000 // kernel mode only
#define FLG_CRITSEC_EVENT_CREATION 0x10000000 // user mode only, force early creation of resource events
#define FLG_LDR_TOP_DOWN 0x20000000 // user mode only, win64 only
#define FLG_ENABLE_HANDLE_EXCEPTIONS 0x40000000 // kernel mode only
#define FLG_DISABLE_PROTDLLS 0x80000000 // user mode only (smss/winlogon)
struct SYSTEM_FLAGS_INFORMATION
{
std::uint32_t Flags; // FLG_*
};
static_assert(sizeof(SYSTEM_FLAGS_INFORMATION) == 0x4);
struct SYSTEM_CALL_TIME_INFORMATION
{
std::uint32_t Length; // 0x0
std::uint32_t TotalCalls; // 0x4
LARGE_INTEGER TimeOfCalls[ANYSIZE_ARRAY]; // 0x8
};
_Q_NT_BIT_TEMPLATE struct SYSTEM_HANDLE_TABLE_ENTRY_INFO
{
private:
_Q_NT_BIT_TYPE
public:
std::uint16_t UniqueProcessId; // 0x00
std::uint16_t CreatorBackTraceIndex; // 0x02
std::uint8_t ObjectTypeIndex; // 0x04
std::uint8_t HandleAttributes; // 0x05
std::uint16_t HandleValue; // 0x06
BitnessType_t<void*> Object; // 0x08
ACCESS_MASK GrantedAccess; // 0x0C / 0x10
};
_Q_NT_BIT_ASSERT(SYSTEM_HANDLE_TABLE_ENTRY_INFO, 0x10, 0x18);
_Q_NT_BIT_TEMPLATE struct SYSTEM_HANDLE_INFORMATION
{
std::uint32_t NumberOfHandles; // 0x0
SYSTEM_HANDLE_TABLE_ENTRY_INFO<nBitness> Handles[ANYSIZE_ARRAY]; // 0x4 / 0x8
};
_Q_NT_BIT_TEMPLATE struct SYSTEM_OBJECT_INFORMATION
{
private:
_Q_NT_BIT_TYPE
public:
std::uint32_t NextEntryOffset; // 0x00
BitnessType_t<void*> Object; // 0x04 / 0x08
BitnessType_t<HANDLE> CreatorUniqueProcess; // 0x08 / 0x10
std::uint16_t CreatorBackTraceIndex; // 0x0C / 0x18
std::uint16_t Flags; // 0x0E / 0x1A
std::int32_t PointerCount; // 0x10 / 0x1C
std::int32_t HandleCount; // 0x14 / 0x20
std::uint32_t PagedPoolCharge; // 0x18 / 0x24
std::uint32_t NonPagedPoolCharge; // 0x1C / 0x28
BitnessType_t<HANDLE> ExclusiveProcessId; // 0x20 / 0x30
BitnessType_t<void*> SecurityDescriptor; // 0x24 / 0x38
OBJECT_NAME_INFORMATION<nBitness> NameInfo; // 0x28 / 0x40
};
_Q_NT_BIT_ASSERT(SYSTEM_OBJECT_INFORMATION, 0x30, 0x50);
_Q_NT_BIT_TEMPLATE struct SYSTEM_OBJECTTYPE_INFORMATION
{
std::uint32_t NextEntryOffset; // 0x00
std::uint32_t NumberOfObjects; // 0x04
std::uint32_t NumberOfHandles; // 0x08
std::uint32_t TypeIndex; // 0x0C
std::uint32_t InvalidAttributes; // 0x10
GENERIC_MAPPING GenericMapping; // 0x14
ACCESS_MASK ValidAccessMask; // 0x24
std::uint32_t PoolType; // 0x28
bool SecurityRequired; // 0x2C
bool WaitableObject; // 0x2D
UNICODE_STRING<nBitness> TypeName; // 0x30
};
_Q_NT_BIT_ASSERT(SYSTEM_OBJECTTYPE_INFORMATION, 0x38, 0x40);
_Q_NT_BIT_TEMPLATE struct SYSTEM_PAGEFILE_INFORMATION
{
std::uint32_t NextEntryOffset; // 0x00
std::uint32_t TotalSize; // 0x04
std::uint32_t TotalInUse; // 0x08
std::uint32_t PeakUsage; // 0x0C
UNICODE_STRING<nBitness> PageFileName; // 0x10
};
_Q_NT_BIT_ASSERT(SYSTEM_PAGEFILE_INFORMATION, 0x18, 0x20);
struct SYSTEM_VDM_INSTEMUL_INFO
{
std::uint32_t SegmentNotPresent; // 0x00
std::uint32_t VdmOpcode0F; // 0x04
std::uint32_t OpcodeESPrefix; // 0x08
std::uint32_t OpcodeCSPrefix; // 0x0C
std::uint32_t OpcodeSSPrefix; // 0x10
std::uint32_t OpcodeDSPrefix; // 0x14
std::uint32_t OpcodeFSPrefix; // 0x18
std::uint32_t OpcodeGSPrefix; // 0x1C
std::uint32_t OpcodeOPER32Prefix; // 0x20
std::uint32_t OpcodeADDR32Prefix; // 0x24
std::uint32_t OpcodeINSB; // 0x28
std::uint32_t OpcodeINSW; // 0x2C
std::uint32_t OpcodeOUTSB; // 0x30
std::uint32_t OpcodeOUTSW; // 0x34
std::uint32_t OpcodePUSHF; // 0x38
std::uint32_t OpcodePOPF; // 0x3C
std::uint32_t OpcodeINTnn; // 0x40
std::uint32_t OpcodeINTO; // 0x44
std::uint32_t OpcodeIRET; // 0x48
std::uint32_t OpcodeINBimm; // 0x4C
std::uint32_t OpcodeINWimm; // 0x50
std::uint32_t OpcodeOUTBimm; // 0x54
std::uint32_t OpcodeOUTWimm; // 0x58
std::uint32_t OpcodeINB; // 0x5C
std::uint32_t OpcodeINW; // 0x60
std::uint32_t OpcodeOUTB; // 0x64
std::uint32_t OpcodeOUTW; // 0x68
std::uint32_t OpcodeLOCKPrefix; // 0x6C
std::uint32_t OpcodeREPNEPrefix; // 0x70
std::uint32_t OpcodeREPPrefix; // 0x74
std::uint32_t OpcodeHLT; // 0x78
std::uint32_t OpcodeCLI; // 0x7C
std::uint32_t OpcodeSTI; // 0x80
std::uint32_t BopCount; // 0x84
};
static_assert(sizeof(SYSTEM_VDM_INSTEMUL_INFO) == 0x88);
_Q_NT_BIT_TEMPLATE struct SYSTEM_FILECACHE_INFORMATION
{
private:
_Q_NT_BIT_TYPE
public:
BitnessType_t<std::size_t> CurrentSize; // 0x00
BitnessType_t<std::size_t> PeakSize; // 0x04 / 0x08
std::uint32_t PageFaultCount; // 0x08 / 0x10
BitnessType_t<std::size_t> MinimumWorkingSet; // 0x0C / 0x18
BitnessType_t<std::size_t> MaximumWorkingSet; // 0x10 / 0x20
BitnessType_t<std::size_t> CurrentSizeIncludingTransitionInPages; // 0x14 / 0x28
BitnessType_t<std::size_t> PeakSizeIncludingTransitionInPages; // 0x18 / 0x30
std::uint32_t TransitionRePurposeCount; // 0x1C / 0x38
std::uint32_t Flags; // 0x20 / 0x3C
};
_Q_NT_BIT_ASSERT(SYSTEM_FILECACHE_INFORMATION, 0x24, 0x40);
_Q_NT_BIT_TEMPLATE struct SYSTEM_POOLTAG
{
private:
_Q_NT_BIT_TYPE
public:
union
{
std::uint8_t Tag[4];
std::uint32_t TagUlong;
}; // 0x00
std::uint32_t PagedAllocs; // 0x04
std::uint32_t PagedFrees; // 0x08
BitnessType_t<std::size_t> PagedUsed; // 0x0C / 0x10
std::uint32_t NonPagedAllocs; // 0x10 / 0x18
std::uint32_t NonPagedFrees; // 0x14 / 0x1C
BitnessType_t<std::size_t> NonPagedUsed; // 0x18 / 0x20
};
_Q_NT_BIT_ASSERT(SYSTEM_POOLTAG, 0x1C, 0x28);
_Q_NT_BIT_TEMPLATE struct SYSTEM_POOLTAG_INFORMATION
{
std::uint32_t Count; // 0x0
SYSTEM_POOLTAG<nBitness> TagInfo[ANYSIZE_ARRAY]; // 0x4
};
struct SYSTEM_INTERRUPT_INFORMATION
{
std::uint32_t ContextSwitches; // 0x00
std::uint32_t DpcCount; // 0x04
std::uint32_t DpcRate; // 0x08
std::uint32_t TimeIncrement; // 0x0C
std::uint32_t DpcBypassCount; // 0x10
std::uint32_t ApcBypassCount; // 0x14
};
static_assert(sizeof(SYSTEM_INTERRUPT_INFORMATION) == 0x18);
struct SYSTEM_DPC_BEHAVIOR_INFORMATION
{
std::uint32_t Spare; // 0x00
std::uint32_t DpcQueueDepth; // 0x04
std::uint32_t MinimumDpcRate; // 0x08
std::uint32_t AdjustDpcThreshold; // 0x0C
std::uint32_t IdealDpcRate; // 0x10
};
static_assert(sizeof(SYSTEM_DPC_BEHAVIOR_INFORMATION) == 0x14);
struct SYSTEM_QUERY_TIME_ADJUST_INFORMATION
{
std::uint32_t TimeAdjustment; // 0x0
std::uint32_t TimeIncrement; // 0x4
bool Enable; // 0x8
};
static_assert(sizeof(SYSTEM_QUERY_TIME_ADJUST_INFORMATION) == 0xC);
#if Q_NT_VERSION >= Q_NT_WIN10_RS3
struct SYSTEM_QUERY_TIME_ADJUST_INFORMATION_PRECISE
{
std::uint64_t TimeAdjustment; // 0x00
std::uint64_t TimeIncrement; // 0x08
bool Enable; // 0x10
};
static_assert(sizeof(SYSTEM_QUERY_TIME_ADJUST_INFORMATION_PRECISE) == 0x18);
#endif
struct SYSTEM_SET_TIME_ADJUST_INFORMATION
{
std::uint32_t TimeAdjustment; // 0x0
bool Enable; // 0x4
};
static_assert(sizeof(SYSTEM_SET_TIME_ADJUST_INFORMATION) == 0x8);
#if Q_NT_VERSION >= Q_NT_WIN10_RS3
struct SYSTEM_SET_TIME_ADJUST_INFORMATION_PRECISE
{
std::uint64_t TimeAdjustment; // 0x0
bool Enable; // 0x8
};
static_assert(sizeof(SYSTEM_SET_TIME_ADJUST_INFORMATION_PRECISE) == 0x10);
#endif
struct SYSTEM_EXCEPTION_INFORMATION
{
std::uint32_t AlignmentFixupCount; // 0x0
std::uint32_t ExceptionDispatchCount; // 0x4
std::uint32_t FloatingEmulationCount; // 0x8
std::uint32_t ByteWordEmulationCount; // 0xC
};
static_assert(sizeof(SYSTEM_EXCEPTION_INFORMATION) == 0x10);
using SYSTEM_CRASH_DUMP_CONFIGURATION_CLASS = enum _SYSTEM_CRASH_DUMP_CONFIGURATION_CLASS : std::uint32_t
{
SystemCrashDumpDisable = 0,
SystemCrashDumpReconfigure = 1,
#if Q_NT_VERSION >= Q_NT_WIN7
SystemCrashDumpInitializationComplete = 2
#endif
};
struct SYSTEM_CRASH_DUMP_STATE_INFORMATION
{
SYSTEM_CRASH_DUMP_CONFIGURATION_CLASS CrashDumpConfigurationClass;
};
static_assert(sizeof(SYSTEM_CRASH_DUMP_STATE_INFORMATION) == 0x4);
struct SYSTEM_KERNEL_DEBUGGER_INFORMATION
{
bool KernelDebuggerEnabled; // 0x0
bool KernelDebuggerNotPresent; // 0x1
};
static_assert(sizeof(SYSTEM_KERNEL_DEBUGGER_INFORMATION) == 0x2);
struct SYSTEM_CONTEXT_SWITCH_INFORMATION
{
std::uint32_t ContextSwitches; // 0x00
std::uint32_t FindAny; // 0x04
std::uint32_t FindLast; // 0x08
std::uint32_t FindIdeal; // 0x0C
std::uint32_t IdleAny; // 0x10
std::uint32_t IdleCurrent; // 0x14
std::uint32_t IdleLast; // 0x18
std::uint32_t IdleIdeal; // 0x1C
std::uint32_t PreemptAny; // 0x20
std::uint32_t PreemptCurrent; // 0x24
std::uint32_t PreemptLast; // 0x28
std::uint32_t SwitchToIdle; // 0x2C
};
static_assert(sizeof(SYSTEM_CONTEXT_SWITCH_INFORMATION) == 0x30);
_Q_NT_BIT_TEMPLATE struct SYSTEM_REGISTRY_QUOTA_INFORMATION
{
private:
_Q_NT_BIT_TYPE
public:
std::uint32_t RegistryQuotaAllowed; // 0x0
std::uint32_t RegistryQuotaUsed; // 0x4
BitnessType_t<std::size_t> PagedPoolSize; // 0x8
};
_Q_NT_BIT_ASSERT(SYSTEM_REGISTRY_QUOTA_INFORMATION, 0xC, 0x10);
struct SYSTEM_PROCESSOR_IDLE_INFORMATION
{
std::uint64_t IdleTime; // 0x00
std::uint64_t C1Time; // 0x08
std::uint64_t C2Time; // 0x10
std::uint64_t C3Time; // 0x18
std::uint32_t C1Transitions; // 0x20
std::uint32_t C2Transitions; // 0x24
std::uint32_t C3Transitions; // 0x28
std::uint32_t Padding; // 0x2C
};
static_assert(sizeof(SYSTEM_PROCESSOR_IDLE_INFORMATION) == 0x30);
_Q_NT_BIT_TEMPLATE struct SYSTEM_LEGACY_DRIVER_INFORMATION
{
std::uint32_t VetoType; // 0x0
UNICODE_STRING<nBitness> VetoList; // 0x4 / 0x8
};
_Q_NT_BIT_ASSERT(SYSTEM_LEGACY_DRIVER_INFORMATION, 0xC, 0x18);
struct SYSTEM_LOOKASIDE_INFORMATION
{
std::uint16_t CurrentDepth; // 0x00
std::uint16_t MaximumDepth; // 0x02
std::uint32_t TotalAllocates; // 0x04
std::uint32_t AllocateMisses; // 0x08
std::uint32_t TotalFrees; // 0x0C
std::uint32_t FreeMisses; // 0x10
std::uint32_t Type; // 0x14
std::uint32_t Tag; // 0x18
std::uint32_t Size; // 0x1C
};
static_assert(sizeof(SYSTEM_LOOKASIDE_INFORMATION) == 0x20);
_Q_NT_BIT_TEMPLATE struct SYSTEM_VERIFIER_INFORMATION
{
private:
_Q_NT_BIT_TYPE
public:
std::uint32_t NextEntryOffset; // 0x00
std::uint32_t Level; // 0x04
#if Q_NT_VERSION >= Q_NT_WIN10_RS5
std::uint32_t RuleClasses[2]; // 0x08
std::uint32_t TriageContext; // 0x10
std::uint32_t AreAllDriversBeingVerified; // 0x14
#endif
UNICODE_STRING<nBitness> DriverName; // 0x18
std::uint32_t RaiseIrqls; // 0x20 / 0x28
std::uint32_t AcquireSpinLocks; // 0x24 / 0x2C