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