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