1402dee2380957cfd9c0d840b5d2c4648dc423b8
[reactos.git] / reactos / include / ntos / zwtypes.h
1 #ifndef __INCLUDE_NTOS_ZWTYPES_H
2 #define __INCLUDE_NTOS_ZWTYPES_H
3
4 #ifndef __USE_W32API
5
6 typedef unsigned short LANGID;
7 typedef LANGID *PLANGID;
8
9 typedef struct _LDT_ENTRY {
10 WORD LimitLow;
11 WORD BaseLow;
12 union {
13 struct {
14 BYTE BaseMid;
15 BYTE Flags1;
16 BYTE Flags2;
17 BYTE BaseHi;
18 } Bytes;
19 struct {
20 DWORD BaseMid : 8;
21 DWORD Type : 5;
22 DWORD Dpl : 2;
23 DWORD Pres : 1;
24 DWORD LimitHi : 4;
25 DWORD Sys : 1;
26 DWORD Reserved_0 : 1;
27 DWORD Default_Big : 1;
28 DWORD Granularity : 1;
29 DWORD BaseHi : 8;
30 } Bits;
31 } HighWord;
32 } LDT_ENTRY, *PLDT_ENTRY, *LPLDT_ENTRY;
33
34 typedef enum _DEBUG_CONTROL_CODE
35 {
36 DebugGetTraceInformation = 1,
37 DebugSetInternalBreakpoint,
38 DebugSetSpecialCall,
39 DebugClearSpecialCalls,
40 DebugQuerySpecialCalls,
41 DebugDbgBreakPoint,
42 DebugDbgLoadSymbols
43 } DEBUG_CONTROL_CODE;
44
45 typedef enum _KPROFILE_SOURCE
46 {
47 ProfileTime
48 } KPROFILE_SOURCE;
49
50
51 // file disposition values
52
53 #define FILE_SUPERSEDE 0x0000
54 #define FILE_OPEN 0x0001
55 #define FILE_CREATE 0x0002
56 #define FILE_OPEN_IF 0x0003
57 #define FILE_OVERWRITE 0x0004
58 #define FILE_OVERWRITE_IF 0x0005
59 #define FILE_MAXIMUM_DISPOSITION 0x0005
60
61 // job query / set information class
62
63 typedef enum _JOBOBJECTINFOCLASS { // Q S
64 JobObjectBasicAccountingInformation = 1, // Y N
65 JobObjectBasicLimitInformation, // Y Y
66 JobObjectBasicProcessIdList, // Y N
67 JobObjectBasicUIRestrictions, // Y Y
68 JobObjectSecurityLimitInformation, // Y Y
69 JobObjectEndOfJobTimeInformation, // N Y
70 JobObjectAssociateCompletionPortInformation, // N Y
71 JobObjectBasicAndIoAccountingInformation, // Y N
72 JobObjectExtendedLimitInformation, // Y Y
73 } JOBOBJECTINFOCLASS;
74
75 // system information
76 // {Nt|Zw}{Query|Set}SystemInformation
77 // (GN means Gary Nebbet in "NT/W2K Native API Reference")
78
79 typedef
80 enum _SYSTEM_INFORMATION_CLASS
81 {
82 SystemInformationClassMin = 0,
83 SystemBasicInformation = 0, /* Q */
84
85 SystemProcessorInformation = 1, /* Q */
86
87 SystemPerformanceInformation = 2, /* Q */
88
89 SystemTimeOfDayInformation = 3, /* Q */
90
91 SystemPathInformation = 4, /* Q (checked build only) */
92 SystemNotImplemented1 = 4, /* Q (GN) */
93
94 SystemProcessInformation = 5, /* Q */
95 SystemProcessesAndThreadsInformation = 5, /* Q (GN) */
96
97 SystemCallCountInfoInformation = 6, /* Q */
98 SystemCallCounts = 6, /* Q (GN) */
99
100 SystemDeviceInformation = 7, /* Q */
101 // It conflicts with symbol in ntoskrnl/io/resource.c
102 // SystemConfigurationInformation = 7, /* Q (GN) */
103
104 SystemProcessorPerformanceInformation = 8, /* Q */
105 SystemProcessorTimes = 8, /* Q (GN) */
106
107 SystemFlagsInformation = 9, /* QS */
108 SystemGlobalFlag = 9, /* QS (GN) */
109
110 SystemCallTimeInformation = 10,
111 SystemNotImplemented2 = 10, /* (GN) */
112
113 SystemModuleInformation = 11, /* Q */
114
115 SystemLocksInformation = 12, /* Q */
116 SystemLockInformation = 12, /* Q (GN) */
117
118 SystemStackTraceInformation = 13,
119 SystemNotImplemented3 = 13, /* Q (GN) */
120
121 SystemPagedPoolInformation = 14,
122 SystemNotImplemented4 = 14, /* Q (GN) */
123
124 SystemNonPagedPoolInformation = 15,
125 SystemNotImplemented5 = 15, /* Q (GN) */
126
127 SystemHandleInformation = 16, /* Q */
128
129 SystemObjectInformation = 17, /* Q */
130
131 SystemPageFileInformation = 18, /* Q */
132 SystemPagefileInformation = 18, /* Q (GN) */
133
134 SystemVdmInstemulInformation = 19, /* Q */
135 SystemInstructionEmulationCounts = 19, /* Q (GN) */
136
137 SystemVdmBopInformation = 20,
138 SystemInvalidInfoClass1 = 20, /* (GN) */
139
140 SystemFileCacheInformation = 21, /* QS */
141 SystemCacheInformation = 21, /* QS (GN) */
142
143 SystemPoolTagInformation = 22, /* Q (checked build only) */
144
145 SystemInterruptInformation = 23, /* Q */
146 SystemProcessorStatistics = 23, /* Q (GN) */
147
148 SystemDpcBehaviourInformation = 24, /* QS */
149 SystemDpcInformation = 24, /* QS (GN) */
150
151 SystemFullMemoryInformation = 25,
152 SystemNotImplemented6 = 25, /* (GN) */
153
154 SystemLoadImage = 26, /* S (callable) (GN) */
155
156 SystemUnloadImage = 27, /* S (callable) (GN) */
157
158 SystemTimeAdjustmentInformation = 28, /* QS */
159 SystemTimeAdjustment = 28, /* QS (GN) */
160
161 SystemSummaryMemoryInformation = 29,
162 SystemNotImplemented7 = 29, /* (GN) */
163
164 SystemNextEventIdInformation = 30,
165 SystemNotImplemented8 = 30, /* (GN) */
166
167 SystemEventIdsInformation = 31,
168 SystemNotImplemented9 = 31, /* (GN) */
169
170 SystemCrashDumpInformation = 32, /* Q */
171
172 SystemExceptionInformation = 33, /* Q */
173
174 SystemCrashDumpStateInformation = 34, /* Q */
175
176 SystemKernelDebuggerInformation = 35, /* Q */
177
178 SystemContextSwitchInformation = 36, /* Q */
179
180 SystemRegistryQuotaInformation = 37, /* QS */
181
182 SystemLoadAndCallImage = 38, /* S (GN) */
183
184 SystemPrioritySeparation = 39, /* S */
185
186 SystemPlugPlayBusInformation = 40,
187 SystemNotImplemented10 = 40, /* Q (GN) */
188
189 SystemDockInformation = 41,
190 SystemNotImplemented11 = 41, /* Q (GN) */
191
192 SystemPowerInformation = 42,
193 SystemInvalidInfoClass2 = 42, /* (GN) */
194
195 SystemProcessorSpeedInformation = 43,
196 SystemInvalidInfoClass3 = 43, /* (GN) */
197
198 SystemCurrentTimeZoneInformation = 44, /* QS */
199 SystemTimeZoneInformation = 44, /* QS (GN) */
200
201 SystemLookasideInformation = 45, /* Q */
202
203 SystemSetTimeSlipEvent = 46, /* S (GN) */
204
205 SystemCreateSession = 47, /* S (GN) */
206
207 SystemDeleteSession = 48, /* S (GN) */
208
209 SystemInvalidInfoClass4 = 49, /* (GN) */
210
211 SystemRangeStartInformation = 50, /* Q (GN) */
212
213 SystemVerifierInformation = 51, /* QS (GN) */
214
215 SystemAddVerifier = 52, /* S (GN) */
216
217 SystemSessionProcessesInformation = 53, /* Q (GN) */
218 SystemInformationClassMax
219
220 } SYSTEM_INFORMATION_CLASS;
221
222 // SystemBasicInformation (0)
223 // Modified by Andrew Greenwood (15th July 2003) to match Win 32 API headers
224 typedef
225 struct _SYSTEM_BASIC_INFORMATION
226 {
227 ULONG Unknown;
228 ULONG MaximumIncrement;
229 ULONG PhysicalPageSize;
230 ULONG NumberOfPhysicalPages;
231 ULONG LowestPhysicalPage;
232 ULONG HighestPhysicalPage;
233 ULONG AllocationGranularity;
234 ULONG LowestUserAddress;
235 ULONG HighestUserAddress;
236 KAFFINITY ActiveProcessors;
237 CCHAR NumberProcessors;
238 } SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
239
240 // SystemProcessorInformation (1)
241 // Modified by Andrew Greenwood (15th July 2003) to match Win 32 API headers
242 typedef struct _SYSTEM_PROCESSOR_INFORMATION {
243 USHORT ProcessorArchitecture;
244 USHORT ProcessorLevel;
245 USHORT ProcessorRevision;
246 USHORT Unknown;
247 ULONG FeatureBits;
248 } SYSTEM_PROCESSOR_INFORMATION, *PSYSTEM_PROCESSOR_INFORMATION;
249
250 // SystemPerformanceInfo (2)
251 // Modified by Andrew Greenwood (15th July 2003) to match Win 32 API headers
252 typedef struct _SYSTEM_PERFORMANCE_INFORMATION {
253 LARGE_INTEGER IdleTime;
254 LARGE_INTEGER ReadTransferCount;
255 LARGE_INTEGER WriteTransferCount;
256 LARGE_INTEGER OtherTransferCount;
257 ULONG ReadOperationCount;
258 ULONG WriteOperationCount;
259 ULONG OtherOperationCount;
260 ULONG AvailablePages;
261 ULONG TotalCommittedPages;
262 ULONG TotalCommitLimit;
263 ULONG PeakCommitment;
264 ULONG PageFaults;
265 ULONG WriteCopyFaults;
266 ULONG TransitionFaults;
267 ULONG CacheTransitionFaults;
268 ULONG DemandZeroFaults;
269 ULONG PagesRead;
270 ULONG PageReadIos;
271 ULONG CacheReads;
272 ULONG CacheIos;
273 ULONG PagefilePagesWritten;
274 ULONG PagefilePageWriteIos;
275 ULONG MappedFilePagesWritten;
276 ULONG MappedFilePageWriteIos;
277 ULONG PagedPoolUsage;
278 ULONG NonPagedPoolUsage;
279 ULONG PagedPoolAllocs;
280 ULONG PagedPoolFrees;
281 ULONG NonPagedPoolAllocs;
282 ULONG NonPagedPoolFrees;
283 ULONG TotalFreeSystemPtes;
284 ULONG SystemCodePage;
285 ULONG TotalSystemDriverPages;
286 ULONG TotalSystemCodePages;
287 ULONG SmallNonPagedLookasideListAllocateHits;
288 ULONG SmallPagedLookasideListAllocateHits;
289 ULONG Reserved3;
290 ULONG MmSystemCachePage;
291 ULONG PagedPoolPage;
292 ULONG SystemDriverPage;
293 ULONG FastReadNoWait;
294 ULONG FastReadWait;
295 ULONG FastReadResourceMiss;
296 ULONG FastReadNotPossible;
297 ULONG FastMdlReadNoWait;
298 ULONG FastMdlReadWait;
299 ULONG FastMdlReadResourceMiss;
300 ULONG FastMdlReadNotPossible;
301 ULONG MapDataNoWait;
302 ULONG MapDataWait;
303 ULONG MapDataNoWaitMiss;
304 ULONG MapDataWaitMiss;
305 ULONG PinMappedDataCount;
306 ULONG PinReadNoWait;
307 ULONG PinReadWait;
308 ULONG PinReadNoWaitMiss;
309 ULONG PinReadWaitMiss;
310 ULONG CopyReadNoWait;
311 ULONG CopyReadWait;
312 ULONG CopyReadNoWaitMiss;
313 ULONG CopyReadWaitMiss;
314 ULONG MdlReadNoWait;
315 ULONG MdlReadWait;
316 ULONG MdlReadNoWaitMiss;
317 ULONG MdlReadWaitMiss;
318 ULONG ReadAheadIos;
319 ULONG LazyWriteIos;
320 ULONG LazyWritePages;
321 ULONG DataFlushes;
322 ULONG DataPages;
323 ULONG ContextSwitches;
324 ULONG FirstLevelTbFills;
325 ULONG SecondLevelTbFills;
326 ULONG SystemCalls;
327 } SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;
328
329 #ifndef __USE_W32API
330
331 // SystemProcessThreadInfo (5)
332 typedef struct _SYSTEM_THREAD_INFORMATION
333 {
334 LARGE_INTEGER KernelTime;
335 LARGE_INTEGER UserTime;
336 LARGE_INTEGER CreateTime;
337 ULONG WaitTime;
338 PVOID StartAddress;
339 CLIENT_ID ClientId;
340 KPRIORITY Priority;
341 LONG BasePriority;
342 ULONG ContextSwitches;
343 ULONG ThreadState;
344 ULONG WaitReason;
345 } SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION;
346
347 typedef struct _SYSTEM_PROCESS_INFORMATION
348 {
349 ULONG NextEntryOffset;
350 ULONG NumberOfThreads;
351 LARGE_INTEGER SpareLi1;
352 LARGE_INTEGER SpareLi2;
353 LARGE_INTEGER SpareLi3;
354 LARGE_INTEGER CreateTime;
355 LARGE_INTEGER UserTime;
356 LARGE_INTEGER KernelTime;
357 UNICODE_STRING ImageName;
358 KPRIORITY BasePriority;
359 HANDLE UniqueProcessId;
360 HANDLE InheritedFromUniqueProcessId;
361 ULONG HandleCount;
362 ULONG SessionId;
363 ULONG PageDirectoryFrame;
364
365 /*
366 * This part corresponds to VM_COUNTERS_EX.
367 * NOTE: *NOT* THE SAME AS VM_COUNTERS!
368 */
369 ULONG PeakVirtualSize;
370 ULONG VirtualSize;
371 ULONG PageFaultCount;
372 ULONG PeakWorkingSetSize;
373 ULONG WorkingSetSize;
374 ULONG QuotaPeakPagedPoolUsage;
375 ULONG QuotaPagedPoolUsage;
376 ULONG QuotaPeakNonPagedPoolUsage;
377 ULONG QuotaNonPagedPoolUsage;
378 ULONG PagefileUsage;
379 ULONG PeakPagefileUsage;
380 ULONG PrivateUsage;
381
382 /* This part corresponds to IO_COUNTERS */
383 LARGE_INTEGER ReadOperationCount;
384 LARGE_INTEGER WriteOperationCount;
385 LARGE_INTEGER OtherOperationCount;
386 LARGE_INTEGER ReadTransferCount;
387 LARGE_INTEGER WriteTransferCount;
388 LARGE_INTEGER OtherTransferCount;
389
390 /* Finally, the array of Threads */
391 SYSTEM_THREAD_INFORMATION TH[1];
392 } SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
393
394 #endif
395
396 // SystemModuleInformation (11)
397 typedef struct _SYSTEM_MODULE_INFORMATION_ENTRY {
398 ULONG Unknown1;
399 ULONG Unknown2;
400 PVOID Base;
401 ULONG Size;
402 ULONG Flags;
403 USHORT Index;
404 /* Length of module name not including the path, this
405 field contains valid value only for NTOSKRNL module */
406 USHORT NameLength;
407 USHORT LoadCount;
408 USHORT PathLength;
409 CHAR ImageName[256];
410 } SYSTEM_MODULE_INFORMATION_ENTRY, *PSYSTEM_MODULE_INFORMATION_ENTRY;
411
412 typedef struct _SYSTEM_MODULE_INFORMATION {
413 ULONG Count;
414 SYSTEM_MODULE_INFORMATION_ENTRY Module[1];
415 } SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
416
417 // SystemHandleInformation (16)
418 // (see ontypes.h)
419 typedef
420 struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO
421 {
422 USHORT UniqueProcessId;
423 USHORT CreatorBackTraceIndex;
424 UCHAR ObjectTypeIndex;
425 UCHAR HandleAttributes;
426 USHORT HandleValue;
427 PVOID Object;
428 ULONG GrantedAccess;
429
430 } SYSTEM_HANDLE_TABLE_ENTRY_INFO, *PSYSTEM_HANDLE_TABLE_ENTRY_INFO;
431
432 typedef
433 struct _SYSTEM_HANDLE_INFORMATION
434 {
435 ULONG NumberOfHandles;
436 SYSTEM_HANDLE_TABLE_ENTRY_INFO Handles[1];
437
438 } SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
439
440 // SystemObjectInformation (17)
441 typedef
442 struct _SYSTEM_OBJECT_TYPE_INFORMATION
443 {
444 ULONG NextEntryOffset;
445 ULONG ObjectCount;
446 ULONG HandleCount;
447 ULONG TypeNumber;
448 ULONG InvalidAttributes;
449 GENERIC_MAPPING GenericMapping;
450 ACCESS_MASK ValidAccessMask;
451 POOL_TYPE PoolType;
452 UCHAR Unknown;
453 UNICODE_STRING Name;
454
455 } SYSTEM_OBJECT_TYPE_INFORMATION, *PSYSTEM_OBJECT_TYPE_INFORMATION;
456
457 typedef
458 struct _SYSTEM_OBJECT_INFORMATION
459 {
460 ULONG NextEntryOffset;
461 PVOID Object;
462 ULONG CreatorProcessId;
463 USHORT Unknown;
464 USHORT Flags;
465 ULONG PointerCount;
466 ULONG HandleCount;
467 ULONG PagedPoolUsage;
468 ULONG NonPagedPoolUsage;
469 ULONG ExclusiveProcessId;
470 PSECURITY_DESCRIPTOR SecurityDescriptor;
471 UNICODE_STRING Name;
472
473 } SYSTEM_OBJECT_INFORMATION, *PSYSTEM_OBJECT_INFORMATION;
474
475 // SystemPageFileInformation (18)
476 typedef
477 struct _SYSTEM_PAGEFILE_INFORMATION
478 {
479 ULONG NextEntryOffset;
480 ULONG TotalSize;
481 ULONG TotalInUse;
482 ULONG PeakUsage;
483 UNICODE_STRING PageFileName;
484
485 } SYSTEM_PAGEFILE_INFORMATION, *PSYSTEM_PAGEFILE_INFORMATION;
486
487 // SystemCacheInformation (21)
488 typedef
489 struct _SYSTEM_CACHE_INFORMATION
490 {
491 ULONG CurrentSize;
492 ULONG PeakSize;
493 ULONG PageFaultCount;
494 ULONG MinimumWorkingSet;
495 ULONG MaximumWorkingSet;
496 ULONG TransitionSharedPages;
497 ULONG TransitionSharedPagesPeak;
498 ULONG Unused[2];
499
500 } SYSTEM_CACHE_INFORMATION;
501
502 // SystemInterruptInformation (23)
503 typedef
504 struct _SYSTEM_INTERRUPT_INFORMATION
505 {
506 ULONG ContextSwitches;
507 ULONG DpcCount;
508 ULONG DpcRate;
509 ULONG TimeIncrement;
510 ULONG DpcBypassCount;
511 ULONG ApcBypassCount;
512
513 } SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION;
514
515 // SystemDpcInformation (24)
516 typedef
517 struct _SYSTEM_DPC_INFORMATION
518 {
519 ULONG Unused;
520 ULONG KiMaximumDpcQueueDepth;
521 ULONG KiMinimumDpcRate;
522 ULONG KiAdjustDpcThreshold;
523 ULONG KiIdealDpcRate;
524
525 } SYSTEM_DPC_INFORMATION, *PSYSTEM_DPC_INFORMATION;
526
527 // SystemLoadImage (26)
528 typedef struct _SYSTEM_LOAD_IMAGE
529 {
530 UNICODE_STRING ModuleName;
531 PVOID ModuleBase;
532 PVOID SectionPointer;
533 PVOID EntryPoint;
534 PVOID ExportDirectory;
535 } SYSTEM_LOAD_IMAGE, *PSYSTEM_LOAD_IMAGE;
536
537 // SystemUnloadImage (27)
538 typedef struct _SYSTEM_UNLOAD_IMAGE
539 {
540 PVOID ModuleBase;
541 } SYSTEM_UNLOAD_IMAGE, *PSYSTEM_UNLOAD_IMAGE;
542
543 // SystemTimeAdjustmentInformation (28)
544 typedef
545 struct _SYSTEM_QUERY_TIME_ADJUSTMENT
546 {
547 ULONG TimeAdjustment;
548 ULONG MaximumIncrement;
549 BOOLEAN TimeSynchronization;
550
551 } SYSTEM_QUERY_TIME_ADJUSTMENT, *PSYSTEM_QUERY_TIME_ADJUSTMENT;
552
553 typedef
554 struct _SYSTEM_SET_TIME_ADJUSTMENT
555 {
556 ULONG TimeAdjustment;
557 BOOLEAN TimeSynchronization;
558
559 } SYSTEM_SET_TIME_ADJUSTMENT, *PSYSTEM_SET_TIME_ADJUSTMENT;
560
561 // atom information
562
563 typedef enum _ATOM_INFORMATION_CLASS
564 {
565 AtomBasicInformation = 0,
566 AtomTableInformation = 1,
567 } ATOM_INFORMATION_CLASS;
568
569 typedef struct _ATOM_BASIC_INFORMATION
570 {
571 USHORT UsageCount;
572 USHORT Flags;
573 USHORT NameLength;
574 WCHAR Name[1];
575 } ATOM_BASIC_INFORMATION, *PATOM_BASIC_INFORMATION;
576
577 // SystemLoadAndCallImage(38)
578 typedef struct _SYSTEM_LOAD_AND_CALL_IMAGE
579 {
580 UNICODE_STRING ModuleName;
581 } SYSTEM_LOAD_AND_CALL_IMAGE, *PSYSTEM_LOAD_AND_CALL_IMAGE;
582
583 // SystemRegistryQuotaInformation (37)
584 typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION {
585 ULONG RegistryQuotaAllowed;
586 ULONG RegistryQuotaUsed;
587 PVOID Reserved1;
588 } SYSTEM_REGISTRY_QUOTA_INFORMATION, *PSYSTEM_REGISTRY_QUOTA_INFORMATION;
589
590
591 // SystemTimeZoneInformation (44)
592 typedef
593 struct _SYSTEM_TIME_ZONE_INFORMATION
594 {
595 LONG Bias;
596 WCHAR StandardName [32];
597 TIME StandardDate;
598 LONG StandardBias;
599 WCHAR DaylightName [32];
600 TIME DaylightDate;
601 LONG DaylightBias;
602
603 } SYSTEM_TIME_ZONE_INFORMATION, * PSYSTEM_TIME_ZONE_INFORMATION;
604
605 // SystemLookasideInformation (45)
606 typedef
607 struct _SYSTEM_LOOKASIDE_INFORMATION
608 {
609 USHORT Depth;
610 USHORT MaximumDepth;
611 ULONG TotalAllocates;
612 ULONG AllocatesMisses;
613 ULONG TotalFrees;
614 ULONG FreeMisses;
615 POOL_TYPE Type;
616 ULONG Tag;
617 ULONG Size;
618
619 } SYSTEM_LOOKASIDE_INFORMATION, * PSYSTEM_LOOKASIDE_INFORMATION;
620
621 // SystemSetTimeSlipEvent (46)
622 typedef
623 struct _SYSTEM_SET_TIME_SLIP_EVENT
624 {
625 HANDLE TimeSlipEvent; /* IN */
626
627 } SYSTEM_SET_TIME_SLIP_EVENT, * PSYSTEM_SET_TIME_SLIP_EVENT;
628
629 // SystemCreateSession (47)
630 // (available only on TSE/NT5+)
631 typedef
632 struct _SYSTEM_CREATE_SESSION
633 {
634 ULONG SessionId; /* OUT */
635
636 } SYSTEM_CREATE_SESSION, * PSYSTEM_CREATE_SESSION;
637
638 // SystemDeleteSession (48)
639 // (available only on TSE/NT5+)
640 typedef
641 struct _SYSTEM_DELETE_SESSION
642 {
643 ULONG SessionId; /* IN */
644
645 } SYSTEM_DELETE_SESSION, * PSYSTEM_DELETE_SESSION;
646
647 // SystemRangeStartInformation (50)
648 typedef
649 struct _SYSTEM_RANGE_START_INFORMATION
650 {
651 PVOID SystemRangeStart;
652
653 } SYSTEM_RANGE_START_INFORMATION, * PSYSTEM_RANGE_START_INFORMATION;
654
655 // SystemSessionProcessesInformation (53)
656 // (available only on TSE/NT5+)
657 typedef
658 struct _SYSTEM_SESSION_PROCESSES_INFORMATION
659 {
660 ULONG SessionId;
661 ULONG BufferSize;
662 PVOID Buffer; /* same format as in SystemProcessInformation */
663
664 } SYSTEM_SESSION_PROCESSES_INFORMATION, * PSYSTEM_SESSION_PROCESSES_INFORMATION;
665
666 // memory information
667
668 typedef enum _MEMORY_INFORMATION_CLASS {
669 MemoryBasicInformation,
670 MemoryWorkingSetList,
671 MemorySectionName //,
672 //MemoryBasicVlmInformation //???
673 } MEMORY_INFORMATION_CLASS;
674
675 typedef struct _MEMORY_BASIC_INFORMATION { // Information Class 0
676 PVOID BaseAddress;
677 PVOID AllocationBase;
678 ULONG AllocationProtect;
679 ULONG RegionSize;
680 ULONG State;
681 ULONG Protect;
682 ULONG Type;
683 } MEMORY_BASIC_INFORMATION, *PMEMORY_BASIC_INFORMATION;
684
685 typedef struct _MEMORY_WORKING_SET_LIST { // Information Class 1
686 ULONG NumberOfPages;
687 ULONG WorkingSetList[1];
688 } MEMORY_WORKING_SET_LIST, *PMEMORY_WORKING_SET_LIST;
689
690 // Information Class 2
691 /*#define _MEMORY_SECTION_NAME_STATIC(__bufsize__) \
692 { \
693 UNICODE_STRING SectionFileName; \
694 WCHAR NameBuffer[(__bufsize__)]; \
695 }*/
696
697 typedef struct
698 {
699 UNICODE_STRING SectionFileName;
700 WCHAR NameBuffer[ANYSIZE_ARRAY];
701 } MEMORY_SECTION_NAME, *PMEMORY_SECTION_NAME;
702
703 // Information class 0
704 typedef struct _PROCESS_BASIC_INFORMATION
705 {
706 NTSTATUS ExitStatus;
707 PPEB PebBaseAddress;
708 KAFFINITY AffinityMask;
709 KPRIORITY BasePriority;
710 HANDLE UniqueProcessId;
711 HANDLE InheritedFromUniqueProcessId;
712 } PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;
713
714 // Information class 1
715 typedef struct _QUOTA_LIMITS
716 {
717 ULONG PagedPoolLimit;
718 ULONG NonPagedPoolLimit;
719 SIZE_T MinimumWorkingSetSize;
720 SIZE_T MaximumWorkingSetSize;
721 ULONG PagefileLimit;
722 TIME TimeLimit;
723 } QUOTA_LIMITS, *PQUOTA_LIMITS;
724
725 // Information class 2
726 typedef struct _IO_COUNTERS
727 {
728 LARGE_INTEGER ReadOperationCount;
729 LARGE_INTEGER WriteOperationCount;
730 LARGE_INTEGER OtherOperationCount;
731 LARGE_INTEGER ReadTransferCount;
732 LARGE_INTEGER WriteTransferCount;
733 LARGE_INTEGER OtherTransferCount;
734 } IO_COUNTERS, *PIO_COUNTERS;
735
736 // Information class 3
737 typedef struct _VM_COUNTERS_
738 {
739 ULONG PeakVirtualSize;
740 ULONG VirtualSize;
741 ULONG PageFaultCount;
742 ULONG PeakWorkingSetSize;
743 ULONG WorkingSetSize;
744 ULONG QuotaPeakPagedPoolUsage;
745 ULONG QuotaPagedPoolUsage;
746 ULONG QuotaPeakNonPagedPoolUsage;
747 ULONG QuotaNonPagedPoolUsage;
748 ULONG PagefileUsage;
749 ULONG PeakPagefileUsage;
750 } VM_COUNTERS, *PVM_COUNTERS;
751
752 // Information class 4
753 typedef struct _KERNEL_USER_TIMES
754 {
755 LARGE_INTEGER CreateTime;
756 LARGE_INTEGER ExitTime;
757 LARGE_INTEGER KernelTime;
758 LARGE_INTEGER UserTime;
759 } KERNEL_USER_TIMES, *PKERNEL_USER_TIMES;
760
761 // Information class 9
762 typedef struct _PROCESS_ACCESS_TOKEN
763 {
764 HANDLE Token;
765 HANDLE Thread;
766 } PROCESS_ACCESS_TOKEN, *PPROCESS_ACCESS_TOKEN;
767
768 // Information class 14
769 typedef struct _POOLED_USAGE_AND_LIMITS_
770 {
771 ULONG PeakPagedPoolUsage;
772 ULONG PagedPoolUsage;
773 ULONG PagedPoolLimit;
774 ULONG PeakNonPagedPoolUsage;
775 ULONG NonPagedPoolUsage;
776 ULONG NonPagedPoolLimit;
777 ULONG PeakPagefileUsage;
778 ULONG PagefileUsage;
779 ULONG PagefileLimit;
780 } POOLED_USAGE_AND_LIMITS, *PPOOLED_USAGE_AND_LIMITS;
781
782 // Information class 15
783 typedef struct _PROCESS_WS_WATCH_INFORMATION
784 {
785 PVOID FaultingPc;
786 PVOID FaultingVa;
787 } PROCESS_WS_WATCH_INFORMATION, *PPROCESS_WS_WATCH_INFORMATION;
788
789 // Information class 18
790 typedef struct _PROCESS_PRIORITY_CLASS
791 {
792 BOOLEAN Foreground;
793 UCHAR PriorityClass;
794 } PROCESS_PRIORITY_CLASS, *PPROCESS_PRIORITY_CLASS;
795
796 // Information class 23
797 typedef struct _PROCESS_DEVICEMAP_INFORMATION
798 {
799 union {
800 struct {
801 HANDLE DirectoryHandle;
802 } Set;
803 struct {
804 ULONG DriveMap;
805 UCHAR DriveType[32];
806 } Query;
807 };
808 } PROCESS_DEVICEMAP_INFORMATION, *PPROCESS_DEVICEMAP_INFORMATION;
809
810 // Information class 24
811 typedef struct _PROCESS_SESSION_INFORMATION
812 {
813 ULONG SessionId;
814 } PROCESS_SESSION_INFORMATION, *PPROCESS_SESSION_INFORMATION;
815
816 // thread information
817
818 // incompatible with MS NT
819
820 typedef struct _THREAD_BASIC_INFORMATION
821 {
822 NTSTATUS ExitStatus;
823 PVOID TebBaseAddress; // PNT_TIB (GN)
824 CLIENT_ID ClientId;
825 KAFFINITY AffinityMask;
826 KPRIORITY Priority;
827 KPRIORITY BasePriority;
828 } THREAD_BASIC_INFORMATION, *PTHREAD_BASIC_INFORMATION;
829
830
831 // file information
832
833
834
835 typedef struct _FILE_POSITION_INFORMATION
836 {
837 LARGE_INTEGER CurrentByteOffset;
838 } FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION;
839
840 typedef struct _FILE_ALIGNMENT_INFORMATION
841 {
842 ULONG AlignmentRequirement;
843 } FILE_ALIGNMENT_INFORMATION, *PFILE_ALIGNMENT_INFORMATION;
844
845 typedef struct _FILE_DISPOSITION_INFORMATION
846 {
847 BOOLEAN DoDeleteFile;
848 } FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
849
850 typedef struct _FILE_END_OF_FILE_INFORMATION
851 {
852 LARGE_INTEGER EndOfFile;
853 } FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION;
854
855 typedef struct _FILE_FULL_EA_INFORMATION
856 {
857 ULONG NextEntryOffset;
858 UCHAR Flags;
859 UCHAR EaNameLength;
860 USHORT EaValueLength;
861 CHAR EaName[1];
862 } FILE_FULL_EA_INFORMATION, *PFILE_FULL_EA_INFORMATION;
863
864
865 typedef struct _FILE_EA_INFORMATION {
866 ULONG EaSize;
867 } FILE_EA_INFORMATION, *PFILE_EA_INFORMATION;
868
869
870 typedef struct _FILE_GET_EA_INFORMATION {
871 ULONG NextEntryOffset;
872 UCHAR EaNameLength;
873 CHAR EaName[0];
874 } FILE_GET_EA_INFORMATION, *PFILE_GET_EA_INFORMATION;
875
876 typedef struct _FILE_STREAM_INFORMATION {
877 ULONG NextEntryOffset;
878 ULONG StreamNameLength;
879 LARGE_INTEGER StreamSize;
880 LARGE_INTEGER StreamAllocationSize;
881 WCHAR StreamName[0];
882 } FILE_STREAM_INFORMATION, *PFILE_STREAM_INFORMATION;
883
884 typedef struct _FILE_ALLOCATION_INFORMATION {
885 LARGE_INTEGER AllocationSize;
886 } FILE_ALLOCATION_INFORMATION, *PFILE_ALLOCATION_INFORMATION;
887
888 typedef struct _FILE_NAME_INFORMATION {
889 ULONG FileNameLength;
890 WCHAR FileName[0];
891 } FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
892
893 typedef struct _FILE_NAMES_INFORMATION
894 {
895 ULONG NextEntryOffset;
896 ULONG FileIndex;
897 ULONG FileNameLength;
898 WCHAR FileName[0];
899 } FILE_NAMES_INFORMATION, *PFILE_NAMES_INFORMATION;
900
901
902 typedef struct _FILE_RENAME_INFORMATION {
903 BOOLEAN Replace;
904 HANDLE RootDir;
905 ULONG FileNameLength;
906 WCHAR FileName[0];
907 } FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION;
908
909
910 typedef struct _FILE_INTERNAL_INFORMATION {
911 LARGE_INTEGER IndexNumber;
912 } FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION;
913
914 typedef struct _FILE_ACCESS_INFORMATION {
915 ACCESS_MASK AccessFlags;
916 } FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION;
917
918
919 typedef struct _FILE_MODE_INFORMATION {
920 ULONG Mode;
921 } FILE_MODE_INFORMATION, *PFILE_MODE_INFORMATION;
922
923
924 typedef struct _FILE_PIPE_INFORMATION {
925 ULONG ReadMode;
926 ULONG CompletionMode;
927 } FILE_PIPE_INFORMATION, *PFILE_PIPE_INFORMATION;
928
929 typedef struct _FILE_PIPE_LOCAL_INFORMATION {
930 ULONG NamedPipeType;
931 ULONG NamedPipeConfiguration;
932 ULONG MaximumInstances;
933 ULONG CurrentInstances;
934 ULONG InboundQuota;
935 ULONG ReadDataAvailable;
936 ULONG OutboundQuota;
937 ULONG WriteQuotaAvailable;
938 ULONG NamedPipeState;
939 ULONG NamedPipeEnd;
940 } FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION;
941
942 typedef struct _FILE_PIPE_REMOTE_INFORMATION {
943 LARGE_INTEGER CollectDataTime;
944 ULONG MaximumCollectionCount;
945 } FILE_PIPE_REMOTE_INFORMATION, *PFILE_PIPE_REMOTE_INFORMATION;
946
947 typedef struct _FILE_MAILSLOT_QUERY_INFORMATION {
948 ULONG MaxMessageSize;
949 ULONG Unknown; /* ?? */
950 ULONG NextSize;
951 ULONG MessageCount;
952 LARGE_INTEGER Timeout;
953 } FILE_MAILSLOT_QUERY_INFORMATION, *PFILE_MAILSLOT_QUERY_INFORMATION;
954
955 typedef struct _FILE_MAILSLOT_SET_INFORMATION {
956 LARGE_INTEGER Timeout;
957 } FILE_MAILSLOT_SET_INFORMATION, *PFILE_MAILSLOT_SET_INFORMATION;
958
959 typedef struct _FILE_COMPRESSION_INFORMATION {
960 LARGE_INTEGER CompressedFileSize;
961 USHORT CompressionFormat;
962 UCHAR CompressionUnitShift;
963 UCHAR ChunkShift;
964 UCHAR ClusterShift;
965 UCHAR Reserved[3];
966 } FILE_COMPRESSION_INFORMATION, *PFILE_COMPRESSION_INFORMATION;
967
968 typedef struct _FILE_COMPLETION_INFORMATION { // Information Class 30
969 HANDLE IoCompletionHandle;
970 PVOID CompletionKey;
971 } FILE_COMPLETION_INFORMATION, *PFILE_COMPLETION_INFORMATION;
972
973 typedef struct _FILE_ALL_INFORMATION {
974 FILE_BASIC_INFORMATION BasicInformation;
975 FILE_STANDARD_INFORMATION StandardInformation;
976 FILE_INTERNAL_INFORMATION InternalInformation;
977 FILE_EA_INFORMATION EaInformation;
978 FILE_ACCESS_INFORMATION AccessInformation;
979 FILE_POSITION_INFORMATION PositionInformation;
980 FILE_MODE_INFORMATION ModeInformation;
981 FILE_ALIGNMENT_INFORMATION AlignmentInformation;
982 FILE_NAME_INFORMATION NameInformation;
983 } FILE_ALL_INFORMATION, *PFILE_ALL_INFORMATION;
984
985
986 // file system information structures
987
988 typedef struct _FILE_FS_DEVICE_INFORMATION {
989 DEVICE_TYPE DeviceType;
990 ULONG Characteristics;
991 } FILE_FS_DEVICE_INFORMATION, *PFILE_FS_DEVICE_INFORMATION;
992
993
994 typedef struct _FILE_FS_VOLUME_INFORMATION {
995 TIME VolumeCreationTime;
996 ULONG VolumeSerialNumber;
997 ULONG VolumeLabelLength;
998 BOOLEAN SupportsObjects;
999 WCHAR VolumeLabel[0];
1000 } FILE_FS_VOLUME_INFORMATION, *PFILE_FS_VOLUME_INFORMATION;
1001
1002 typedef struct _FILE_FS_SIZE_INFORMATION {
1003 LARGE_INTEGER TotalAllocationUnits;
1004 LARGE_INTEGER AvailableAllocationUnits;
1005 ULONG SectorsPerAllocationUnit;
1006 ULONG BytesPerSector;
1007 } FILE_FS_SIZE_INFORMATION, *PFILE_FS_SIZE_INFORMATION;
1008
1009 typedef struct _FILE_FS_ATTRIBUTE_INFORMATION {
1010 ULONG FileSystemAttributes;
1011 LONG MaximumComponentNameLength;
1012 ULONG FileSystemNameLength;
1013 WCHAR FileSystemName[0];
1014 } FILE_FS_ATTRIBUTE_INFORMATION, *PFILE_FS_ATTRIBUTE_INFORMATION;
1015
1016 /*
1017 FileSystemAttributes is one of the following values:
1018
1019 FILE_CASE_SENSITIVE_SEARCH 0x00000001
1020 FILE_CASE_PRESERVED_NAMES 0x00000002
1021 FILE_UNICODE_ON_DISK 0x00000004
1022 FILE_PERSISTENT_ACLS 0x00000008
1023 FILE_FILE_COMPRESSION 0x00000010
1024 FILE_VOLUME_QUOTAS 0x00000020
1025 FILE_VOLUME_IS_COMPRESSED 0x00008000
1026 */
1027 typedef struct _FILE_FS_LABEL_INFORMATION {
1028 ULONG VolumeLabelLength;
1029 WCHAR VolumeLabel[0];
1030 } FILE_FS_LABEL_INFORMATION, *PFILE_FS_LABEL_INFORMATION;
1031
1032
1033 typedef struct _FILE_DIRECTORY_INFORMATION {
1034 ULONG NextEntryOffset;
1035 ULONG FileIndex;
1036 LARGE_INTEGER CreationTime;
1037 LARGE_INTEGER LastAccessTime;
1038 LARGE_INTEGER LastWriteTime;
1039 LARGE_INTEGER ChangeTime;
1040 LARGE_INTEGER EndOfFile;
1041 LARGE_INTEGER AllocationSize;
1042 ULONG FileAttributes;
1043 ULONG FileNameLength;
1044 WCHAR FileName[0];
1045 } FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION;
1046
1047 typedef struct _FILE_FULL_DIRECTORY_INFORMATION {
1048 ULONG NextEntryOffset;
1049 ULONG FileIndex;
1050 LARGE_INTEGER CreationTime;
1051 LARGE_INTEGER LastAccessTime;
1052 LARGE_INTEGER LastWriteTime;
1053 LARGE_INTEGER ChangeTime;
1054 LARGE_INTEGER EndOfFile;
1055 LARGE_INTEGER AllocationSize;
1056 ULONG FileAttributes;
1057 ULONG FileNameLength;
1058 ULONG EaSize;
1059 WCHAR FileName[0]; // variable size
1060 } FILE_FULL_DIRECTORY_INFORMATION, *PFILE_FULL_DIRECTORY_INFORMATION,
1061 FILE_FULL_DIR_INFORMATION, *PFILE_FULL_DIR_INFORMATION;
1062
1063
1064 typedef struct _FILE_BOTH_DIRECTORY_INFORMATION {
1065 ULONG NextEntryOffset;
1066 ULONG FileIndex;
1067 LARGE_INTEGER CreationTime;
1068 LARGE_INTEGER LastAccessTime;
1069 LARGE_INTEGER LastWriteTime;
1070 LARGE_INTEGER ChangeTime;
1071 LARGE_INTEGER EndOfFile;
1072 LARGE_INTEGER AllocationSize;
1073 ULONG FileAttributes;
1074 ULONG FileNameLength;
1075 ULONG EaSize;
1076 CHAR ShortNameLength;
1077 WCHAR ShortName[12]; // 8.3 name
1078 WCHAR FileName[0];
1079 } FILE_BOTH_DIRECTORY_INFORMATION, *PFILE_BOTH_DIRECTORY_INFORMATION,
1080 FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION;
1081
1082 /*
1083 NotifyFilter / CompletionFilter:
1084
1085 FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
1086 FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002
1087 FILE_NOTIFY_CHANGE_NAME 0x00000003
1088 FILE_NOTIFY_CHANGE_ATTRIBUTES 0x00000004
1089 FILE_NOTIFY_CHANGE_SIZE 0x00000008
1090 FILE_NOTIFY_CHANGE_LAST_WRITE 0x00000010
1091 FILE_NOTIFY_CHANGE_LAST_ACCESS 0x00000020
1092 FILE_NOTIFY_CHANGE_CREATION 0x00000040
1093 FILE_NOTIFY_CHANGE_EA 0x00000080
1094 FILE_NOTIFY_CHANGE_SECURITY 0x00000100
1095 FILE_NOTIFY_CHANGE_STREAM_NAME 0x00000200
1096 FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000400
1097 FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800
1098 */
1099
1100 typedef struct _FILE_NOTIFY_INFORMATION {
1101 ULONG NextEntryOffset;
1102 ULONG Action;
1103 ULONG NameLength;
1104 WCHAR Name[1];
1105 } FILE_NOTIFY_INFORMATION, *PFILE_NOTIFY_INFORMATION;
1106
1107 #define FSCTL_GET_VOLUME_BITMAP 0x9006F
1108 #define FSCTL_GET_RETRIEVAL_POINTERS 0x90073
1109 #define FSCTL_MOVE_FILE 0x90074
1110
1111 /* Structure copied from ntifs.h (Must be in sync!) */
1112 #include <pshpack8.h>
1113 typedef struct _RETRIEVAL_POINTERS_BUFFER {
1114 ULONG ExtentCount;
1115 LARGE_INTEGER StartingVcn;
1116 struct {
1117 LARGE_INTEGER NextVcn;
1118 LARGE_INTEGER Lcn;
1119 } Extents[1];
1120 } RETRIEVAL_POINTERS_BUFFER, *PRETRIEVAL_POINTERS_BUFFER;
1121 #include <poppack.h>
1122
1123 typedef struct _SECTION_BASIC_INFORMATION
1124 {
1125 PVOID BaseAddress;
1126 ULONG Attributes;
1127 LARGE_INTEGER Size;
1128 } SECTION_BASIC_INFORMATION, *PSECTION_BASIC_INFORMATION;
1129
1130 typedef enum _SECTION_INFORMATION_CLASS
1131 {
1132 SectionBasicInformation,
1133 SectionImageInformation,
1134 } SECTION_INFORMATION_CLASS;
1135
1136 // shutdown action
1137
1138 typedef enum SHUTDOWN_ACTION_TAG {
1139 ShutdownNoReboot,
1140 ShutdownReboot,
1141 ShutdownPowerOff
1142 } SHUTDOWN_ACTION;
1143
1144 typedef enum _IO_COMPLETION_INFORMATION_CLASS {
1145 IoCompletionBasicInformation
1146 } IO_COMPLETION_INFORMATION_CLASS;
1147
1148 typedef struct _IO_COMPLETION_BASIC_INFORMATION {
1149 LONG Depth;
1150 } IO_COMPLETION_BASIC_INFORMATION, *PIO_COMPLETION_BASIC_INFORMATION;
1151
1152 #else /* __USE_W32API */
1153
1154 #define DebugDbgLoadSymbols ((DEBUG_CONTROL_CODE)0xffffffff)
1155
1156 #endif /* __USE_W32API */
1157
1158 #ifdef __USE_W32API
1159 #include <ddk/ntddk.h>
1160 #endif /* __USE_W32API */
1161 #ifndef NtCurrentProcess
1162 #define NtCurrentProcess() ( (HANDLE) 0xFFFFFFFF )
1163 #endif /* NtCurrentProcess */
1164 #ifndef NtCurrentThread
1165 #define NtCurrentThread() ( (HANDLE) 0xFFFFFFFE )
1166 #endif /* NtCurrentThread */
1167
1168 #ifdef __GNUC__
1169 #ifdef __NTOSKRNL__
1170 extern ULONG EXPORTED NtBuildNumber;
1171 #else
1172 extern ULONG IMPORTED NtBuildNumber;
1173 #endif
1174 #else
1175 /* Microsoft-style declarations */
1176 #ifdef __NTOSKRNL__
1177 extern EXPORTED ULONG NtBuildNumber;
1178 #else
1179 extern IMPORTED ULONG NtBuildNumber;
1180 #endif
1181 #endif /* __GNUC__ */
1182
1183
1184 // event access mask
1185
1186 #define EVENT_READ_ACCESS 1
1187 #define EVENT_WRITE_ACCESS 2
1188
1189 //process query / set information class
1190
1191 #define ProcessBasicInformation 0
1192 #define ProcessQuotaLimits 1
1193 #define ProcessIoCounters 2
1194 #define ProcessVmCounters 3
1195 #define ProcessTimes 4
1196 #define ProcessBasePriority 5
1197 #define ProcessRaisePriority 6
1198 #define ProcessDebugPort 7
1199 #define ProcessExceptionPort 8
1200 #define ProcessAccessToken 9
1201 #define ProcessLdtInformation 10
1202 #define ProcessLdtSize 11
1203 #define ProcessDefaultHardErrorMode 12
1204 #define ProcessIoPortHandlers 13
1205 #define ProcessPooledUsageAndLimits 14
1206 #define ProcessWorkingSetWatch 15
1207 #define ProcessUserModeIOPL 16
1208 #define ProcessEnableAlignmentFaultFixup 17
1209 #define ProcessPriorityClass 18
1210 #define ProcessWx86Information 19
1211 #define ProcessHandleCount 20
1212 #define ProcessAffinityMask 21
1213 #define ProcessPriorityBoost 22
1214 #define ProcessDeviceMap 23
1215 #define ProcessSessionInformation 24
1216 #define ProcessForegroundInformation 25
1217 #define ProcessWow64Information 26
1218 #define ProcessImageFileName 27
1219 #define ProcessLUIDDeviceMapsEnabled 28
1220 #define ProcessBreakOnTermination 29
1221 #define ProcessDebugObjectHandle 30
1222 #define ProcessDebugFlags 31
1223 #define ProcessHandleTracing 32
1224 #define ProcessUnknown33 33
1225 #define ProcessUnknown34 34
1226 #define ProcessUnknown35 35
1227 #define ProcessCookie 36
1228 #define MaxProcessInfoClass 36
1229
1230 /*
1231 * thread query / set information class
1232 */
1233 #define ThreadBasicInformation 0
1234 #define ThreadTimes 1
1235 #define ThreadPriority 2
1236 #define ThreadBasePriority 3
1237 #define ThreadAffinityMask 4
1238 #define ThreadImpersonationToken 5
1239 #define ThreadDescriptorTableEntry 6
1240 #define ThreadEnableAlignmentFaultFixup 7
1241 #define ThreadEventPair 8
1242 #define ThreadQuerySetWin32StartAddress 9
1243 #define ThreadZeroTlsCell 10
1244 #define ThreadPerformanceCount 11
1245 #define ThreadAmILastThread 12
1246 #define ThreadIdealProcessor 13
1247 #define ThreadPriorityBoost 14
1248 #define ThreadSetTlsArrayAddress 15
1249 #define ThreadIsIoPending 16
1250 #define ThreadHideFromDebugger 17
1251 #define MaxThreadInfoClass 17
1252
1253
1254 typedef struct _ATOM_TABLE_INFORMATION
1255 {
1256 ULONG NumberOfAtoms;
1257 RTL_ATOM Atoms[1];
1258 } ATOM_TABLE_INFORMATION, *PATOM_TABLE_INFORMATION;
1259
1260
1261 // mutant information
1262
1263 typedef enum _MUTANT_INFORMATION_CLASS
1264 {
1265 MutantBasicInformation = 0
1266 } MUTANT_INFORMATION_CLASS;
1267
1268 typedef struct _MUTANT_BASIC_INFORMATION
1269 {
1270 LONG CurrentCount;
1271 BOOLEAN OwnedByCaller;
1272 BOOLEAN AbandonedState;
1273 } MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
1274
1275
1276 // SystemTimeOfDayInformation (3)
1277 typedef
1278 struct _SYSTEM_TIMEOFDAY_INFORMATION
1279 {
1280 LARGE_INTEGER BootTime;
1281 LARGE_INTEGER CurrentTime;
1282 LARGE_INTEGER TimeZoneBias;
1283 ULONG TimeZoneId;
1284 ULONG Reserved;
1285 } SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION;
1286
1287 // SystemPathInformation (4)
1288 // IT DOES NOT WORK
1289 typedef
1290 struct _SYSTEM_PATH_INFORMATION
1291 {
1292 PVOID Dummy;
1293
1294 } SYSTEM_PATH_INFORMATION, * PSYSTEM_PATH_INFORMATION;
1295
1296
1297 // SystemCallCountInformation (6)
1298 typedef
1299 struct _SYSTEM_SDT_INFORMATION
1300 {
1301 ULONG BufferLength;
1302 ULONG NumberOfSystemServiceTables;
1303 ULONG NumberOfServices [1];
1304 ULONG ServiceCounters [1];
1305
1306 } SYSTEM_SDT_INFORMATION, *PSYSTEM_SDT_INFORMATION;
1307
1308 // SystemDeviceInformation (7)
1309 typedef
1310 struct _SYSTEM_DEVICE_INFORMATION
1311 {
1312 ULONG NumberOfDisks;
1313 ULONG NumberOfFloppies;
1314 ULONG NumberOfCdRoms;
1315 ULONG NumberOfTapes;
1316 ULONG NumberOfSerialPorts;
1317 ULONG NumberOfParallelPorts;
1318 } SYSTEM_DEVICE_INFORMATION, *PSYSTEM_DEVICE_INFORMATION;
1319
1320 // SystemProcessorPerformanceInformation (8)
1321 // (one per processor in the system)
1322 typedef
1323 struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
1324 {
1325 LARGE_INTEGER IdleTime;
1326 LARGE_INTEGER KernelTime;
1327 LARGE_INTEGER UserTime;
1328 LARGE_INTEGER DpcTime;
1329 LARGE_INTEGER InterruptTime;
1330 ULONG InterruptCount;
1331 ULONG Reserved;
1332
1333 } SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
1334
1335 // SystemFlagsInformation (9)
1336 typedef
1337 struct _SYSTEM_FLAGS_INFORMATION
1338 {
1339 ULONG Flags;
1340
1341 } SYSTEM_FLAGS_INFORMATION, * PSYSTEM_FLAGS_INFORMATION;
1342
1343 #define FLG_STOP_ON_EXCEPTION 0x00000001
1344 #define FLG_SHOW_LDR_SNAPS 0x00000002
1345 #define FLG_DEBUG_INITIAL_COMMAND 0x00000004
1346 #define FLG_STOP_ON_HANG_GUI 0x00000008
1347 #define FLG_HEAP_ENABLE_TAIL_CHECK 0x00000010
1348 #define FLG_HEAP_ENABLE_FREE_CHECK 0x00000020
1349 #define FLG_HEAP_VALIDATE_PARAMETERS 0x00000040
1350 #define FLG_HEAP_VALIDATE_ALL 0x00000080
1351 #define FLG_POOL_ENABLE_TAIL_CHECK 0x00000100
1352 #define FLG_POOL_ENABLE_FREE_CHECK 0x00000200
1353 #define FLG_POOL_ENABLE_TAGGING 0x00000400
1354 #define FLG_HEAP_ENABLE_TAGGING 0x00000800
1355 #define FLG_USER_STACK_TRACE_DB 0x00001000
1356 #define FLG_KERNEL_STACK_TRACE_DB 0x00002000
1357 #define FLG_MAINTAIN_OBJECT_TYPELIST 0x00004000
1358 #define FLG_HEAP_ENABLE_TAG_BY_DLL 0x00008000
1359 #define FLG_IGNORE_DEBUG_PRIV 0x00010000
1360 #define FLG_ENABLE_CSRDEBUG 0x00020000
1361 #define FLG_ENABLE_KDEBUG_SYMBOL_LOAD 0x00040000
1362 #define FLG_DISABLE_PAGE_KERNEL_STACKS 0x00080000
1363 #define FLG_HEAP_ENABLE_CALL_TRACING 0x00100000
1364 #define FLG_HEAP_DISABLE_COALESCING 0x00200000
1365 #define FLG_ENABLE_CLOSE_EXCEPTION 0x00400000
1366 #define FLG_ENABLE_EXCEPTION_LOGGING 0x00800000
1367 #define FLG_UNKNOWN_01000000 0x01000000
1368 #define FLG_UNKNOWN_02000000 0x02000000
1369 #define FLG_UNKNOWN_04000000 0x04000000
1370 #define FLG_ENABLE_DBGPRINT_BUFFERING 0x08000000
1371 #define FLG_UNKNOWN_10000000 0x10000000
1372 #define FLG_UNKNOWN_20000000 0x20000000
1373 #define FLG_UNKNOWN_40000000 0x40000000
1374 #define FLG_UNKNOWN_80000000 0x80000000
1375
1376 // SystemCallTimeInformation (10)
1377 // UNKNOWN
1378
1379 // SystemLocksInformation (12)
1380 typedef
1381 struct _SYSTEM_RESOURCE_LOCK_ENTRY
1382 {
1383 ULONG ResourceAddress;
1384 ULONG Always1;
1385 ULONG Unknown;
1386 ULONG ActiveCount;
1387 ULONG ContentionCount;
1388 ULONG Unused[2];
1389 ULONG NumberOfSharedWaiters;
1390 ULONG NumberOfExclusiveWaiters;
1391
1392 } SYSTEM_RESOURCE_LOCK_ENTRY, *PSYSTEM_RESOURCE_LOCK_ENTRY;
1393
1394 typedef
1395 struct _SYSTEM_RESOURCE_LOCK_INFO
1396 {
1397 ULONG Count;
1398 SYSTEM_RESOURCE_LOCK_ENTRY Lock [1];
1399
1400 } SYSTEM_RESOURCE_LOCK_INFO, *PSYSTEM_RESOURCE_LOCK_INFO;
1401
1402 // SystemInformation13 (13)
1403 // UNKNOWN
1404
1405 // SystemInformation14 (14)
1406 // UNKNOWN
1407
1408 // SystemInformation15 (15)
1409 // UNKNOWN
1410
1411 // SystemInstructionEmulationInfo (19)
1412 typedef
1413 struct _SYSTEM_VDM_INFORMATION
1414 {
1415 ULONG VdmSegmentNotPresentCount;
1416 ULONG VdmINSWCount;
1417 ULONG VdmESPREFIXCount;
1418 ULONG VdmCSPREFIXCount;
1419 ULONG VdmSSPREFIXCount;
1420 ULONG VdmDSPREFIXCount;
1421 ULONG VdmFSPREFIXCount;
1422 ULONG VdmGSPREFIXCount;
1423 ULONG VdmOPER32PREFIXCount;
1424 ULONG VdmADDR32PREFIXCount;
1425 ULONG VdmINSBCount;
1426 ULONG VdmINSWV86Count;
1427 ULONG VdmOUTSBCount;
1428 ULONG VdmOUTSWCount;
1429 ULONG VdmPUSHFCount;
1430 ULONG VdmPOPFCount;
1431 ULONG VdmINTNNCount;
1432 ULONG VdmINTOCount;
1433 ULONG VdmIRETCount;
1434 ULONG VdmINBIMMCount;
1435 ULONG VdmINWIMMCount;
1436 ULONG VdmOUTBIMMCount;
1437 ULONG VdmOUTWIMMCount;
1438 ULONG VdmINBCount;
1439 ULONG VdmINWCount;
1440 ULONG VdmOUTBCount;
1441 ULONG VdmOUTWCount;
1442 ULONG VdmLOCKPREFIXCount;
1443 ULONG VdmREPNEPREFIXCount;
1444 ULONG VdmREPPREFIXCount;
1445 ULONG VdmHLTCount;
1446 ULONG VdmCLICount;
1447 ULONG VdmSTICount;
1448 ULONG VdmBopCount;
1449
1450 } SYSTEM_VDM_INFORMATION, *PSYSTEM_VDM_INFORMATION;
1451
1452 // SystemInformation20 (20)
1453 // UNKNOWN
1454
1455 // SystemPoolTagInformation (22)
1456 // found by Klaus P. Gerlicher
1457 // (implemented only in checked builds)
1458 typedef
1459 struct _POOL_TAG_STATS
1460 {
1461 ULONG AllocationCount;
1462 ULONG FreeCount;
1463 ULONG SizeBytes;
1464
1465 } POOL_TAG_STATS;
1466
1467 typedef
1468 struct _SYSTEM_POOL_TAG_ENTRY
1469 {
1470 ULONG Tag;
1471 POOL_TAG_STATS Paged;
1472 POOL_TAG_STATS NonPaged;
1473
1474 } SYSTEM_POOL_TAG_ENTRY, * PSYSTEM_POOL_TAG_ENTRY;
1475
1476 typedef
1477 struct _SYSTEM_POOL_TAG_INFO
1478 {
1479 ULONG Count;
1480 SYSTEM_POOL_TAG_ENTRY PoolEntry [1];
1481
1482 } SYSTEM_POOL_TAG_INFO, *PSYSTEM_POOL_TAG_INFO;
1483
1484 // SystemProcessorScheduleInfo (23)
1485 typedef
1486 struct _SYSTEM_PROCESSOR_SCHEDULE_INFO
1487 {
1488 ULONG nContextSwitches;
1489 ULONG nDPCQueued;
1490 ULONG nDPCRate;
1491 ULONG TimerResolution;
1492 ULONG nDPCBypasses;
1493 ULONG nAPCBypasses;
1494
1495 } SYSTEM_PROCESSOR_SCHEDULE_INFO, *PSYSTEM_PROCESSOR_SCHEDULE_INFO;
1496
1497 // SystemInformation25 (25)
1498 // UNKNOWN
1499
1500 // SystemProcessorFaultCountInfo (33)
1501 typedef
1502 struct _SYSTEM_PROCESSOR_FAULT_INFO
1503 {
1504 ULONG nAlignmentFixup;
1505 ULONG nExceptionDispatches;
1506 ULONG nFloatingEmulation;
1507 ULONG Unknown;
1508
1509 } SYSTEM_PROCESSOR_FAULT_INFO, *PSYSTEM_PROCESSOR_FAULT_INFO;
1510
1511 // SystemCrashDumpStateInfo (34)
1512 //
1513
1514 // SystemDebuggerInformation (35)
1515 typedef
1516 struct _SYSTEM_DEBUGGER_INFO
1517 {
1518 BOOLEAN KdDebuggerEnabled;
1519 BOOLEAN KdDebuggerPresent;
1520
1521 } SYSTEM_DEBUGGER_INFO, *PSYSTEM_DEBUGGER_INFO;
1522
1523 // SystemInformation36 (36)
1524 // UNKNOWN
1525
1526 // SystemQuotaInformation (37)
1527 typedef
1528 struct _SYSTEM_QUOTA_INFORMATION
1529 {
1530 ULONG CmpGlobalQuota;
1531 ULONG CmpGlobalQuotaUsed;
1532 ULONG MmSizeofPagedPoolInBytes;
1533
1534 } SYSTEM_QUOTA_INFORMATION, *PSYSTEM_QUOTA_INFORMATION;
1535
1536 // (49)
1537 // UNKNOWN
1538
1539 // SystemVerifierInformation (51)
1540 // UNKNOWN
1541
1542 // SystemAddVerifier (52)
1543 // UNKNOWN
1544
1545 // wait type
1546
1547 #define WaitAll 0
1548 #define WaitAny 1
1549
1550 // number of wait objects
1551
1552 #define THREAD_WAIT_OBJECTS 3
1553 //#define MAXIMUM_WAIT_OBJECTS 64
1554
1555 // object type access rights
1556
1557 #define OBJECT_TYPE_CREATE 0x0001
1558 #define OBJECT_TYPE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
1559
1560 // directory access rights
1561
1562 #ifndef __USE_W32API
1563 #define DIRECTORY_QUERY 0x0001
1564 #define DIRECTORY_TRAVERSE 0x0002
1565 #define DIRECTORY_CREATE_OBJECT 0x0004
1566 #define DIRECTORY_CREATE_SUBDIRECTORY 0x0008
1567 #endif
1568
1569 #define DIRECTORY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0xF)
1570
1571 // symbolic link access rights
1572
1573 #define SYMBOLIC_LINK_QUERY 0x0001
1574 #define SYMBOLIC_LINK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
1575
1576
1577 /* object information class */
1578
1579 #ifndef __USE_W32API
1580
1581 typedef enum _OBJECT_INFORMATION_CLASS
1582 {
1583 ObjectBasicInformation,
1584 ObjectNameInformation,
1585 ObjectTypeInformation,
1586 ObjectAllTypesInformation,
1587 ObjectHandleInformation
1588 } OBJECT_INFORMATION_CLASS;
1589
1590
1591 // directory information
1592
1593 typedef struct _OBJECT_DIRECTORY_INFORMATION
1594 {
1595 UNICODE_STRING ObjectName;
1596 UNICODE_STRING ObjectTypeName; // Directory, Device ...
1597 } OBJECT_DIRECTORY_INFORMATION, *POBJECT_DIRECTORY_INFORMATION;
1598
1599
1600 /* system battery state */
1601 typedef struct _SYSTEM_BATTERY_STATE {
1602 BOOLEAN AcOnLine;
1603 BOOLEAN BatteryPresent;
1604 BOOLEAN Charging;
1605 BOOLEAN Discharging;
1606 BOOLEAN Spare1[4];
1607 ULONG MaxCapacity;
1608 ULONG RemainingCapacity;
1609 ULONG Rate;
1610 ULONG EstimatedTime;
1611 ULONG DefaultAlert1;
1612 ULONG DefaultAlert2;
1613 } SYSTEM_BATTERY_STATE, *PSYSTEM_BATTERY_STATE;
1614
1615
1616 // power information levels
1617 typedef enum _POWER_INFORMATION_LEVEL {
1618 SystemPowerPolicyAc,
1619 SystemPowerPolicyDc,
1620 VerifySystemPolicyAc,
1621 VerifySystemPolicyDc,
1622 SystemPowerCapabilities,
1623 SystemBatteryState,
1624 SystemPowerStateHandler,
1625 ProcessorStateHandler,
1626 SystemPowerPolicyCurrent,
1627 AdministratorPowerPolicy,
1628 SystemReserveHiberFile,
1629 ProcessorInformation,
1630 SystemPowerInformationData
1631 } POWER_INFORMATION_LEVEL;
1632
1633 #endif /* __USE_W32API */
1634
1635 /*
1636 Action is one of the following values:
1637
1638 FILE_ACTION_ADDED 0x00000001
1639 FILE_ACTION_REMOVED 0x00000002
1640 FILE_ACTION_MODIFIED 0x00000003
1641 FILE_ACTION_RENAMED_OLD_NAME 0x00000004
1642 FILE_ACTION_RENAMED_NEW_NAME 0x00000005
1643 FILE_ACTION_ADDED_STREAM 0x00000006
1644 FILE_ACTION_REMOVED_STREAM 0x00000007
1645 FILE_ACTION_MODIFIED_STREAM 0x00000008
1646
1647 */
1648
1649
1650 // File System Control commands ( related to defragging )
1651
1652 #define FSCTL_READ_MFT_RECORD 0x90068 // NTFS only
1653
1654 //typedef enum _TIMER_TYPE
1655 //{
1656 // NotificationTimer,
1657 // SynchronizationTimer
1658 //} TIMER_TYPE;
1659
1660 typedef struct _TIMER_BASIC_INFORMATION
1661 {
1662 LARGE_INTEGER TimeRemaining;
1663 BOOLEAN SignalState;
1664 } TIMER_BASIC_INFORMATION, *PTIMER_BASIC_INFORMATION;
1665
1666 typedef enum _TIMER_INFORMATION_CLASS
1667 {
1668 TimerBasicInformation
1669 } TIMER_INFORMATION_CLASS;
1670
1671 #ifndef __USE_W32API
1672
1673 typedef enum
1674 {
1675 UNUSED_MSG_TYPE = 0x0, /* ReactOS */
1676 LPC_NEW_MESSAGE = 0x0, /* NT */
1677 LPC_REQUEST = 0x1,
1678 LPC_REPLY = 0x2,
1679 LPC_DATAGRAM = 0x3,
1680 LPC_LOST_REPLY = 0x4,
1681 LPC_PORT_CLOSED = 0x5,
1682 LPC_CLIENT_DIED = 0x6,
1683 LPC_EXCEPTION = 0x7,
1684 LPC_DEBUG_EVENT = 0x8,
1685 LPC_ERROR_EVENT = 0x9,
1686 LPC_CONNECTION_REQUEST = 0xa,
1687 LPC_CONNECTION_REFUSED = 0xb /* ReactOS only */
1688
1689 } LPC_TYPE, *PLPC_TYPE;
1690
1691 typedef struct _LPC_SECTION_WRITE
1692 {
1693 ULONG Length;
1694 HANDLE SectionHandle;
1695 ULONG SectionOffset;
1696 ULONG ViewSize;
1697 PVOID ViewBase;
1698 PVOID TargetViewBase;
1699 } LPC_SECTION_WRITE, *PLPC_SECTION_WRITE;
1700
1701 typedef struct _LPC_SECTION_READ
1702 {
1703 ULONG Length;
1704 ULONG ViewSize;
1705 PVOID ViewBase;
1706 } LPC_SECTION_READ, *PLPC_SECTION_READ;
1707
1708 typedef struct _LPC_MESSAGE
1709 {
1710 USHORT DataSize;
1711 USHORT MessageSize;
1712 USHORT MessageType;
1713 USHORT VirtualRangesOffset;
1714 CLIENT_ID ClientId;
1715 ULONG MessageId;
1716 ULONG SectionSize; /* CallbackID */
1717 } LPC_MESSAGE, *PLPC_MESSAGE;
1718
1719 #define LPC_MESSAGE_BASE_SIZE sizeof(LPC_MESSAGE)
1720
1721 #define PORT_MESSAGE_TYPE(m) (LPC_TYPE)((m).Header.MessageType)
1722
1723 #define PORT_MAX_DATA_LENGTH 0x104
1724 #define PORT_MAX_MESSAGE_LENGTH 0x148
1725
1726 #endif /* __USE_W32API */
1727
1728 #define MAX_MESSAGE_DATA (0x130)
1729
1730 typedef struct _LPC_MAX_MESSAGE
1731 {
1732 LPC_MESSAGE Header;
1733 BYTE Data[MAX_MESSAGE_DATA];
1734 } LPC_MAX_MESSAGE, *PLPC_MAX_MESSAGE;
1735
1736 typedef struct _LPC_PORT_BASIC_INFORMATION
1737 {
1738 DWORD Unknown0;
1739 DWORD Unknown1;
1740 DWORD Unknown2;
1741 DWORD Unknown3;
1742 DWORD Unknown4;
1743 DWORD Unknown5;
1744 DWORD Unknown6;
1745 DWORD Unknown7;
1746 DWORD Unknown8;
1747 DWORD Unknown9;
1748 DWORD Unknown10;
1749 DWORD Unknown11;
1750 DWORD Unknown12;
1751 DWORD Unknown13;
1752
1753 } LPC_PORT_BASIC_INFORMATION, * PLPC_PORT_BASIC_INFORMATION;
1754
1755
1756 typedef struct _KINTERRUPT
1757 {
1758 ULONG Vector;
1759 KAFFINITY ProcessorEnableMask;
1760 KSPIN_LOCK SpinLock;
1761 PKSPIN_LOCK ActualLock;
1762 BOOLEAN Shareable;
1763 BOOLEAN FloatingSave;
1764 CHAR ProcessorNumber;
1765 PKSERVICE_ROUTINE ServiceRoutine;
1766 PVOID ServiceContext;
1767 LIST_ENTRY Entry;
1768 KIRQL Irql;
1769 KIRQL SynchLevel;
1770 KINTERRUPT_MODE InterruptMode;
1771 } KINTERRUPT;
1772
1773 #ifndef __USE_W32API
1774
1775 typedef struct _KINTERRUPT *PKINTERRUPT;
1776
1777 typedef VOID STDCALL_FUNC
1778 (*PTIMER_APC_ROUTINE)(
1779 IN PVOID TimerContext,
1780 IN ULONG TimerLowValue,
1781 IN LONG TimerHighValue);
1782
1783 #endif /* __USE_W32API */
1784
1785 /* BEGIN REACTOS ONLY */
1786
1787 typedef enum _TRAVERSE_METHOD {
1788 TraverseMethodPreorder,
1789 TraverseMethodInorder,
1790 TraverseMethodPostorder
1791 } TRAVERSE_METHOD;
1792
1793 typedef LONG STDCALL_FUNC
1794 (*PKEY_COMPARATOR)(IN PVOID Key1,
1795 IN PVOID Key2);
1796
1797 typedef BOOLEAN STDCALL_FUNC
1798 (*PTRAVERSE_ROUTINE)(IN PVOID Context,
1799 IN PVOID Key,
1800 IN PVOID Value);
1801
1802 struct _BINARY_TREE_NODE;
1803
1804 typedef struct _BINARY_TREE
1805 {
1806 struct _BINARY_TREE_NODE * RootNode;
1807 PKEY_COMPARATOR Compare;
1808 BOOLEAN UseNonPagedPool;
1809 union {
1810 NPAGED_LOOKASIDE_LIST NonPaged;
1811 PAGED_LOOKASIDE_LIST Paged;
1812 } List;
1813 union {
1814 KSPIN_LOCK NonPaged;
1815 FAST_MUTEX Paged;
1816 } Lock;
1817 } BINARY_TREE, *PBINARY_TREE;
1818
1819
1820 struct _SPLAY_TREE_NODE;
1821
1822 typedef struct _SPLAY_TREE
1823 {
1824 struct _SPLAY_TREE_NODE * RootNode;
1825 PKEY_COMPARATOR Compare;
1826 BOOLEAN Weighted;
1827 BOOLEAN UseNonPagedPool;
1828 union {
1829 NPAGED_LOOKASIDE_LIST NonPaged;
1830 PAGED_LOOKASIDE_LIST Paged;
1831 } List;
1832 union {
1833 KSPIN_LOCK NonPaged;
1834 FAST_MUTEX Paged;
1835 } Lock;
1836 PVOID Reserved[4];
1837 } SPLAY_TREE, *PSPLAY_TREE;
1838
1839
1840 typedef struct _HASH_TABLE
1841 {
1842 // Size of hash table in number of bits
1843 ULONG HashTableSize;
1844
1845 // Use non-paged pool memory?
1846 BOOLEAN UseNonPagedPool;
1847
1848 // Lock for this structure
1849 union {
1850 KSPIN_LOCK NonPaged;
1851 FAST_MUTEX Paged;
1852 } Lock;
1853
1854 // Pointer to array of hash buckets with splay trees
1855 PSPLAY_TREE HashTrees;
1856 } HASH_TABLE, *PHASH_TABLE;
1857
1858
1859 /* END REACTOS ONLY */
1860
1861 #endif