Merge 25584, 25588.
[reactos.git] / reactos / include / ndk / extypes.h
1 /*++ NDK Version: 0098
2
3 Copyright (c) Alex Ionescu. All rights reserved.
4
5 Header Name:
6
7 extypes.h
8
9 Abstract:
10
11 Type definitions for the Executive.
12
13 Author:
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(_MSC_VER) && !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
35 //
36 // GCC compatibility
37 //
38 #if defined(__GNUC__)
39 #define __ALIGNED(n) __attribute__((aligned (n)))
40 #elif defined(_MSC_VER)
41 #define __ALIGNED(n) __declspec(align(n))
42 #else
43 #error __ALIGNED not defined for your compiler!
44 #endif
45
46 //
47 // Atom and Language IDs
48 //
49 typedef USHORT LANGID, *PLANGID;
50 typedef USHORT RTL_ATOM, *PRTL_ATOM;
51
52 #ifndef NTOS_MODE_USER
53
54 //
55 // Kernel Exported Object Types
56 //
57 extern POBJECT_TYPE NTSYSAPI ExDesktopObjectType;
58 extern POBJECT_TYPE NTSYSAPI ExWindowStationObjectType;
59 extern POBJECT_TYPE NTSYSAPI ExIoCompletionType;
60 extern POBJECT_TYPE NTSYSAPI ExMutantObjectType;
61 extern POBJECT_TYPE NTSYSAPI ExTimerType;
62
63 //
64 // Exported NT Build Number
65 //
66 extern ULONG NtBuildNumber;
67
68 //
69 // Invalid Handle Value Constant
70 //
71 #define INVALID_HANDLE_VALUE (HANDLE)-1
72
73 #endif
74
75 //
76 // Increments
77 //
78 #define MUTANT_INCREMENT 1
79
80 //
81 // Callback Object Access Mask
82 //
83 #define CALLBACK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x0001)
84 #define CALLBACK_EXECUTE (STANDARD_RIGHTS_EXECUTE|SYNCHRONIZE|0x0001)
85 #define CALLBACK_WRITE (STANDARD_RIGHTS_WRITE|SYNCHRONIZE|0x0001)
86 #define CALLBACK_READ (STANDARD_RIGHTS_READ|SYNCHRONIZE|0x0001)
87
88 //
89 // Event Object Access Masks
90 //
91 #ifdef NTOS_MODE_USER
92 #define EVENT_QUERY_STATE 0x0001
93
94 //
95 // Semaphore Object Access Masks
96 //
97 #define SEMAPHORE_QUERY_STATE 0x0001
98 #else
99
100 //
101 // Mutant Object Access Masks
102 //
103 #define MUTANT_QUERY_STATE 0x0001
104 #define MUTANT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \
105 SYNCHRONIZE | \
106 MUTANT_QUERY_STATE)
107
108 #define TIMER_QUERY_STATE 0x0001
109 #define TIMER_MODIFY_STATE 0x0002
110 #define TIMER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \
111 SYNCHRONIZE | \
112 TIMER_QUERY_STATE | \
113 TIMER_MODIFY_STATE)
114 #endif
115
116 //
117 // Event Pair Access Masks
118 //
119 #define EVENT_PAIR_ALL_ACCESS 0x1F0000L
120
121 //
122 // Profile Object Access Masks
123 //
124 #define PROFILE_CONTROL 0x0001
125 #define PROFILE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | PROFILE_CONTROL)
126
127 //
128 // Maximum Parameters for NtRaiseHardError
129 //
130 #define MAXIMUM_HARDERROR_PARAMETERS 4
131
132 //
133 // Pushlock bits
134 //
135 #define EX_PUSH_LOCK_LOCK_V ((ULONG_PTR)0x0)
136 #define EX_PUSH_LOCK_LOCK ((ULONG_PTR)0x1)
137 #define EX_PUSH_LOCK_WAITING ((ULONG_PTR)0x2)
138 #define EX_PUSH_LOCK_WAKING ((ULONG_PTR)0x4)
139 #define EX_PUSH_LOCK_MULTIPLE_SHARED ((ULONG_PTR)0x8)
140 #define EX_PUSH_LOCK_SHARE_INC ((ULONG_PTR)0x10)
141 #define EX_PUSH_LOCK_PTR_BITS ((ULONG_PTR)0xf)
142
143 //
144 // Pushlock Wait Block Flags
145 //
146 #define EX_PUSH_LOCK_FLAGS_EXCLUSIVE 1
147 #define EX_PUSH_LOCK_FLAGS_WAIT 2
148
149 //
150 // Resource (ERESOURCE) Flags
151 //
152 #define ResourceHasDisabledPriorityBoost 0x08
153
154 //
155 // Shutdown types for NtShutdownSystem
156 //
157 typedef enum _SHUTDOWN_ACTION
158 {
159 ShutdownNoReboot,
160 ShutdownReboot,
161 ShutdownPowerOff
162 } SHUTDOWN_ACTION;
163
164 //
165 // Responses for NtRaiseHardError
166 //
167 typedef enum _HARDERROR_RESPONSE_OPTION
168 {
169 OptionAbortRetryIgnore,
170 OptionOk,
171 OptionOkCancel,
172 OptionRetryCancel,
173 OptionYesNo,
174 OptionYesNoCancel,
175 OptionShutdownSystem
176 } HARDERROR_RESPONSE_OPTION, *PHARDERROR_RESPONSE_OPTION;
177
178 typedef enum _HARDERROR_RESPONSE
179 {
180 ResponseReturnToCaller,
181 ResponseNotHandled,
182 ResponseAbort,
183 ResponseCancel,
184 ResponseIgnore,
185 ResponseNo,
186 ResponseOk,
187 ResponseRetry,
188 ResponseYes,
189 ResponseTryAgain,
190 ResponseContinue
191 } HARDERROR_RESPONSE, *PHARDERROR_RESPONSE;
192
193 //
194 // System Information Classes for NtQuerySystemInformation
195 //
196 typedef enum _SYSTEM_INFORMATION_CLASS
197 {
198 SystemBasicInformation,
199 SystemProcessorInformation,
200 SystemPerformanceInformation,
201 SystemTimeOfDayInformation,
202 SystemPathInformation, /// Obsolete: Use KUSER_SHARED_DATA
203 SystemProcessInformation,
204 SystemCallCountInformation,
205 SystemDeviceInformation,
206 SystemProcessorPerformanceInformation,
207 SystemFlagsInformation,
208 SystemCallTimeInformation,
209 SystemModuleInformation,
210 SystemLocksInformation,
211 SystemStackTraceInformation,
212 SystemPagedPoolInformation,
213 SystemNonPagedPoolInformation,
214 SystemHandleInformation,
215 SystemObjectInformation,
216 SystemPageFileInformation,
217 SystemVdmInstemulInformation,
218 SystemVdmBopInformation,
219 SystemFileCacheInformation,
220 SystemPoolTagInformation,
221 SystemInterruptInformation,
222 SystemDpcBehaviorInformation,
223 SystemFullMemoryInformation,
224 SystemLoadGdiDriverInformation,
225 SystemUnloadGdiDriverInformation,
226 SystemTimeAdjustmentInformation,
227 SystemSummaryMemoryInformation,
228 SystemMirrorMemoryInformation,
229 SystemPerformanceTraceInformation,
230 SystemObsolete0,
231 SystemExceptionInformation,
232 SystemCrashDumpStateInformation,
233 SystemKernelDebuggerInformation,
234 SystemContextSwitchInformation,
235 SystemRegistryQuotaInformation,
236 SystemExtendServiceTableInformation,
237 SystemPrioritySeperation,
238 SystemPlugPlayBusInformation,
239 SystemDockInformation,
240 SystemPowerInformationNative,
241 SystemProcessorSpeedInformation,
242 SystemCurrentTimeZoneInformation,
243 SystemLookasideInformation,
244 SystemTimeSlipNotification,
245 SystemSessionCreate,
246 SystemSessionDetach,
247 SystemSessionInformation,
248 SystemRangeStartInformation,
249 SystemVerifierInformation,
250 SystemAddVerifier,
251 SystemSessionProcessesInformation,
252 SystemLoadGdiDriverInSystemSpaceInformation,
253 SystemNumaProcessorMap,
254 SystemPrefetcherInformation,
255 SystemExtendedProcessInformation,
256 SystemRecommendedSharedDataAlignment,
257 SystemComPlusPackage,
258 SystemNumaAvailableMemory,
259 SystemProcessorPowerInformation,
260 SystemEmulationBasicInformation,
261 SystemEmulationProcessorInformation,
262 SystemExtendedHanfleInformation,
263 SystemLostDelayedWriteInformation,
264 SystemBigPoolInformation,
265 SystemSessionPoolTagInformation,
266 SystemSessionMappedViewInformation,
267 SystemHotpatchInformation,
268 SystemObjectSecurityMode,
269 SystemWatchDogTimerHandler,
270 SystemWatchDogTimerInformation,
271 SystemLogicalProcessorInformation,
272 SystemWo64SharedInformationObosolete,
273 SystemRegisterFirmwareTableInformationHandler,
274 SystemFirmwareTableInformation,
275 SystemModuleInformationEx,
276 SystemVerifierTriageInformation,
277 SystemSuperfetchInformation,
278 SystemMemoryListInformation,
279 SystemFileCacheInformationEx,
280 SystemThreadPriorityClientIdInformation,
281 SystemProcessorIdleCycleTimeInformation,
282 SystemVerifierCancellationInformation,
283 SystemProcessorPowerInformationEx,
284 SystemRefTraceInformation,
285 SystemSpecialPoolInformation,
286 SystemProcessIdInformation,
287 SystemErrorPortInformation,
288 SystemBootEnvironmentInformation,
289 SystemHypervisorInformation,
290 SystemVerifierInformationEx,
291 SystemTimeZoneInformation,
292 SystemImageFileExecutionOptionsInformation,
293 SystemCoverageInformation,
294 SystemPrefetchPathInformation,
295 SystemVerifierFaultsInformation,
296 MaxSystemInfoClass,
297 } SYSTEM_INFORMATION_CLASS;
298
299 //
300 // System Information Classes for NtQueryMutant
301 //
302 typedef enum _MUTANT_INFORMATION_CLASS
303 {
304 MutantBasicInformation,
305 MutantOwnerInformation
306 } MUTANT_INFORMATION_CLASS;
307
308 //
309 // System Information Classes for NtQueryAtom
310 //
311 typedef enum _ATOM_INFORMATION_CLASS
312 {
313 AtomBasicInformation,
314 AtomTableInformation,
315 } ATOM_INFORMATION_CLASS;
316
317 //
318 // System Information Classes for NtQueryTimer
319 //
320 typedef enum _TIMER_INFORMATION_CLASS
321 {
322 TimerBasicInformation
323 } TIMER_INFORMATION_CLASS;
324
325 //
326 // System Information Classes for NtQuerySemaphore
327 //
328 typedef enum _SEMAPHORE_INFORMATION_CLASS
329 {
330 SemaphoreBasicInformation
331 } SEMAPHORE_INFORMATION_CLASS;
332
333 //
334 // System Information Classes for NtQueryEvent
335 //
336 typedef enum _EVENT_INFORMATION_CLASS
337 {
338 EventBasicInformation
339 } EVENT_INFORMATION_CLASS;
340
341 #ifdef NTOS_MODE_USER
342
343 //
344 // Firmware Table Actions for SystemFirmwareTableInformation
345 //
346 typedef enum _SYSTEM_FIRMWARE_TABLE_ACTION
347 {
348 SystemFirmwareTable_Enumerate = 0,
349 SystemFirmwareTable_Get = 1,
350 } SYSTEM_FIRMWARE_TABLE_ACTION, *PSYSTEM_FIRMWARE_TABLE_ACTION;
351
352 //
353 // Firmware Handler Callback
354 //
355 struct _SYSTEM_FIRMWARE_TABLE_INFORMATION;
356 typedef
357 NTSTATUS
358 (__cdecl *PFNFTH)(
359 IN struct _SYSTEM_FIRMWARE_TABLE_INFORMATION *FirmwareTableInformation
360 );
361
362 #else
363
364 //
365 // Compatibility with Windows XP Drivers using ERESOURCE
366 //
367 typedef struct _ERESOURCE_XP
368 {
369 LIST_ENTRY SystemResourcesList;
370 POWNER_ENTRY OwnerTable;
371 SHORT ActiveCount;
372 USHORT Flag;
373 PKSEMAPHORE SharedWaiters;
374 PKEVENT ExclusiveWaiters;
375 OWNER_ENTRY OwnerThreads[2];
376 ULONG ContentionCount;
377 USHORT NumberOfSharedWaiters;
378 USHORT NumberOfExclusiveWaiters;
379 union
380 {
381 PVOID Address;
382 ULONG_PTR CreatorBackTraceIndex;
383 };
384 KSPIN_LOCK SpinLock;
385 } ERESOURCE_XP, *PERESOURCE_XP;
386
387 //
388 // Executive Work Queue Structures
389 //
390 typedef struct _EX_QUEUE_WORKER_INFO
391 {
392 ULONG QueueDisabled:1;
393 ULONG MakeThreadsAsNecessary:1;
394 ULONG WaitMode:1;
395 ULONG WorkerCount:29;
396 } EX_QUEUE_WORKER_INFO, *PEX_QUEUE_WORKER_INFO;
397
398 typedef struct _EX_WORK_QUEUE
399 {
400 KQUEUE WorkerQueue;
401 LONG DynamicThreadCount;
402 ULONG WorkItemsProcessed;
403 ULONG WorkItemsProcessedLastPass;
404 ULONG QueueDepthLastPass;
405 EX_QUEUE_WORKER_INFO Info;
406 } EX_WORK_QUEUE, *PEX_WORK_QUEUE;
407
408 //
409 // Executive Fast Reference Structure
410 //
411 typedef struct _EX_FAST_REF
412 {
413 union
414 {
415 PVOID Object;
416 ULONG_PTR RefCnt:3;
417 ULONG_PTR Value;
418 };
419 } EX_FAST_REF, *PEX_FAST_REF;
420
421 //
422 // Executive Cache-Aware Rundown Reference Descriptor
423 //
424 typedef struct _EX_RUNDOWN_REF_CACHE_AWARE
425 {
426 PEX_RUNDOWN_REF RunRefs;
427 PVOID PoolToFree;
428 ULONG RunRefSize;
429 ULONG Number;
430 } EX_RUNDOWN_REF_CACHE_AWARE, *PEX_RUNDOWN_REF_CACHE_AWARE;
431
432 //
433 // Executive Rundown Wait Block
434 //
435 typedef struct _EX_RUNDOWN_WAIT_BLOCK
436 {
437 ULONG_PTR Count;
438 KEVENT WakeEvent;
439 } EX_RUNDOWN_WAIT_BLOCK, *PEX_RUNDOWN_WAIT_BLOCK;
440
441 //
442 // Executive Pushlock
443 //
444 #undef EX_PUSH_LOCK
445 #undef PEX_PUSH_LOCK
446 typedef struct _EX_PUSH_LOCK
447 {
448 union
449 {
450 struct
451 {
452 ULONG_PTR Locked:1;
453 ULONG_PTR Waiting:1;
454 ULONG_PTR Waking:1;
455 ULONG_PTR MultipleShared:1;
456 ULONG_PTR Shared:sizeof (ULONG_PTR) * 8 - 4;
457 };
458 ULONG_PTR Value;
459 PVOID Ptr;
460 };
461 } EX_PUSH_LOCK, *PEX_PUSH_LOCK;
462
463 //
464 // Executive Pushlock Wait Block
465 //
466 typedef __ALIGNED(16) struct _EX_PUSH_LOCK_WAIT_BLOCK
467 {
468 union
469 {
470 KGATE WakeGate;
471 KEVENT WakeEvent;
472 };
473 struct _EX_PUSH_LOCK_WAIT_BLOCK *Next;
474 struct _EX_PUSH_LOCK_WAIT_BLOCK *Last;
475 struct _EX_PUSH_LOCK_WAIT_BLOCK *Previous;
476 LONG ShareCount;
477 LONG Flags;
478 #if DBG
479 BOOLEAN Signaled;
480 EX_PUSH_LOCK NewValue;
481 EX_PUSH_LOCK OldValue;
482 PEX_PUSH_LOCK PushLock;
483 #endif
484 } EX_PUSH_LOCK_WAIT_BLOCK, *PEX_PUSH_LOCK_WAIT_BLOCK;
485
486 //
487 // Callback Object
488 //
489 typedef struct _CALLBACK_OBJECT
490 {
491 ULONG Name;
492 KSPIN_LOCK Lock;
493 LIST_ENTRY RegisteredCallbacks;
494 ULONG AllowMultipleCallbacks;
495 } CALLBACK_OBJECT , *PCALLBACK_OBJECT;
496
497 //
498 // Internal Callback Object
499 //
500 typedef struct _EX_CALLBACK_ROUTINE_BLOCK
501 {
502 EX_RUNDOWN_REF RundownProtect;
503 PVOID Function;
504 PVOID Context;
505 } EX_CALLBACK_ROUTINE_BLOCK, *PEX_CALLBACK_ROUTINE_BLOCK;
506
507 //
508 // Internal Callback Handle
509 //
510 typedef struct _EX_CALLBACK
511 {
512 EX_FAST_REF RoutineBlock;
513 } EX_CALLBACK, *PEX_CALLBACK;
514
515 //
516 // Profile Object
517 //
518 typedef struct _EPROFILE
519 {
520 PEPROCESS Process;
521 PVOID RangeBase;
522 SIZE_T RangeSize;
523 PVOID Buffer;
524 ULONG BufferSize;
525 ULONG BucketSize;
526 PKPROFILE ProfileObject;
527 PVOID LockedBufferAddress;
528 PMDL Mdl;
529 ULONG Segment;
530 KPROFILE_SOURCE ProfileSource;
531 KAFFINITY Affinity;
532 } EPROFILE, *PEPROFILE;
533
534 //
535 // Handle Table Structures
536 //
537 typedef struct _HANDLE_TRACE_DB_ENTRY
538 {
539 CLIENT_ID ClientId;
540 HANDLE Handle;
541 ULONG Type;
542 PVOID StackTrace[16];
543 } HANDLE_TRACE_DB_ENTRY, *PHANDLE_TRACE_DB_ENTRY;
544
545 typedef struct _HANDLE_TRACE_DEBUG_INFO
546 {
547 LONG RefCount;
548 ULONG TableSize;
549 ULONG BitMaskFlags;
550 FAST_MUTEX CloseCompatcionLock;
551 ULONG CurrentStackIndex;
552 HANDLE_TRACE_DB_ENTRY TraceDb[1];
553 } HANDLE_TRACE_DEBUG_INFO, *PHANDLE_TRACE_DEBUG_INFO;
554
555 typedef struct _HANDLE_TABLE_ENTRY_INFO
556 {
557 ULONG AuditMask;
558 } HANDLE_TABLE_ENTRY_INFO, *PHANDLE_TABLE_ENTRY_INFO;
559
560 typedef struct _HANDLE_TABLE_ENTRY
561 {
562 union
563 {
564 PVOID Object;
565 ULONG_PTR ObAttributes;
566 PHANDLE_TABLE_ENTRY_INFO InfoTable;
567 ULONG_PTR Value;
568 };
569 union
570 {
571 ULONG GrantedAccess;
572 struct
573 {
574 USHORT GrantedAccessIndex;
575 USHORT CreatorBackTraceIndex;
576 };
577 LONG NextFreeTableEntry;
578 };
579 } HANDLE_TABLE_ENTRY, *PHANDLE_TABLE_ENTRY;
580
581 //
582 // FIXME
583 //
584 #ifdef _REACTOS_
585 #undef NTDDI_VERSION
586 #define NTDDI_VERSION NTDDI_WIN2K
587 #endif
588
589 typedef struct _HANDLE_TABLE
590 {
591 #if (NTDDI_VERSION >= NTDDI_WINXP)
592 ULONG TableCode;
593 #else
594 PHANDLE_TABLE_ENTRY **Table;
595 #endif
596 PEPROCESS QuotaProcess;
597 PVOID UniqueProcessId;
598 #if (NTDDI_VERSION >= NTDDI_WINXP)
599 EX_PUSH_LOCK HandleLock;
600 LIST_ENTRY HandleTableList;
601 EX_PUSH_LOCK HandleContentionEvent;
602 #else
603 ERESOURCE HandleLock;
604 LIST_ENTRY HandleTableList;
605 KEVENT HandleContentionEvent;
606 #endif
607 PHANDLE_TRACE_DEBUG_INFO DebugInfo;
608 LONG ExtraInfoPages;
609 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
610 union
611 {
612 ULONG Flags;
613 UCHAR StrictFIFO:1;
614 };
615 LONG FirstFreeHandle;
616 PHANDLE_TABLE_ENTRY LastFreeHandleEntry;
617 LONG HandleCount;
618 ULONG NextHandleNeedingPool;
619 #else
620 ULONG FirstFree;
621 ULONG LastFree;
622 ULONG NextHandleNeedingPool;
623 LONG HandleCount;
624 union
625 {
626 ULONG Flags;
627 UCHAR StrictFIFO:1;
628 };
629 #endif
630 } HANDLE_TABLE, *PHANDLE_TABLE;
631
632 #endif
633
634 //
635 // Hard Error LPC Message
636 //
637 typedef struct _HARDERROR_MSG
638 {
639 PORT_MESSAGE h;
640 NTSTATUS Status;
641 LARGE_INTEGER ErrorTime;
642 ULONG ValidResponseOptions;
643 ULONG Response;
644 ULONG NumberOfParameters;
645 ULONG UnicodeStringParameterMask;
646 ULONG Parameters[MAXIMUM_HARDERROR_PARAMETERS];
647 } HARDERROR_MSG, *PHARDERROR_MSG;
648
649 //
650 // Information Structures for NtQueryMutant
651 //
652 typedef struct _MUTANT_BASIC_INFORMATION
653 {
654 LONG CurrentCount;
655 BOOLEAN OwnedByCaller;
656 BOOLEAN AbandonedState;
657 } MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
658
659 typedef struct _MUTANT_OWNER_INFORMATION
660 {
661 CLIENT_ID ClientId;
662 } MUTANT_OWNER_INFORMATION, *PMUTANT_OWNER_INFORMATION;
663
664 //
665 // Information Structures for NtQueryAtom
666 //
667 typedef struct _ATOM_BASIC_INFORMATION
668 {
669 USHORT UsageCount;
670 USHORT Flags;
671 USHORT NameLength;
672 WCHAR Name[1];
673 } ATOM_BASIC_INFORMATION, *PATOM_BASIC_INFORMATION;
674
675 typedef struct _ATOM_TABLE_INFORMATION
676 {
677 ULONG NumberOfAtoms;
678 USHORT Atoms[1];
679 } ATOM_TABLE_INFORMATION, *PATOM_TABLE_INFORMATION;
680
681 //
682 // Information Structures for NtQueryTimer
683 //
684 typedef struct _TIMER_BASIC_INFORMATION
685 {
686 LARGE_INTEGER TimeRemaining;
687 BOOLEAN SignalState;
688 } TIMER_BASIC_INFORMATION, *PTIMER_BASIC_INFORMATION;
689
690 //
691 // Information Structures for NtQuerySemaphore
692 //
693 typedef struct _SEMAPHORE_BASIC_INFORMATION
694 {
695 LONG CurrentCount;
696 LONG MaximumCount;
697 } SEMAPHORE_BASIC_INFORMATION, *PSEMAPHORE_BASIC_INFORMATION;
698
699 //
700 // Information Structures for NtQueryEvent
701 //
702 typedef struct _EVENT_BASIC_INFORMATION
703 {
704 EVENT_TYPE EventType;
705 LONG EventState;
706 } EVENT_BASIC_INFORMATION, *PEVENT_BASIC_INFORMATION;
707
708 //
709 // Information Structures for NtQuerySystemInformation
710 //
711 typedef struct _SYSTEM_BASIC_INFORMATION
712 {
713 ULONG Reserved;
714 ULONG TimerResolution;
715 ULONG PageSize;
716 ULONG NumberOfPhysicalPages;
717 ULONG LowestPhysicalPageNumber;
718 ULONG HighestPhysicalPageNumber;
719 ULONG AllocationGranularity;
720 ULONG MinimumUserModeAddress;
721 ULONG MaximumUserModeAddress;
722 KAFFINITY ActiveProcessorsAffinityMask;
723 CCHAR NumberOfProcessors;
724 } SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
725
726 // Class 1
727 typedef struct _SYSTEM_PROCESSOR_INFORMATION
728 {
729 USHORT ProcessorArchitecture;
730 USHORT ProcessorLevel;
731 USHORT ProcessorRevision;
732 USHORT Reserved;
733 ULONG ProcessorFeatureBits;
734 } SYSTEM_PROCESSOR_INFORMATION, *PSYSTEM_PROCESSOR_INFORMATION;
735
736 // Class 2
737 typedef struct _SYSTEM_PERFORMANCE_INFORMATION
738 {
739 LARGE_INTEGER IdleProcessTime;
740 LARGE_INTEGER IoReadTransferCount;
741 LARGE_INTEGER IoWriteTransferCount;
742 LARGE_INTEGER IoOtherTransferCount;
743 ULONG IoReadOperationCount;
744 ULONG IoWriteOperationCount;
745 ULONG IoOtherOperationCount;
746 ULONG AvailablePages;
747 ULONG CommittedPages;
748 ULONG CommitLimit;
749 ULONG PeakCommitment;
750 ULONG PageFaultCount;
751 ULONG CopyOnWriteCount;
752 ULONG TransitionCount;
753 ULONG CacheTransitionCount;
754 ULONG DemandZeroCount;
755 ULONG PageReadCount;
756 ULONG PageReadIoCount;
757 ULONG CacheReadCount;
758 ULONG CacheIoCount;
759 ULONG DirtyPagesWriteCount;
760 ULONG DirtyWriteIoCount;
761 ULONG MappedPagesWriteCount;
762 ULONG MappedWriteIoCount;
763 ULONG PagedPoolPages;
764 ULONG NonPagedPoolPages;
765 ULONG PagedPoolAllocs;
766 ULONG PagedPoolFrees;
767 ULONG NonPagedPoolAllocs;
768 ULONG NonPagedPoolFrees;
769 ULONG FreeSystemPtes;
770 ULONG ResidentSystemCodePage;
771 ULONG TotalSystemDriverPages;
772 ULONG TotalSystemCodePages;
773 ULONG NonPagedPoolLookasideHits;
774 ULONG PagedPoolLookasideHits;
775 ULONG Spare3Count;
776 ULONG ResidentSystemCachePage;
777 ULONG ResidentPagedPoolPage;
778 ULONG ResidentSystemDriverPage;
779 ULONG CcFastReadNoWait;
780 ULONG CcFastReadWait;
781 ULONG CcFastReadResourceMiss;
782 ULONG CcFastReadNotPossible;
783 ULONG CcFastMdlReadNoWait;
784 ULONG CcFastMdlReadWait;
785 ULONG CcFastMdlReadResourceMiss;
786 ULONG CcFastMdlReadNotPossible;
787 ULONG CcMapDataNoWait;
788 ULONG CcMapDataWait;
789 ULONG CcMapDataNoWaitMiss;
790 ULONG CcMapDataWaitMiss;
791 ULONG CcPinMappedDataCount;
792 ULONG CcPinReadNoWait;
793 ULONG CcPinReadWait;
794 ULONG CcPinReadNoWaitMiss;
795 ULONG CcPinReadWaitMiss;
796 ULONG CcCopyReadNoWait;
797 ULONG CcCopyReadWait;
798 ULONG CcCopyReadNoWaitMiss;
799 ULONG CcCopyReadWaitMiss;
800 ULONG CcMdlReadNoWait;
801 ULONG CcMdlReadWait;
802 ULONG CcMdlReadNoWaitMiss;
803 ULONG CcMdlReadWaitMiss;
804 ULONG CcReadAheadIos;
805 ULONG CcLazyWriteIos;
806 ULONG CcLazyWritePages;
807 ULONG CcDataFlushes;
808 ULONG CcDataPages;
809 ULONG ContextSwitches;
810 ULONG FirstLevelTbFills;
811 ULONG SecondLevelTbFills;
812 ULONG SystemCalls;
813 } SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;
814
815 // Class 3
816 typedef struct _SYSTEM_TIMEOFDAY_INFORMATION
817 {
818 LARGE_INTEGER BootTime;
819 LARGE_INTEGER CurrentTime;
820 LARGE_INTEGER TimeZoneBias;
821 ULONG TimeZoneId;
822 ULONG Reserved;
823 } SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION;
824
825 // Class 4
826 // This class is obsolete, please use KUSER_SHARED_DATA instead
827
828 // Class 5
829 typedef struct _SYSTEM_THREAD_INFORMATION
830 {
831 LARGE_INTEGER KernelTime;
832 LARGE_INTEGER UserTime;
833 LARGE_INTEGER CreateTime;
834 ULONG WaitTime;
835 PVOID StartAddress;
836 CLIENT_ID ClientId;
837 KPRIORITY Priority;
838 LONG BasePriority;
839 ULONG ContextSwitches;
840 ULONG ThreadState;
841 ULONG WaitReason;
842 } SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION;
843
844 typedef struct _SYSTEM_PROCESS_INFORMATION
845 {
846 ULONG NextEntryOffset;
847 ULONG NumberOfThreads;
848 LARGE_INTEGER SpareLi1;
849 LARGE_INTEGER SpareLi2;
850 LARGE_INTEGER SpareLi3;
851 LARGE_INTEGER CreateTime;
852 LARGE_INTEGER UserTime;
853 LARGE_INTEGER KernelTime;
854 UNICODE_STRING ImageName;
855 KPRIORITY BasePriority;
856 HANDLE UniqueProcessId;
857 HANDLE InheritedFromUniqueProcessId;
858 ULONG HandleCount;
859 ULONG SessionId;
860 ULONG UniqueProcessKey;
861
862 //
863 // This part corresponds to VM_COUNTERS_EX.
864 // NOTE: *NOT* THE SAME AS VM_COUNTERS!
865 //
866 ULONG PeakVirtualSize;
867 ULONG VirtualSize;
868 ULONG PageFaultCount;
869 ULONG PeakWorkingSetSize;
870 ULONG WorkingSetSize;
871 ULONG QuotaPeakPagedPoolUsage;
872 ULONG QuotaPagedPoolUsage;
873 ULONG QuotaPeakNonPagedPoolUsage;
874 ULONG QuotaNonPagedPoolUsage;
875 ULONG PagefileUsage;
876 ULONG PeakPagefileUsage;
877 ULONG PrivatePageCount;
878
879 //
880 // This part corresponds to IO_COUNTERS
881 //
882 LARGE_INTEGER ReadOperationCount;
883 LARGE_INTEGER WriteOperationCount;
884 LARGE_INTEGER OtherOperationCount;
885 LARGE_INTEGER ReadTransferCount;
886 LARGE_INTEGER WriteTransferCount;
887 LARGE_INTEGER OtherTransferCount;
888
889 //SYSTEM_THREAD_INFORMATION TH[1];
890 } SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
891
892 // Class 6
893 typedef struct _SYSTEM_CALL_COUNT_INFORMATION
894 {
895 ULONG Length;
896 ULONG NumberOfTables;
897 } SYSTEM_CALL_COUNT_INFORMATION, *PSYSTEM_CALL_COUNT_INFORMATION;
898
899 // Class 7
900 typedef struct _SYSTEM_DEVICE_INFORMATION
901 {
902 ULONG NumberOfDisks;
903 ULONG NumberOfFloppies;
904 ULONG NumberOfCdRoms;
905 ULONG NumberOfTapes;
906 ULONG NumberOfSerialPorts;
907 ULONG NumberOfParallelPorts;
908 } SYSTEM_DEVICE_INFORMATION, *PSYSTEM_DEVICE_INFORMATION;
909
910 // Class 8
911 typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
912 {
913 LARGE_INTEGER IdleTime;
914 LARGE_INTEGER KernelTime;
915 LARGE_INTEGER UserTime;
916 LARGE_INTEGER DpcTime;
917 LARGE_INTEGER InterruptTime;
918 ULONG InterruptCount;
919 } SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
920
921 // Class 9
922 typedef struct _SYSTEM_FLAGS_INFORMATION
923 {
924 ULONG Flags;
925 } SYSTEM_FLAGS_INFORMATION, *PSYSTEM_FLAGS_INFORMATION;
926
927 // Class 10
928 typedef struct _SYSTEM_CALL_TIME_INFORMATION
929 {
930 ULONG Length;
931 ULONG TotalCalls;
932 LARGE_INTEGER TimeOfCalls[1];
933 } SYSTEM_CALL_TIME_INFORMATION, *PSYSTEM_CALL_TIME_INFORMATION;
934
935 // Class 11 - See RTL_PROCESS_MODULES
936
937 // Class 12 - See RTL_PROCESS_LOCKS
938
939 // Class 13 - See RTL_PROCESS_BACKTRACES
940
941 // Class 14 - 15
942 typedef struct _SYSTEM_POOL_ENTRY
943 {
944 BOOLEAN Allocated;
945 BOOLEAN Spare0;
946 USHORT AllocatorBackTraceIndex;
947 ULONG Size;
948 union
949 {
950 UCHAR Tag[4];
951 ULONG TagUlong;
952 PVOID ProcessChargedQuota;
953 };
954 } SYSTEM_POOL_ENTRY, *PSYSTEM_POOL_ENTRY;
955
956 typedef struct _SYSTEM_POOL_INFORMATION
957 {
958 ULONG TotalSize;
959 PVOID FirstEntry;
960 USHORT EntryOverhead;
961 BOOLEAN PoolTagPresent;
962 BOOLEAN Spare0;
963 ULONG NumberOfEntries;
964 SYSTEM_POOL_ENTRY Entries[1];
965 } SYSTEM_POOL_INFORMATION, *PSYSTEM_POOL_INFORMATION;
966
967 // Class 16
968 typedef struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO
969 {
970 USHORT UniqueProcessId;
971 USHORT CreatorBackTraceIndex;
972 UCHAR ObjectTypeIndex;
973 UCHAR HandleAttributes;
974 USHORT HandleValue;
975 PVOID Object;
976 ULONG GrantedAccess;
977 } SYSTEM_HANDLE_TABLE_ENTRY_INFO, *PSYSTEM_HANDLE_TABLE_ENTRY_INFO;
978
979 typedef struct _SYSTEM_HANDLE_INFORMATION
980 {
981 ULONG NumberOfHandles;
982 SYSTEM_HANDLE_TABLE_ENTRY_INFO Handles[1];
983 } SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
984
985 // Class 17
986 typedef struct _SYSTEM_OBJECTTYPE_INFORMATION
987 {
988 ULONG NextEntryOffset;
989 ULONG NumberOfObjects;
990 ULONG NumberOfHandles;
991 ULONG TypeIndex;
992 ULONG InvalidAttributes;
993 GENERIC_MAPPING GenericMapping;
994 ULONG ValidAccessMask;
995 ULONG PoolType;
996 BOOLEAN SecurityRequired;
997 BOOLEAN WaitableObject;
998 UNICODE_STRING TypeName;
999 } SYSTEM_OBJECTTYPE_INFORMATION, *PSYSTEM_OBJECTTYPE_INFORMATION;
1000
1001 typedef struct _SYSTEM_OBJECT_INFORMATION
1002 {
1003 ULONG NextEntryOffset;
1004 PVOID Object;
1005 HANDLE CreatorUniqueProcess;
1006 USHORT CreatorBackTraceIndex;
1007 USHORT Flags;
1008 LONG PointerCount;
1009 LONG HandleCount;
1010 ULONG PagedPoolCharge;
1011 ULONG NonPagedPoolCharge;
1012 HANDLE ExclusiveProcessId;
1013 PVOID SecurityDescriptor;
1014 OBJECT_NAME_INFORMATION NameInfo;
1015 } SYSTEM_OBJECT_INFORMATION, *PSYSTEM_OBJECT_INFORMATION;
1016
1017 // Class 18
1018 typedef struct _SYSTEM_PAGEFILE_INFORMATION
1019 {
1020 ULONG NextEntryOffset;
1021 ULONG TotalSize;
1022 ULONG TotalInUse;
1023 ULONG PeakUsage;
1024 UNICODE_STRING PageFileName;
1025 } SYSTEM_PAGEFILE_INFORMATION, *PSYSTEM_PAGEFILE_INFORMATION;
1026
1027 // Class 19
1028 typedef struct _SYSTEM_VDM_INSTEMUL_INFO
1029 {
1030 ULONG SegmentNotPresent;
1031 ULONG VdmOpcode0F;
1032 ULONG OpcodeESPrefix;
1033 ULONG OpcodeCSPrefix;
1034 ULONG OpcodeSSPrefix;
1035 ULONG OpcodeDSPrefix;
1036 ULONG OpcodeFSPrefix;
1037 ULONG OpcodeGSPrefix;
1038 ULONG OpcodeOPER32Prefix;
1039 ULONG OpcodeADDR32Prefix;
1040 ULONG OpcodeINSB;
1041 ULONG OpcodeINSW;
1042 ULONG OpcodeOUTSB;
1043 ULONG OpcodeOUTSW;
1044 ULONG OpcodePUSHF;
1045 ULONG OpcodePOPF;
1046 ULONG OpcodeINTnn;
1047 ULONG OpcodeINTO;
1048 ULONG OpcodeIRET;
1049 ULONG OpcodeINBimm;
1050 ULONG OpcodeINWimm;
1051 ULONG OpcodeOUTBimm;
1052 ULONG OpcodeOUTWimm ;
1053 ULONG OpcodeINB;
1054 ULONG OpcodeINW;
1055 ULONG OpcodeOUTB;
1056 ULONG OpcodeOUTW;
1057 ULONG OpcodeLOCKPrefix;
1058 ULONG OpcodeREPNEPrefix;
1059 ULONG OpcodeREPPrefix;
1060 ULONG OpcodeHLT;
1061 ULONG OpcodeCLI;
1062 ULONG OpcodeSTI;
1063 ULONG BopCount;
1064 } SYSTEM_VDM_INSTEMUL_INFO, *PSYSTEM_VDM_INSTEMUL_INFO;
1065
1066 // Class 20 - ULONG VDMBOPINFO
1067
1068 // Class 21
1069 typedef struct _SYSTEM_FILECACHE_INFORMATION
1070 {
1071 ULONG CurrentSize;
1072 ULONG PeakSize;
1073 ULONG PageFaultCount;
1074 ULONG MinimumWorkingSet;
1075 ULONG MaximumWorkingSet;
1076 ULONG CurrentSizeIncludingTransitionInPages;
1077 ULONG PeakSizeIncludingTransitionInPages;
1078 ULONG TransitionRePurposeCount;
1079 ULONG Flags;
1080 } SYSTEM_FILECACHE_INFORMATION, *PSYSTEM_FILECACHE_INFORMATION;
1081
1082 // Class 22
1083 typedef struct _SYSTEM_POOLTAG
1084 {
1085 union
1086 {
1087 UCHAR Tag[4];
1088 ULONG TagUlong;
1089 };
1090 ULONG PagedAllocs;
1091 ULONG PagedFrees;
1092 ULONG PagedUsed;
1093 ULONG NonPagedAllocs;
1094 ULONG NonPagedFrees;
1095 ULONG NonPagedUsed;
1096 } SYSTEM_POOLTAG, *PSYSTEM_POOLTAG;
1097 typedef struct _SYSTEM_POOLTAG_INFORMATION
1098 {
1099 ULONG Count;
1100 SYSTEM_POOLTAG TagInfo[1];
1101 } SYSTEM_POOLTAG_INFORMATION, *PSYSTEM_POOLTAG_INFORMATION;
1102
1103 // Class 23
1104 typedef struct _SYSTEM_INTERRUPT_INFORMATION
1105 {
1106 ULONG ContextSwitches;
1107 ULONG DpcCount;
1108 ULONG DpcRate;
1109 ULONG TimeIncrement;
1110 ULONG DpcBypassCount;
1111 ULONG ApcBypassCount;
1112 } SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION;
1113
1114 // Class 24
1115 typedef struct _SYSTEM_DPC_BEHAVIOR_INFORMATION
1116 {
1117 ULONG Spare;
1118 ULONG DpcQueueDepth;
1119 ULONG MinimumDpcRate;
1120 ULONG AdjustDpcThreshold;
1121 ULONG IdealDpcRate;
1122 } SYSTEM_DPC_BEHAVIOR_INFORMATION, *PSYSTEM_DPC_BEHAVIOR_INFORMATION;
1123
1124 // Class 25
1125 typedef struct _SYSTEM_MEMORY_INFO
1126 {
1127 PUCHAR StringOffset;
1128 USHORT ValidCount;
1129 USHORT TransitionCount;
1130 USHORT ModifiedCount;
1131 USHORT PageTableCount;
1132 } SYSTEM_MEMORY_INFO, *PSYSTEM_MEMORY_INFO;
1133
1134 typedef struct _SYSTEM_MEMORY_INFORMATION
1135 {
1136 ULONG InfoSize;
1137 ULONG StringStart;
1138 SYSTEM_MEMORY_INFO Memory[1];
1139 } SYSTEM_MEMORY_INFORMATION, *PSYSTEM_MEMORY_INFORMATION;
1140
1141 // Class 26
1142 typedef struct _SYSTEM_GDI_DRIVER_INFORMATION
1143 {
1144 UNICODE_STRING DriverName;
1145 PVOID ImageAddress;
1146 PVOID SectionPointer;
1147 PVOID EntryPoint;
1148 PIMAGE_EXPORT_DIRECTORY ExportSectionPointer;
1149 ULONG ImageLength;
1150 } SYSTEM_GDI_DRIVER_INFORMATION, *PSYSTEM_GDI_DRIVER_INFORMATION;
1151
1152 // Class 27
1153 // Not an actually class, simply a PVOID to the ImageAddress
1154
1155 // Class 28
1156 typedef struct _SYSTEM_QUERY_TIME_ADJUST_INFORMATION
1157 {
1158 ULONG TimeAdjustment;
1159 ULONG TimeIncrement;
1160 BOOLEAN Enable;
1161 } SYSTEM_QUERY_TIME_ADJUST_INFORMATION, *PSYSTEM_QUERY_TIME_ADJUST_INFORMATION;
1162
1163 typedef struct _SYSTEM_SET_TIME_ADJUST_INFORMATION
1164 {
1165 ULONG TimeAdjustment;
1166 BOOLEAN Enable;
1167 } SYSTEM_SET_TIME_ADJUST_INFORMATION, *PSYSTEM_SET_TIME_ADJUST_INFORMATION;
1168
1169 // Class 29 - Same as 25
1170
1171 // FIXME: Class 30
1172
1173 // Class 31
1174 typedef struct _SYSTEM_REF_TRACE_INFORMATION
1175 {
1176 UCHAR TraceEnable;
1177 UCHAR TracePermanent;
1178 UNICODE_STRING TraceProcessName;
1179 UNICODE_STRING TracePoolTags;
1180 } SYSTEM_REF_TRACE_INFORMATION, *PSYSTEM_REF_TRACE_INFORMATION;
1181
1182 // Class 32 - OBSOLETE
1183
1184 // Class 33
1185 typedef struct _SYSTEM_EXCEPTION_INFORMATION
1186 {
1187 ULONG AlignmentFixupCount;
1188 ULONG ExceptionDispatchCount;
1189 ULONG FloatingEmulationCount;
1190 ULONG ByteWordEmulationCount;
1191 } SYSTEM_EXCEPTION_INFORMATION, *PSYSTEM_EXCEPTION_INFORMATION;
1192
1193 // Class 34
1194 typedef struct _SYSTEM_CRASH_STATE_INFORMATION
1195 {
1196 ULONG ValidCrashDump;
1197 } SYSTEM_CRASH_STATE_INFORMATION, *PSYSTEM_CRASH_STATE_INFORMATION;
1198
1199 // Class 35
1200 typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION
1201 {
1202 BOOLEAN KernelDebuggerEnabled;
1203 BOOLEAN KernelDebuggerNotPresent;
1204 } SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
1205
1206 // Class 36
1207 typedef struct _SYSTEM_CONTEXT_SWITCH_INFORMATION
1208 {
1209 ULONG ContextSwitches;
1210 ULONG FindAny;
1211 ULONG FindLast;
1212 ULONG FindIdeal;
1213 ULONG IdleAny;
1214 ULONG IdleCurrent;
1215 ULONG IdleLast;
1216 ULONG IdleIdeal;
1217 ULONG PreemptAny;
1218 ULONG PreemptCurrent;
1219 ULONG PreemptLast;
1220 ULONG SwitchToIdle;
1221 } SYSTEM_CONTEXT_SWITCH_INFORMATION, *PSYSTEM_CONTEXT_SWITCH_INFORMATION;
1222
1223 // Class 37
1224 typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION
1225 {
1226 ULONG RegistryQuotaAllowed;
1227 ULONG RegistryQuotaUsed;
1228 ULONG PagedPoolSize;
1229 } SYSTEM_REGISTRY_QUOTA_INFORMATION, *PSYSTEM_REGISTRY_QUOTA_INFORMATION;
1230
1231 // Class 38
1232 // Not a structure, simply send the UNICODE_STRING
1233
1234 // Class 39
1235 // Not a structure, simply send a ULONG containing the new separation
1236
1237 // Class 40
1238 typedef struct _SYSTEM_PLUGPLAY_BUS_INFORMATION
1239 {
1240 ULONG BusCount;
1241 PLUGPLAY_BUS_INSTANCE BusInstance[1];
1242 } SYSTEM_PLUGPLAY_BUS_INFORMATION, *PSYSTEM_PLUGPLAY_BUS_INFORMATION;
1243
1244 // Class 41
1245 typedef struct _SYSTEM_DOCK_INFORMATION
1246 {
1247 SYSTEM_DOCK_STATE DockState;
1248 INTERFACE_TYPE DeviceBusType;
1249 ULONG DeviceBusNumber;
1250 ULONG SlotNumber;
1251 } SYSTEM_DOCK_INFORMATION, *PSYSTEM_DOCK_INFORMATION;
1252
1253 // Class 42
1254 typedef struct _SYSTEM_POWER_INFORMATION_NATIVE
1255 {
1256 BOOLEAN SystemSuspendSupported;
1257 BOOLEAN SystemHibernateSupported;
1258 BOOLEAN ResumeTimerSupportsSuspend;
1259 BOOLEAN ResumeTimerSupportsHibernate;
1260 BOOLEAN LidSupported;
1261 BOOLEAN TurboSettingSupported;
1262 BOOLEAN TurboMode;
1263 BOOLEAN SystemAcOrDc;
1264 BOOLEAN PowerDownDisabled;
1265 LARGE_INTEGER SpindownDrives;
1266 } SYSTEM_POWER_INFORMATION_NATIVE, *PSYSTEM_POWER_INFORMATION_NATIVE;
1267
1268 // Class 43
1269 typedef struct _SYSTEM_LEGACY_DRIVER_INFORMATION
1270 {
1271 PNP_VETO_TYPE VetoType;
1272 UNICODE_STRING VetoDriver;
1273 // CHAR Buffer[0];
1274 } SYSTEM_LEGACY_DRIVER_INFORMATION, *PSYSTEM_LEGACY_DRIVER_INFORMATION;
1275
1276 // Class 44
1277 //typedef struct _TIME_ZONE_INFORMATION RTL_TIME_ZONE_INFORMATION;
1278
1279 // Class 45
1280 typedef struct _SYSTEM_LOOKASIDE_INFORMATION
1281 {
1282 USHORT CurrentDepth;
1283 USHORT MaximumDepth;
1284 ULONG TotalAllocates;
1285 ULONG AllocateMisses;
1286 ULONG TotalFrees;
1287 ULONG FreeMisses;
1288 ULONG Type;
1289 ULONG Tag;
1290 ULONG Size;
1291 } SYSTEM_LOOKASIDE_INFORMATION, *PSYSTEM_LOOKASIDE_INFORMATION;
1292
1293 // Class 46
1294 // Not a structure. Only a HANDLE for the SlipEvent;
1295
1296 // Class 47
1297 // Not a structure. Only a ULONG for the SessionId;
1298
1299 // Class 48
1300 // Not a structure. Only a ULONG for the SessionId;
1301
1302 // FIXME: Class 49
1303
1304 // Class 50
1305 // Not a structure. Only a ULONG_PTR for the SystemRangeStart
1306
1307 // Class 51
1308 typedef struct _SYSTEM_VERIFIER_INFORMATION
1309 {
1310 ULONG NextEntryOffset;
1311 ULONG Level;
1312 UNICODE_STRING DriverName;
1313 ULONG RaiseIrqls;
1314 ULONG AcquireSpinLocks;
1315 ULONG SynchronizeExecutions;
1316 ULONG AllocationsAttempted;
1317 ULONG AllocationsSucceeded;
1318 ULONG AllocationsSucceededSpecialPool;
1319 ULONG AllocationsWithNoTag;
1320 ULONG TrimRequests;
1321 ULONG Trims;
1322 ULONG AllocationsFailed;
1323 ULONG AllocationsFailedDeliberately;
1324 ULONG Loads;
1325 ULONG Unloads;
1326 ULONG UnTrackedPool;
1327 ULONG CurrentPagedPoolAllocations;
1328 ULONG CurrentNonPagedPoolAllocations;
1329 ULONG PeakPagedPoolAllocations;
1330 ULONG PeakNonPagedPoolAllocations;
1331 ULONG PagedPoolUsageInBytes;
1332 ULONG NonPagedPoolUsageInBytes;
1333 ULONG PeakPagedPoolUsageInBytes;
1334 ULONG PeakNonPagedPoolUsageInBytes;
1335 } SYSTEM_VERIFIER_INFORMATION, *PSYSTEM_VERIFIER_INFORMATION;
1336
1337 // FIXME: Class 52
1338
1339 // Class 53
1340 typedef struct _SYSTEM_SESSION_PROCESS_INFORMATION
1341 {
1342 ULONG SessionId;
1343 ULONG SizeOfBuf;
1344 PVOID Buffer; // Same format as in SystemProcessInformation
1345 } SYSTEM_SESSION_PROCESS_INFORMATION, *PSYSTEM_SESSION_PROCESS_INFORMATION;
1346
1347 // FIXME: Class 54-97
1348
1349 //
1350 // Hotpatch flags
1351 //
1352 #define RTL_HOTPATCH_SUPPORTED_FLAG 0x01
1353 #define RTL_HOTPATCH_SWAP_OBJECT_NAMES 0x08 << 24
1354 #define RTL_HOTPATCH_SYNC_RENAME_FILES 0x10 << 24
1355 #define RTL_HOTPATCH_PATCH_USER_MODE 0x20 << 24
1356 #define RTL_HOTPATCH_REMAP_SYSTEM_DLL 0x40 << 24
1357 #define RTL_HOTPATCH_PATCH_KERNEL_MODE 0x80 << 24
1358
1359
1360 // Class 69
1361 typedef struct _SYSTEM_HOTPATCH_CODE_INFORMATION
1362 {
1363 ULONG Flags;
1364 ULONG InfoSize;
1365 union
1366 {
1367 struct
1368 {
1369 ULONG Foo;
1370 } CodeInfo;
1371 struct
1372 {
1373 USHORT NameOffset;
1374 USHORT NameLength;
1375 } KernelInfo;
1376 struct
1377 {
1378 USHORT NameOffset;
1379 USHORT NameLength;
1380 USHORT TargetNameOffset;
1381 USHORT TargetNameLength;
1382 UCHAR PatchingFinished;
1383 } UserModeInfo;
1384 struct
1385 {
1386 USHORT NameOffset;
1387 USHORT NameLength;
1388 USHORT TargetNameOffset;
1389 USHORT TargetNameLength;
1390 UCHAR PatchingFinished;
1391 NTSTATUS ReturnCode;
1392 HANDLE TargetProcess;
1393 } InjectionInfo;
1394 struct
1395 {
1396 HANDLE FileHandle1;
1397 PIO_STATUS_BLOCK IoStatusBlock1;
1398 PVOID RenameInformation1;
1399 PVOID RenameInformationLength1;
1400 HANDLE FileHandle2;
1401 PIO_STATUS_BLOCK IoStatusBlock2;
1402 PVOID RenameInformation2;
1403 PVOID RenameInformationLength2;
1404 } RenameInfo;
1405 struct
1406 {
1407 HANDLE ParentDirectory;
1408 HANDLE ObjectHandle1;
1409 HANDLE ObjectHandle2;
1410 } AtomicSwap;
1411 };
1412 } SYSTEM_HOTPATCH_CODE_INFORMATION, *PSYSTEM_HOTPATCH_CODE_INFORMATION;
1413
1414 //
1415 // Class 75
1416 //
1417 #ifdef NTOS_MODE_USER
1418 typedef struct _SYSTEM_FIRMWARE_TABLE_HANDLER
1419 {
1420 ULONG ProviderSignature;
1421 BOOLEAN Register;
1422 PFNFTH FirmwareTableHandler;
1423 PVOID DriverObject;
1424 } SYSTEM_FIRMWARE_TABLE_HANDLER, *PSYSTEM_FIRMWARE_TABLE_HANDLER;
1425
1426 //
1427 // Class 76
1428 //
1429 typedef struct _SYSTEM_FIRMWARE_TABLE_INFORMATION
1430 {
1431 ULONG ProviderSignature;
1432 SYSTEM_FIRMWARE_TABLE_ACTION Action;
1433 ULONG TableID;
1434 ULONG TableBufferLength;
1435 UCHAR TableBuffer[1];
1436 } SYSTEM_FIRMWARE_TABLE_INFORMATION, *PSYSTEM_FIRMWARE_TABLE_INFORMATION;
1437 #endif
1438 #endif