4fd01e857e01832bb7d0a3a2676b06b34513791d
[reactos.git] / reactos / include / ndk / zwtypes.h
1 /*
2 * PROJECT: ReactOS Native Headers
3 * FILE: include/ndk/zwtypes.h
4 * PURPOSE: Defintions for Native Types not defined in DDK/IFS
5 * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
6 * UPDATE HISTORY:
7 * Created 06/10/04
8 */
9 #ifndef _ZWTYPES_H
10 #define _ZWTYPES_H
11
12 /* DEPENDENCIES **************************************************************/
13 #include "rtltypes.h"
14
15 /* EXPORTED DATA *************************************************************/
16
17 /* CONSTANTS *****************************************************************/
18 #define MAX_BUS_NAME 24
19
20 #define EVENT_PAIR_ALL_ACCESS (0x1F0000L)
21
22 /* ENUMERATIONS **************************************************************/
23
24 typedef enum _PLUGPLAY_BUS_CLASS
25 {
26 SystemBus,
27 PlugPlayVirtualBus,
28 MaxPlugPlayBusClass
29 } PLUGPLAY_BUS_CLASS, *PPLUGPLAY_BUS_CLASS;
30
31 typedef enum _PLUGPLAY_VIRTUAL_BUS_TYPE
32 {
33 Root,
34 MaxPlugPlayVirtualBusType
35 } PLUGPLAY_VIRTUAL_BUS_TYPE, *PPLUGPLAY_VIRTUAL_BUS_TYPE;
36
37 typedef enum _SYSTEM_DOCK_STATE
38 {
39 SystemDockStateUnknown,
40 SystemUndocked,
41 SystemDocked
42 } SYSTEM_DOCK_STATE, *PSYSTEM_DOCK_STATE;
43
44 /**** Information Classes ****/
45 /*
46 * System
47 */
48 typedef enum _SYSTEM_INFORMATION_CLASS
49 {
50 SystemBasicInformation,
51 SystemProcessorInformation,
52 SystemPerformanceInformation,
53 SystemTimeOfDayInformation,
54 SystemPathInformation, /* OBSOLETE: USE KUSER_SHARED_DATA */
55 SystemProcessInformation,
56 SystemCallCountInformation,
57 SystemDeviceInformation,
58 SystemProcessorPerformanceInformation,
59 SystemFlagsInformation,
60 SystemCallTimeInformation,
61 SystemModuleInformation,
62 SystemLocksInformation,
63 SystemStackTraceInformation,
64 SystemPagedPoolInformation,
65 SystemNonPagedPoolInformation,
66 SystemHandleInformation,
67 SystemObjectInformation,
68 SystemPageFileInformation,
69 SystemVdmInstemulInformation,
70 SystemVdmBopInformation,
71 SystemFileCacheInformation,
72 SystemPoolTagInformation,
73 SystemInterruptInformation,
74 SystemDpcBehaviorInformation,
75 SystemFullMemoryInformation,
76 SystemLoadGdiDriverInformation,
77 SystemUnloadGdiDriverInformation,
78 SystemTimeAdjustmentInformation,
79 SystemSummaryMemoryInformation,
80 SystemNextEventIdInformation,
81 SystemEventIdsInformation,
82 SystemCrashDumpInformation,
83 SystemExceptionInformation,
84 SystemCrashDumpStateInformation,
85 SystemKernelDebuggerInformation,
86 SystemContextSwitchInformation,
87 SystemRegistryQuotaInformation,
88 SystemExtendServiceTableInformation,
89 SystemPrioritySeperation,
90 SystemPlugPlayBusInformation,
91 SystemDockInformation,
92 _SystemPowerInformation, /* FIXME */
93 SystemProcessorSpeedInformation,
94 SystemCurrentTimeZoneInformation,
95 SystemLookasideInformation,
96 SystemTimeSlipNotification,
97 SystemSessionCreate,
98 SystemSessionDetach,
99 SystemSessionInformation,
100 SystemRangeStartInformation,
101 SystemVerifierInformation,
102 SystemAddVerifier,
103 SystemSessionProcessesInformation,
104 SystemInformationClassMax
105 } SYSTEM_INFORMATION_CLASS;
106
107 /*
108 * Object
109 */
110 typedef enum _OBJECT_INFORMATION_CLASS
111 {
112 ObjectBasicInformation,
113 ObjectNameInformation,
114 ObjectTypeInformation,
115 ObjectAllTypesInformation,
116 ObjectHandleInformation
117 } OBJECT_INFORMATION_CLASS;
118
119 /*
120 * Memory
121 */
122 typedef enum _MEMORY_INFORMATION_CLASS
123 {
124 MemoryBasicInformation,
125 MemoryWorkingSetList,
126 MemorySectionName,
127 MemoryBasicVlmInformation
128 } MEMORY_INFORMATION_CLASS;
129
130 /*
131 * Mutant
132 */
133 typedef enum _MUTANT_INFORMATION_CLASS
134 {
135 MutantBasicInformation
136 } MUTANT_INFORMATION_CLASS;
137
138 /*
139 * Atom
140 */
141 typedef enum _ATOM_INFORMATION_CLASS
142 {
143 AtomBasicInformation,
144 AtomTableInformation,
145 } ATOM_INFORMATION_CLASS;
146
147 /*
148 * Section
149 */
150 typedef enum _SECTION_INFORMATION_CLASS
151 {
152 SectionBasicInformation,
153 SectionImageInformation,
154 } SECTION_INFORMATION_CLASS;
155
156 /*
157 * Timer
158 */
159 typedef enum _TIMER_INFORMATION_CLASS {
160 TimerBasicInformation
161 } TIMER_INFORMATION_CLASS;
162
163 /*
164 * Semaphore
165 */
166 typedef enum _SEMAPHORE_INFORMATION_CLASS
167 {
168 SemaphoreBasicInformation
169 } SEMAPHORE_INFORMATION_CLASS;
170
171 /*
172 * Event
173 */
174 typedef enum _EVENT_INFORMATION_CLASS
175 {
176 EventBasicInformation
177 } EVENT_INFORMATION_CLASS;
178
179 /*
180 * I/O Completion
181 */
182 typedef enum _IO_COMPLETION_INFORMATION_CLASS
183 {
184 IoCompletionBasicInformation
185 } IO_COMPLETION_INFORMATION_CLASS;
186
187 /* TYPES *********************************************************************/
188
189 typedef unsigned short LANGID;
190 typedef LANGID *PLANGID;
191
192 /**** Information Structures ****/
193 /*
194 * Mutant
195 */
196
197 /* Class 0 */
198 typedef struct _MUTANT_BASIC_INFORMATION
199 {
200 LONG CurrentCount;
201 BOOLEAN OwnedbyCalled;
202 BOOLEAN AbandonedState;
203 } MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
204
205 /*
206 * Thread
207 */
208
209 /* Class 0 */
210 typedef struct _THREAD_BASIC_INFORMATION
211 {
212 NTSTATUS ExitStatus;
213 PVOID TebBaseAddress;
214 CLIENT_ID ClientId;
215 KAFFINITY AffinityMask;
216 KPRIORITY Priority;
217 KPRIORITY BasePriority;
218 } THREAD_BASIC_INFORMATION, *PTHREAD_BASIC_INFORMATION;
219
220 /*
221 * Atom
222 */
223
224 /* Class 0 */
225 typedef struct _ATOM_BASIC_INFORMATION {
226 USHORT UsageCount;
227 USHORT Flags;
228 USHORT NameLength;
229 WCHAR Name[1];
230 } ATOM_BASIC_INFORMATION, *PATOM_BASIC_INFORMATION;
231
232 /* Class 1 */
233 typedef struct _ATOM_TABLE_INFORMATION
234 {
235 ULONG NumberOfAtoms;
236 USHORT Atoms[1];
237 } ATOM_TABLE_INFORMATION, *PATOM_TABLE_INFORMATION;
238
239 /*
240 * Memory
241 */
242
243 /* Class 1 */
244 typedef struct _MEMORY_WORKING_SET_LIST
245 {
246 ULONG NumberOfPages;
247 ULONG WorkingSetList[1];
248 } MEMORY_WORKING_SET_LIST, *PMEMORY_WORKING_SET_LIST;
249
250 /* Class 2 */
251 typedef struct {
252 UNICODE_STRING SectionFileName;
253 WCHAR NameBuffer[ANYSIZE_ARRAY];
254 } MEMORY_SECTION_NAME, *PMEMORY_SECTION_NAME;
255
256 /*
257 * Section
258 */
259
260 /* Class 0 */
261 typedef struct _SECTION_BASIC_INFORMATION
262 {
263 PVOID BaseAddress;
264 ULONG Attributes;
265 LARGE_INTEGER Size;
266 } SECTION_BASIC_INFORMATION, *PSECTION_BASIC_INFORMATION;
267
268 /* Class 1 */
269 typedef struct _SECTION_IMAGE_INFORMATION
270 {
271 ULONG EntryPoint;
272 ULONG Unknown1;
273 ULONG_PTR StackReserve;
274 ULONG_PTR StackCommit;
275 ULONG Subsystem;
276 USHORT MinorSubsystemVersion;
277 USHORT MajorSubsystemVersion;
278 ULONG Unknown2;
279 ULONG Characteristics;
280 USHORT ImageNumber;
281 BOOLEAN Executable;
282 UCHAR Unknown3;
283 ULONG Unknown4[3];
284 } SECTION_IMAGE_INFORMATION, *PSECTION_IMAGE_INFORMATION;
285
286 /*
287 * Object
288 */
289
290 /* Class 4 */
291 typedef struct _OBJECT_HANDLE_ATTRIBUTE_INFORMATION
292 {
293 BOOLEAN Inherit;
294 BOOLEAN ProtectFromClose;
295 } OBJECT_HANDLE_ATTRIBUTE_INFORMATION, *POBJECT_HANDLE_ATTRIBUTE_INFORMATION;
296
297 /*
298 * Timer
299 */
300
301 /* Class 0 */
302 typedef struct _TIMER_BASIC_INFORMATION
303 {
304 LARGE_INTEGER TimeRemaining;
305 BOOLEAN SignalState;
306 } TIMER_BASIC_INFORMATION, *PTIMER_BASIC_INFORMATION;
307
308 /*
309 * Semaphore
310 */
311
312 /* Class 0 */
313 typedef struct _SEMAPHORE_BASIC_INFORMATION {
314 LONG CurrentCount;
315 LONG MaximumCount;
316 } SEMAPHORE_BASIC_INFORMATION, *PSEMAPHORE_BASIC_INFORMATION;
317
318 /*
319 * Event
320 */
321 /* Class 0 */
322 typedef struct _EVENT_BASIC_INFORMATION
323 {
324 EVENT_TYPE EventType;
325 LONG EventState;
326 } EVENT_BASIC_INFORMATION, *PEVENT_BASIC_INFORMATION;
327
328 /*
329 * Process
330 */
331 /* Class 23 */
332 typedef struct _PROCESS_DEVICEMAP_INFORMATION
333 {
334 union
335 {
336 struct
337 {
338 HANDLE DirectoryHandle;
339 } Set;
340 struct
341 {
342 ULONG DriveMap;
343 UCHAR DriveType[32];
344 } Query;
345 };
346 } PROCESS_DEVICEMAP_INFORMATION, *PPROCESS_DEVICEMAP_INFORMATION;
347
348 /*
349 * System
350 */
351
352 /* Class 0 */
353 typedef struct _SYSTEM_BASIC_INFORMATION
354 {
355 ULONG Reserved;
356 ULONG TimerResolution;
357 ULONG PageSize;
358 ULONG NumberOfPhysicalPages;
359 ULONG LowestPhysicalPageNumber;
360 ULONG HighestPhysicalPageNumber;
361 ULONG AllocationGranularity;
362 ULONG MinimumUserModeAddress;
363 ULONG MaximumUserModeAddress;
364 KAFFINITY ActiveProcessorsAffinityMask;
365 CCHAR NumberOfProcessors;
366 } SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
367
368 /* Class 1 */
369 typedef struct _SYSTEM_PROCESSOR_INFORMATION {
370 USHORT ProcessorArchitecture;
371 USHORT ProcessorLevel;
372 USHORT ProcessorRevision;
373 USHORT Reserved;
374 ULONG ProcessorFeatureBits;
375 } SYSTEM_PROCESSOR_INFORMATION, *PSYSTEM_PROCESSOR_INFORMATION;
376
377 /* Class 2 */
378 typedef struct _SYSTEM_PERFORMANCE_INFORMATION
379 {
380 LARGE_INTEGER IdleProcessTime;
381 LARGE_INTEGER IoReadTransferCount;
382 LARGE_INTEGER IoWriteTransferCount;
383 LARGE_INTEGER IoOtherTransferCount;
384 ULONG IoReadOperationCount;
385 ULONG IoWriteOperationCount;
386 ULONG IoOtherOperationCount;
387 ULONG AvailablePages;
388 ULONG CommittedPages;
389 ULONG CommitLimit;
390 ULONG PeakCommitment;
391 ULONG PageFaultCount;
392 ULONG CopyOnWriteCount;
393 ULONG TransitionCount;
394 ULONG CacheTransitionCount;
395 ULONG DemandZeroCount;
396 ULONG PageReadCount;
397 ULONG PageReadIoCount;
398 ULONG CacheReadCount;
399 ULONG CacheIoCount;
400 ULONG DirtyPagesWriteCount;
401 ULONG DirtyWriteIoCount;
402 ULONG MappedPagesWriteCount;
403 ULONG MappedWriteIoCount;
404 ULONG PagedPoolPages;
405 ULONG NonPagedPoolPages;
406 ULONG PagedPoolAllocs;
407 ULONG PagedPoolFrees;
408 ULONG NonPagedPoolAllocs;
409 ULONG NonPagedPoolFrees;
410 ULONG FreeSystemPtes;
411 ULONG ResidentSystemCodePage;
412 ULONG TotalSystemDriverPages;
413 ULONG TotalSystemCodePages;
414 ULONG NonPagedPoolLookasideHits;
415 ULONG PagedPoolLookasideHits;
416 ULONG Spare3Count;
417 ULONG ResidentSystemCachePage;
418 ULONG ResidentPagedPoolPage;
419 ULONG ResidentSystemDriverPage;
420 ULONG CcFastReadNoWait;
421 ULONG CcFastReadWait;
422 ULONG CcFastReadResourceMiss;
423 ULONG CcFastReadNotPossible;
424 ULONG CcFastMdlReadNoWait;
425 ULONG CcFastMdlReadWait;
426 ULONG CcFastMdlReadResourceMiss;
427 ULONG CcFastMdlReadNotPossible;
428 ULONG CcMapDataNoWait;
429 ULONG CcMapDataWait;
430 ULONG CcMapDataNoWaitMiss;
431 ULONG CcMapDataWaitMiss;
432 ULONG CcPinMappedDataCount;
433 ULONG CcPinReadNoWait;
434 ULONG CcPinReadWait;
435 ULONG CcPinReadNoWaitMiss;
436 ULONG CcPinReadWaitMiss;
437 ULONG CcCopyReadNoWait;
438 ULONG CcCopyReadWait;
439 ULONG CcCopyReadNoWaitMiss;
440 ULONG CcCopyReadWaitMiss;
441 ULONG CcMdlReadNoWait;
442 ULONG CcMdlReadWait;
443 ULONG CcMdlReadNoWaitMiss;
444 ULONG CcMdlReadWaitMiss;
445 ULONG CcReadAheadIos;
446 ULONG CcLazyWriteIos;
447 ULONG CcLazyWritePages;
448 ULONG CcDataFlushes;
449 ULONG CcDataPages;
450 ULONG ContextSwitches;
451 ULONG FirstLevelTbFills;
452 ULONG SecondLevelTbFills;
453 ULONG SystemCalls;
454 } SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;
455
456 /* Class 3 */
457 typedef struct _SYSTEM_TIMEOFDAY_INFORMATION {
458 LARGE_INTEGER BootTime;
459 LARGE_INTEGER CurrentTime;
460 LARGE_INTEGER TimeZoneBias;
461 ULONG TimeZoneId;
462 ULONG Reserved;
463 } SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION;
464
465 /* Class 4 */
466 /* This class is obsoleted, please use KUSER_SHARED_DATA instead */
467
468 /* Class 5 */
469 typedef struct _SYSTEM_THREAD_INFORMATION
470 {
471 LARGE_INTEGER KernelTime;
472 LARGE_INTEGER UserTime;
473 LARGE_INTEGER CreateTime;
474 ULONG WaitTime;
475 PVOID StartAddress;
476 CLIENT_ID ClientId;
477 KPRIORITY Priority;
478 LONG BasePriority;
479 ULONG ContextSwitches;
480 ULONG ThreadState;
481 ULONG WaitReason;
482 } SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION;
483 typedef struct _SYSTEM_PROCESS_INFORMATION
484 {
485 ULONG NextEntryOffset;
486 ULONG NumberOfThreads;
487 LARGE_INTEGER SpareLi1;
488 LARGE_INTEGER SpareLi2;
489 LARGE_INTEGER SpareLi3;
490 LARGE_INTEGER CreateTime;
491 LARGE_INTEGER UserTime;
492 LARGE_INTEGER KernelTime;
493 UNICODE_STRING ImageName;
494 KPRIORITY BasePriority;
495 HANDLE UniqueProcessId;
496 HANDLE InheritedFromUniqueProcessId;
497 ULONG HandleCount;
498 ULONG SessionId;
499 ULONG PageDirectoryFrame;
500
501 /*
502 * This part corresponds to VM_COUNTERS_EX.
503 * NOTE: *NOT* THE SAME AS VM_COUNTERS!
504 */
505 ULONG PeakVirtualSize;
506 ULONG VirtualSize;
507 ULONG PageFaultCount;
508 ULONG PeakWorkingSetSize;
509 ULONG WorkingSetSize;
510 ULONG QuotaPeakPagedPoolUsage;
511 ULONG QuotaPagedPoolUsage;
512 ULONG QuotaPeakNonPagedPoolUsage;
513 ULONG QuotaNonPagedPoolUsage;
514 ULONG PagefileUsage;
515 ULONG PeakPagefileUsage;
516 ULONG PrivateUsage;
517
518 /* This part corresponds to IO_COUNTERS */
519 LARGE_INTEGER ReadOperationCount;
520 LARGE_INTEGER WriteOperationCount;
521 LARGE_INTEGER OtherOperationCount;
522 LARGE_INTEGER ReadTransferCount;
523 LARGE_INTEGER WriteTransferCount;
524 LARGE_INTEGER OtherTransferCount;
525
526 /* Finally, the array of Threads */
527 SYSTEM_THREAD_INFORMATION TH[1];
528 } SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
529
530 /* Class 6 */
531 typedef struct _SYSTEM_CALL_COUNT_INFORMATION
532 {
533 ULONG Length;
534 ULONG NumberOfTables;
535 } SYSTEM_CALL_COUNT_INFORMATION, *PSYSTEM_CALL_COUNT_INFORMATION;
536
537 /* Class 7 */
538 typedef struct _SYSTEM_DEVICE_INFORMATION {
539 ULONG NumberOfDisks;
540 ULONG NumberOfFloppies;
541 ULONG NumberOfCdRoms;
542 ULONG NumberOfTapes;
543 ULONG NumberOfSerialPorts;
544 ULONG NumberOfParallelPorts;
545 } SYSTEM_DEVICE_INFORMATION, *PSYSTEM_DEVICE_INFORMATION;
546
547 /* Class 8 */
548 typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
549 {
550 LARGE_INTEGER IdleTime;
551 LARGE_INTEGER KernelTime;
552 LARGE_INTEGER UserTime;
553 LARGE_INTEGER DpcTime;
554 LARGE_INTEGER InterruptTime;
555 ULONG InterruptCount;
556 } SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
557
558 /* Class 9 */
559 typedef struct _SYSTEM_FLAGS_INFORMATION
560 {
561 ULONG Flags;
562 } SYSTEM_FLAGS_INFORMATION, *PSYSTEM_FLAGS_INFORMATION;
563
564 /* Class 10 */
565 typedef struct _SYSTEM_CALL_TIME_INFORMATION
566 {
567 ULONG Length;
568 ULONG TotalCalls;
569 LARGE_INTEGER TimeOfCalls[1];
570 } SYSTEM_CALL_TIME_INFORMATION, *PSYSTEM_CALL_TIME_INFORMATION;
571
572 /* Class 11 */
573 typedef struct _SYSTEM_MODULE_INFORMATION_ENTRY
574 {
575 ULONG Unknown1;
576 ULONG Unknown2;
577 PVOID Base;
578 ULONG Size;
579 ULONG Flags;
580 USHORT Index;
581 USHORT NameLength;
582 USHORT LoadCount;
583 USHORT PathLength;
584 CHAR ImageName[256];
585 } SYSTEM_MODULE_INFORMATION_ENTRY, *PSYSTEM_MODULE_INFORMATION_ENTRY;
586 typedef struct _SYSTEM_MODULE_INFORMATION
587 {
588 ULONG Count;
589 SYSTEM_MODULE_INFORMATION_ENTRY Module[1];
590 } SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
591
592 /* Class 12 */
593 typedef struct _SYSTEM_RESOURCE_LOCK_ENTRY
594 {
595 ULONG ResourceAddress;
596 ULONG Always1;
597 ULONG Unknown;
598 ULONG ActiveCount;
599 ULONG ContentionCount;
600 ULONG Unused[2];
601 ULONG NumberOfSharedWaiters;
602 ULONG NumberOfExclusiveWaiters;
603 } SYSTEM_RESOURCE_LOCK_ENTRY, *PSYSTEM_RESOURCE_LOCK_ENTRY;
604 typedef struct _SYSTEM_RESOURCE_LOCK_INFO
605 {
606 ULONG Count;
607 SYSTEM_RESOURCE_LOCK_ENTRY Lock[1];
608 } SYSTEM_RESOURCE_LOCK_INFO, *PSYSTEM_RESOURCE_LOCK_INFO;
609
610 /* Class 13 */
611 typedef struct _SYSTEM_BACKTRACE_INFORMATION_ENTRY
612 {
613 /* FIXME */
614 } SYSTEM_BACKTRACE_INFORMATION_ENTRY, *PSYSTEM_BACKTRACE_INFORMATION_ENTRY;
615 typedef struct _SYSTEM_BACKTRACE_INFORMATION
616 {
617 /* FIXME */
618 ULONG Unknown[4];
619 ULONG Count;
620 SYSTEM_BACKTRACE_INFORMATION_ENTRY Trace[1];
621 } SYSTEM_BACKTRACE_INFORMATION, *PSYSTEM_BACKTRACE_INFORMATION;
622
623 /* Class 14 - 15 */
624 typedef struct _SYSTEM_POOL_ENTRY
625 {
626 BOOLEAN Allocated;
627 BOOLEAN Spare0;
628 USHORT AllocatorBackTraceIndex;
629 ULONG Size;
630 union {
631 UCHAR Tag[4];
632 ULONG TagUlong;
633 PVOID ProcessChargedQuota;
634 };
635 } SYSTEM_POOL_ENTRY, *PSYSTEM_POOL_ENTRY;
636 typedef struct _SYSTEM_POOL_INFORMATION
637 {
638 ULONG TotalSize;
639 PVOID FirstEntry;
640 USHORT EntryOverhead;
641 BOOLEAN PoolTagPresent;
642 BOOLEAN Spare0;
643 ULONG NumberOfEntries;
644 SYSTEM_POOL_ENTRY Entries[1];
645 } SYSTEM_POOL_INFORMATION, *PSYSTEM_POOL_INFORMATION;
646
647 /* Class 16 */
648 typedef struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO
649 {
650 USHORT UniqueProcessId;
651 USHORT CreatorBackTraceIndex;
652 UCHAR ObjectTypeIndex;
653 UCHAR HandleAttributes;
654 USHORT HandleValue;
655 PVOID Object;
656 ULONG GrantedAccess;
657 } SYSTEM_HANDLE_TABLE_ENTRY_INFO, *PSYSTEM_HANDLE_TABLE_ENTRY_INFO;
658 typedef struct _SYSTEM_HANDLE_INFORMATION
659 {
660 ULONG NumberOfHandles;
661 SYSTEM_HANDLE_TABLE_ENTRY_INFO Handles[1];
662 } SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
663
664 /* Class 17 */
665 typedef struct _SYSTEM_OBJECTTYPE_INFORMATION
666 {
667 ULONG NextEntryOffset;
668 ULONG NumberOfObjects;
669 ULONG NumberOfHandles;
670 ULONG TypeIndex;
671 ULONG InvalidAttributes;
672 GENERIC_MAPPING GenericMapping;
673 ULONG ValidAccessMask;
674 ULONG PoolType;
675 BOOLEAN SecurityRequired;
676 BOOLEAN WaitableObject;
677 UNICODE_STRING TypeName;
678 } SYSTEM_OBJECTTYPE_INFORMATION, *PSYSTEM_OBJECTTYPE_INFORMATION;
679 typedef struct _SYSTEM_OBJECT_INFORMATION
680 {
681 ULONG NextEntryOffset;
682 PVOID Object;
683 HANDLE CreatorUniqueProcess;
684 USHORT CreatorBackTraceIndex;
685 USHORT Flags;
686 LONG PointerCount;
687 LONG HandleCount;
688 ULONG PagedPoolCharge;
689 ULONG NonPagedPoolCharge;
690 HANDLE ExclusiveProcessId;
691 PVOID SecurityDescriptor;
692 OBJECT_NAME_INFORMATION NameInfo;
693 } SYSTEM_OBJECT_INFORMATION, *PSYSTEM_OBJECT_INFORMATION;
694
695 /* Class 18 */
696 typedef struct _SYSTEM_PAGEFILE_INFORMATION
697 {
698 ULONG NextEntryOffset;
699 ULONG TotalSize;
700 ULONG TotalInUse;
701 ULONG PeakUsage;
702 UNICODE_STRING PageFileName;
703 } SYSTEM_PAGEFILE_INFORMATION, *PSYSTEM_PAGEFILE_INFORMATION;
704
705 /* Class 19 */
706 typedef struct _SYSTEM_VDM_INSTEMUL_INFO
707 {
708 ULONG SegmentNotPresent;
709 ULONG VdmOpcode0F;
710 ULONG OpcodeESPrefix;
711 ULONG OpcodeCSPrefix;
712 ULONG OpcodeSSPrefix;
713 ULONG OpcodeDSPrefix;
714 ULONG OpcodeFSPrefix;
715 ULONG OpcodeGSPrefix;
716 ULONG OpcodeOPER32Prefix;
717 ULONG OpcodeADDR32Prefix;
718 ULONG OpcodeINSB;
719 ULONG OpcodeINSW;
720 ULONG OpcodeOUTSB;
721 ULONG OpcodeOUTSW;
722 ULONG OpcodePUSHF;
723 ULONG OpcodePOPF;
724 ULONG OpcodeINTnn;
725 ULONG OpcodeINTO;
726 ULONG OpcodeIRET;
727 ULONG OpcodeINBimm;
728 ULONG OpcodeINWimm;
729 ULONG OpcodeOUTBimm;
730 ULONG OpcodeOUTWimm ;
731 ULONG OpcodeINB;
732 ULONG OpcodeINW;
733 ULONG OpcodeOUTB;
734 ULONG OpcodeOUTW;
735 ULONG OpcodeLOCKPrefix;
736 ULONG OpcodeREPNEPrefix;
737 ULONG OpcodeREPPrefix;
738 ULONG OpcodeHLT;
739 ULONG OpcodeCLI;
740 ULONG OpcodeSTI;
741 ULONG BopCount;
742 } SYSTEM_VDM_INSTEMUL_INFO, *PSYSTEM_VDM_INSTEMUL_INFO;
743
744 /* Class 20 */
745 typedef struct _SYSTEM_VDM_BOP_INFO
746 {
747 /* FIXME */
748 PVOID Dummy;
749 } SYSTEM_VDM_BOP_INFO, *PSYSTEM_VDM_BOP_INFO;
750
751 /* Class 21 */
752 typedef struct _SYSTEM_CACHE_INFORMATION
753 {
754 ULONG CurrentSize;
755 ULONG PeakSize;
756 ULONG PageFaultCount;
757 ULONG MinimumWorkingSet;
758 ULONG MaximumWorkingSet;
759 ULONG CurrentSizeIncludingTransitionInPages;
760 ULONG PeakSizeIncludingTransitionInPages;
761 ULONG Unused[2];
762 } SYSTEM_CACHE_INFORMATION;
763
764 /* Class 22 */
765 typedef struct _SYSTEM_POOLTAG
766 {
767 union
768 {
769 UCHAR Tag[4];
770 ULONG TagUlong;
771 };
772 ULONG PagedAllocs;
773 ULONG PagedFrees;
774 ULONG PagedUsed;
775 ULONG NonPagedAllocs;
776 ULONG NonPagedFrees;
777 ULONG NonPagedUsed;
778 } SYSTEM_POOLTAG, *PSYSTEM_POOLTAG;
779 typedef struct _SYSTEM_POOLTAG_INFORMATION
780 {
781 ULONG Count;
782 SYSTEM_POOLTAG TagInfo[1];
783 } SYSTEM_POOLTAG_INFORMATION, *PSYSTEM_POOLTAG_INFORMATION;
784
785 /* Class 23 */
786 typedef struct _SYSTEM_INTERRUPT_INFORMATION
787 {
788 ULONG ContextSwitches;
789 ULONG DpcCount;
790 ULONG DpcRate;
791 ULONG TimeIncrement;
792 ULONG DpcBypassCount;
793 ULONG ApcBypassCount;
794 } SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION;
795
796 /* Class 24 */
797 typedef struct _SYSTEM_DPC_BEHAVIOR_INFORMATION
798 {
799 ULONG Spare;
800 ULONG DpcQueueDepth;
801 ULONG MinimumDpcRate;
802 ULONG AdjustDpcThreshold;
803 ULONG IdealDpcRate;
804 } SYSTEM_DPC_BEHAVIOR_INFORMATION, *PSYSTEM_DPC_BEHAVIOR_INFORMATION;
805
806 /* Class 25 */
807 typedef struct _SYSTEM_MEMORY_INFO
808 {
809 PUCHAR StringOffset;
810 USHORT ValidCount;
811 USHORT TransitionCount;
812 USHORT ModifiedCount;
813 USHORT PageTableCount;
814 } SYSTEM_MEMORY_INFO, *PSYSTEM_MEMORY_INFO;
815 typedef struct _SYSTEM_MEMORY_INFORMATION
816 {
817 ULONG InfoSize;
818 ULONG StringStart;
819 SYSTEM_MEMORY_INFO Memory[1];
820 } SYSTEM_MEMORY_INFORMATION, *PSYSTEM_MEMORY_INFORMATION;
821
822 /* Class 26 */
823 typedef struct _SYSTEM_GDI_DRIVER_INFORMATION {
824 UNICODE_STRING DriverName;
825 PVOID ImageAddress;
826 PVOID SectionPointer;
827 PVOID EntryPoint;
828 PIMAGE_EXPORT_DIRECTORY ExportSectionPointer;
829 } SYSTEM_GDI_DRIVER_INFORMATION, *PSYSTEM_GDI_DRIVER_INFORMATION;
830
831 /* Class 27 */
832 /* Not an actuall class, simply a PVOID to the ImageAddress */
833
834 /* Class 28 */
835 typedef struct _SYSTEM_QUERY_TIME_ADJUST_INFORMATION
836 {
837 ULONG TimeAdjustment;
838 ULONG TimeIncrement;
839 BOOLEAN Enable;
840 } SYSTEM_QUERY_TIME_ADJUST_INFORMATION, *PSYSTEM_QUERY_TIME_ADJUST_INFORMATION;
841 typedef struct _SYSTEM_SET_TIME_ADJUST_INFORMATION
842 {
843 ULONG TimeAdjustment;
844 BOOLEAN Enable;
845 } SYSTEM_SET_TIME_ADJUST_INFORMATION, *PSYSTEM_SET_TIME_ADJUST_INFORMATION;
846
847 /* Class 29 - Same as 25 */
848
849 /* Class 30 - 31 */
850 /* FIXME */
851
852 /* Class 32 */
853 typedef struct _SYSTEM_CRASH_DUMP_INFORMATION
854 {
855 HANDLE CrashDumpSection;
856 } SYSTEM_CRASH_DUMP_INFORMATION, *PSYSTEM_CRASH_DUMP_INFORMATION;
857
858 /* Class 33 */
859 typedef struct _SYSTEM_EXCEPTION_INFORMATION
860 {
861 ULONG AlignmentFixupCount;
862 ULONG ExceptionDispatchCount;
863 ULONG FloatingEmulationCount;
864 ULONG ByteWordEmulationCount;
865 } SYSTEM_EXCEPTION_INFORMATION, *PSYSTEM_EXCEPTION_INFORMATION;
866
867 /* Class 34 */
868 typedef struct _SYSTEM_CRASH_STATE_INFORMATION
869 {
870 ULONG ValidCrashDump;
871 } SYSTEM_CRASH_STATE_INFORMATION, *PSYSTEM_CRASH_STATE_INFORMATION;
872
873 /* Class 35 */
874 typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION
875 {
876 BOOLEAN KernelDebuggerEnabled;
877 BOOLEAN KernelDebuggerNotPresent;
878 } SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
879
880 /* Class 36 */
881 typedef struct _SYSTEM_CONTEXT_SWITCH_INFORMATION {
882 ULONG ContextSwitches;
883 ULONG FindAny;
884 ULONG FindLast;
885 ULONG FindIdeal;
886 ULONG IdleAny;
887 ULONG IdleCurrent;
888 ULONG IdleLast;
889 ULONG IdleIdeal;
890 ULONG PreemptAny;
891 ULONG PreemptCurrent;
892 ULONG PreemptLast;
893 ULONG SwitchToIdle;
894 } SYSTEM_CONTEXT_SWITCH_INFORMATION, *PSYSTEM_CONTEXT_SWITCH_INFORMATION;
895
896 /* Class 37 */
897 typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION
898 {
899 ULONG RegistryQuotaAllowed;
900 ULONG RegistryQuotaUsed;
901 ULONG PagedPoolSize;
902 } SYSTEM_REGISTRY_QUOTA_INFORMATION, *PSYSTEM_REGISTRY_QUOTA_INFORMATION;
903
904 /* Class 38 */
905 /* Not a structure, simply send the UNICODE_STRING */
906
907 /* Class 39 */
908 /* Not a structure, simply send a ULONG containing the new separation */
909
910 /* Class 40 */
911 typedef struct _PLUGPLAY_BUS_TYPE
912 {
913 PLUGPLAY_BUS_CLASS BusClass;
914 union
915 {
916 INTERFACE_TYPE SystemBusType;
917 PLUGPLAY_VIRTUAL_BUS_TYPE PlugPlayVirtualBusType;
918 };
919 } PLUGPLAY_BUS_TYPE, *PPLUGPLAY_BUS_TYPE;
920 typedef struct _PLUGPLAY_BUS_INSTANCE
921 {
922 PLUGPLAY_BUS_TYPE BusType;
923 ULONG BusNumber;
924 WCHAR BusName[MAX_BUS_NAME];
925 } PLUGPLAY_BUS_INSTANCE, *PPLUGPLAY_BUS_INSTANCE;
926 typedef struct _SYSTEM_PLUGPLAY_BUS_INFORMATION
927 {
928 ULONG BusCount;
929 PLUGPLAY_BUS_INSTANCE BusInstance[1];
930 } SYSTEM_PLUGPLAY_BUS_INFORMATION, *PSYSTEM_PLUGPLAY_BUS_INFORMATION;
931
932 /* Class 41 */
933 typedef struct _SYSTEM_DOCK_INFORMATION
934 {
935 SYSTEM_DOCK_STATE DockState;
936 INTERFACE_TYPE DeviceBusType;
937 ULONG DeviceBusNumber;
938 ULONG SlotNumber;
939 } SYSTEM_DOCK_INFORMATION, *PSYSTEM_DOCK_INFORMATION;
940
941 /* Class 42 */
942 /* FIXME: Conflict with WINNT.H */
943 typedef struct __SYSTEM_POWER_INFORMATION
944 {
945 BOOLEAN SystemSuspendSupported;
946 BOOLEAN SystemHibernateSupported;
947 BOOLEAN ResumeTimerSupportsSuspend;
948 BOOLEAN ResumeTimerSupportsHibernate;
949 BOOLEAN LidSupported;
950 BOOLEAN TurboSettingSupported;
951 BOOLEAN TurboMode;
952 BOOLEAN SystemAcOrDc;
953 BOOLEAN PowerDownDisabled;
954 LARGE_INTEGER SpindownDrives;
955 } _SYSTEM_POWER_INFORMATION, *P_SYSTEM_POWER_INFORMATION;
956
957 /* Class 43 */
958 typedef struct _SYSTEM_LEGACY_DRIVER_INFORMATION
959 {
960 PNP_VETO_TYPE VetoType;
961 UNICODE_STRING VetoDriver;
962 /* Buffer Follows */
963 } SYSTEM_LEGACY_DRIVER_INFORMATION, *PSYSTEM_LEGACY_DRIVER_INFORMATION;
964
965 /* Class 44 */
966 typedef struct _TIME_ZONE_INFORMATION RTL_TIME_ZONE_INFORMATION;
967
968 /* Class 45 */
969 typedef struct _SYSTEM_LOOKASIDE_INFORMATION
970 {
971 USHORT CurrentDepth;
972 USHORT MaximumDepth;
973 ULONG TotalAllocates;
974 ULONG AllocateMisses;
975 ULONG TotalFrees;
976 ULONG FreeMisses;
977 ULONG Type;
978 ULONG Tag;
979 ULONG Size;
980 } SYSTEM_LOOKASIDE_INFORMATION, *PSYSTEM_LOOKASIDE_INFORMATION;
981
982 /* Class 46 */
983 /* Not a structure. Only a HANDLE for the SlipEvent; */
984
985 /* Class 47 */
986 /* Not a structure. Only a ULONG for the SessionId; */
987
988 /* Class 48 */
989 /* Not a structure. Only a ULONG for the SessionId; */
990
991 /* Class 49 */
992 /* FIXME */
993
994 /* Class 50 */
995 /* Not a structure. Only a ULONG_PTR for the SystemRangeStart */
996
997 /* Class 51 */
998 /* FIXME. Based on MM_DRIVER_VERIFIER_DATA */
999
1000 /* Class 52 */
1001 /* FIXME */
1002
1003 /* Class 53 */
1004 typedef struct _SYSTEM_SESSION_PROCESSES_INFORMATION
1005 {
1006 ULONG SessionId;
1007 ULONG BufferSize;
1008 PVOID Buffer; /* same format as in SystemProcessInformation */
1009 } SYSTEM_SESSION_PROCESSES_INFORMATION, * PSYSTEM_SESSION_PROCESSES_INFORMATION;
1010
1011 /* Class 54-81 */
1012 /* FIXME */
1013
1014
1015 #endif