SYSTEM_TIME_ZONE_INFORMATION added.
[reactos.git] / reactos / include / ddk / zwtypes.h
1 #ifndef __INCLUDE_DDK_ZWTYPES_H
2 #define __INCLUDE_DDK_ZWTYPES_H
3
4 #define NtCurrentProcess() ( (HANDLE) 0xFFFFFFFF )
5 #define NtCurrentThread() ( (HANDLE) 0xFFFFFFFE )
6
7 #ifdef __NTOSKRNL__
8 extern ULONG EXPORTED NtBuildNumber;
9 #else
10 extern ULONG IMPORTED NtBuildNumber;
11 #endif
12
13
14 // event access mask
15
16 #define EVENT_READ_ACCESS 1
17 #define EVENT_WRITE_ACCESS 2
18
19
20 // file disposition values
21
22
23 #define FILE_SUPERSEDE 0x0000
24 #define FILE_OPEN 0x0001
25 #define FILE_CREATE 0x0002
26 #define FILE_OPEN_IF 0x0003
27 #define FILE_OVERWRITE 0x0004
28 #define FILE_OVERWRITE_IF 0x0005
29 #define FILE_MAXIMUM_DISPOSITION 0x0005
30
31 //process query / set information class
32
33 #define ProcessBasicInformation 0
34 #define ProcessQuotaLimits 1
35 #define ProcessIoCounters 2
36 #define ProcessVmCounters 3
37 #define ProcessTimes 4
38 #define ProcessBasePriority 5
39 #define ProcessRaisePriority 6
40 #define ProcessDebugPort 7
41 #define ProcessExceptionPort 8
42 #define ProcessAccessToken 9
43 #define ProcessLdtInformation 10
44 #define ProcessLdtSize 11
45 #define ProcessDefaultHardErrorMode 12
46 #define ProcessIoPortHandlers 13
47 #define ProcessPooledUsageAndLimits 14
48 #define ProcessWorkingSetWatch 15
49 #define ProcessUserModeIOPL 16
50 #define ProcessEnableAlignmentFaultFixup 17
51 #define ProcessPriorityClass 18
52 #define ProcessWx86Information 19
53 #define ProcessHandleCount 20
54 #define ProcessAffinityMask 21
55 #define ProcessImageFileName 22
56 #define MaxProcessInfoClass 23
57
58 // thread query / set information class
59 #define ThreadBasicInformation 0
60 #define ThreadTimes 1
61 #define ThreadPriority 2
62 #define ThreadBasePriority 3
63 #define ThreadAffinityMask 4
64 #define ThreadImpersonationToken 5
65 #define ThreadDescriptorTableEntry 6
66 #define ThreadEnableAlignmentFaultFixup 7
67 #define ThreadEventPair 8
68 #define ThreadQuerySetWin32StartAddress 9
69 #define ThreadZeroTlsCell 10
70 #define ThreadPerformanceCount 11
71 #define ThreadAmILastThread 12
72 #define ThreadIdealProcessor 13
73 #define ThreadPriorityBoost 14
74 #define MaxThreadInfoClass 15
75
76 // object handle information
77
78 #define ObjectBasicInformation 0
79 #define ObjectNameInformation 1
80 #define ObjectTypeInformation 2
81 #define ObjectAllInformation 3
82 #define ObjectDataInformation 4
83
84
85 // semaphore information
86
87 typedef enum _SEMAPHORE_INFORMATION_CLASS
88 {
89 SemaphoreBasicInformation = 0
90 } SEMAPHORE_INFORMATION_CLASS;
91
92 typedef struct _SEMAPHORE_BASIC_INFORMATION
93 {
94 LONG CurrentCount;
95 LONG MaximumCount;
96 } SEMAPHORE_BASIC_INFORMATION, *PSEMAPHORE_BASIC_INFORMATION;
97
98
99 // event information
100
101 typedef enum _EVENT_INFORMATION_CLASS
102 {
103 EventBasicInformation = 0
104 } EVENT_INFORMATION_CLASS;
105
106 typedef struct _EVENT_BASIC_INFORMATION
107 {
108 EVENT_TYPE EventType;
109 LONG EventState;
110 } EVENT_BASIC_INFORMATION, *PEVENT_BASIC_INFORMATION;
111
112
113 // system information
114 // {Nt|Zw}{Query|Set}SystemInformation
115
116 typedef
117 enum _SYSTEM_INFORMATION_CLASS
118 {
119 SystemInformationClassMin = 0,
120 SystemBasicInformation = 0, /* Q */
121 SystemProcessorInformation = 1, /* Q */
122 SystemPerformanceInformation = 2, /* Q */
123 SystemTimeOfDayInformation = 3, /* Q */
124 SystemPathInformation = 4, /* Q (checked build only) */
125 SystemProcessInformation = 5, /* Q */
126 SystemCallCountInfoInformation = 6, /* Q */
127 SystemDeviceInformation = 7, /* Q */
128 SystemProcessorPerformanceInformation = 8, /* Q */
129 SystemFlagsInformation = 9, /* QS */
130 SystemCallTimeInformation = 10,
131 SystemModuleInformation = 11, /* Q */
132 SystemLocksInformation = 12, /* Q */
133 SystemStackTraceInformation = 13,
134 SystemPagedPoolInformation = 14,
135 SystemNonPagedPoolInformation = 15,
136 SystemHandleInformation = 16, /* Q */
137 SystemObjectInformation = 17, /* Q */
138 SystemPageFileInformation = 18, /* Q */
139 SystemVdmInstemulInformation = 19, /* Q */
140 SystemVdmBopInformation = 20,
141 SystemFileCacheInformation = 21, /* QS */
142 SystemPoolTagInformation = 22, /* Q (checked build only) */
143 SystemInterruptInformation = 23, /* Q */
144 SystemDpcBehaviourInformation = 24, /* QS */
145 SystemFullMemoryInformation = 25,
146 SystemLoadGdiDriverInformation = 26, /* S (callable) */
147 SystemUnloadGdiDriverInformation = 27, /* S (callable) */
148 SystemTimeAdjustmentInformation = 28, /* QS */
149 SystemSummryMemoryInformation = 29,
150 SystemNextEventIdInformation = 30,
151 SystemEventIdsInformation = 31,
152 SystemCrashDumpInformation = 32, /* Q */
153 SystemExceptionInformation = 33, /* Q */
154 SystemCrashDumpStateInformation = 34, /* Q */
155 SystemKernelDebuggerInformation = 35, /* Q */
156 SystemContextSwitchInformation = 36, /* Q */
157 SystemRegistryQuotaInformation = 37, /* QS */
158 SystemExtendServiceTableInformation = 38, /* S */
159 SystemPrioritySeperation = 39, /* S */
160 SystemPlugPlayBusInformation = 40,
161 SystemDockInformation = 41,
162 SystemPowerInformation = 42,
163 SystemProcessorSpeedInformation = 43,
164 SystemCurrentTimeZoneInformation = 44, /* QS */
165 SystemLookasideInformation = 45, /* Q */
166 SystemInformationClassMax
167
168 } SYSTEM_INFORMATION_CLASS;
169
170 // SystemBasicInformation (0)
171 typedef
172 struct _SYSTEM_BASIC_INFORMATION
173 {
174 ULONG Reserved;
175 ULONG TimerResolution;
176 ULONG PageSize;
177 ULONG NumberOfPhysicalPages;
178 ULONG LowestPhysicalPageNumber;
179 ULONG HighestPhysicalPageNumber;
180 ULONG AllocationGranularity;
181 ULONG MinimumUserModeAddress;
182 ULONG MaximumUserModeAddress;
183 KAFFINITY ActiveProcessorsAffinityMask;
184 CCHAR NumberOfProcessors;
185 } SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
186
187 // SystemProcessorInformation (1)
188 typedef
189 struct _SYSTEM_PROCESSOR_INFORMATION
190 {
191 USHORT ProcessorArchitecture;
192 USHORT ProcessorLevel;
193 USHORT ProcessorRevision;
194 USHORT Reserved;
195 ULONG ProcessorFeatureBits;
196 } SYSTEM_PROCESSOR_INFORMATION, *PSYSTEM_PROCESSOR_INFORMATION;
197
198 // SystemPerformanceInfo (2)
199 typedef
200 struct _SYSTEM_PERFORMANCE_INFORMATION
201 {
202 LARGE_INTEGER IdleProcessorTime;
203 LARGE_INTEGER IoReadTransferCount;
204 LARGE_INTEGER IoWriteTransferCount;
205 LARGE_INTEGER IoOtherTransferCount;
206 ULONG IoReadOperationCount;
207 ULONG IoWriteOperationCount;
208 ULONG IoOtherOperationCount;
209 ULONG AvailablePages;
210 ULONG CommitedPages;
211 ULONG CommitLimit;
212 ULONG PeakCommitment;
213 ULONG PageFaultCount;
214 ULONG CopyOnWriteCount;
215 ULONG TransitionCount;
216 ULONG CacheTransitionCount;
217 ULONG DemandZeroCount;
218 ULONG PageReadCount;
219 ULONG PageReadIoCount;
220 ULONG CacheReadCount;
221 ULONG CacheIoCount;
222 ULONG DirtyPagesWriteCount;
223 ULONG DirtyWriteIoCount;
224 ULONG MappedPagesWriteCount;
225 ULONG MappedWriteIoCount;
226 ULONG PagedPoolPages;
227 ULONG NonPagedPoolPages;
228 ULONG Unknown6;
229 ULONG Unknown7;
230 ULONG Unknown8;
231 ULONG Unknown9;
232 ULONG MmTotalSystemFreePtes;
233 ULONG MmSystemCodepage;
234 ULONG MmTotalSystemDriverPages;
235 ULONG MmTotalSystemCodePages;
236 ULONG Unknown10;
237 ULONG Unknown11;
238 ULONG Unknown12;
239 ULONG MmSystemCachePage;
240 ULONG MmPagedPoolPage;
241 ULONG MmSystemDriverPage;
242 ULONG CcFastReadNoWait;
243 ULONG CcFastReadWait;
244 ULONG CcFastReadResourceMiss;
245 ULONG CcFastReadNotPossible;
246 ULONG CcFastMdlReadNoWait;
247 ULONG CcFastMdlReadWait;
248 ULONG CcFastMdlReadResourceMiss;
249 ULONG CcFastMdlReadNotPossible;
250 ULONG CcMapDataNoWait;
251 ULONG CcMapDataWait;
252 ULONG CcMapDataNoWaitMiss;
253 ULONG CcMapDataWaitMiss;
254 ULONG CcPinMappedDataCount;
255 ULONG CcPinReadNoWait;
256 ULONG CcPinReadWait;
257 ULONG CcPinReadNoWaitMiss;
258 ULONG CcPinReadWaitMiss;
259 ULONG CcCopyReadNoWait;
260 ULONG CcCopyReadWait;
261 ULONG CcCopyReadNoWaitMiss;
262 ULONG CcCopyReadWaitMiss;
263 ULONG CcMdlReadNoWait;
264 ULONG CcMdlReadWait;
265 ULONG CcMdlReadNoWaitMiss;
266 ULONG CcMdlReadWaitMiss;
267 ULONG CcReadaheadIos;
268 ULONG CcLazyWriteIos;
269 ULONG CcLazyWritePages;
270 ULONG CcDataFlushes;
271 ULONG CcDataPages;
272 ULONG ContextSwitches;
273 ULONG Unknown13;
274 ULONG Unknown14;
275 ULONG SystemCalls;
276
277 } SYSTEM_PERFORMANCE_INFO, *PSYSTEM_PERFORMANCE_INFO;
278
279 // SystemTimeOfDayInformation (3)
280 typedef
281 struct _SYSTEM_TIMEOFDAY_INFORMATION
282 {
283 LARGE_INTEGER BootTime;
284 LARGE_INTEGER CurrentTime;
285 LARGE_INTEGER TimeZoneBias;
286 ULONG TimeZoneId;
287 ULONG Reserved;
288 } SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION;
289
290 // SystemPathInformation (4)
291 // IT DOES NOT WORK
292 typedef
293 struct _SYSTEM_PATH_INFORMATION
294 {
295 PVOID Dummy;
296
297 } SYSTEM_PATH_INFORMATION, * PSYSTEM_PATH_INFORMATION;
298
299 // SystemProcessInformation (5)
300 typedef
301 struct _SYSTEM_THREAD_INFORMATION
302 {
303 TIME KernelTime;
304 TIME UserTime;
305 TIME CreateTime;
306 ULONG TickCount;
307 ULONG StartEIP;
308 CLIENT_ID ClientId;
309 ULONG DynamicPriority;
310 ULONG BasePriority;
311 ULONG nSwitches;
312 DWORD State;
313 KWAIT_REASON WaitReason;
314
315 } SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION;
316
317 typedef
318 struct SYSTEM_PROCESS_INFORMATION
319 {
320 ULONG RelativeOffset;
321 ULONG ThreadCount;
322 ULONG Unused1 [6];
323 TIME CreateTime;
324 TIME UserTime;
325 TIME KernelTime;
326 UNICODE_STRING Name;
327 ULONG BasePriority;
328 ULONG ProcessId;
329 ULONG ParentProcessId;
330 ULONG HandleCount;
331 ULONG Unused2[2];
332 ULONG PeakVirtualSizeBytes;
333 ULONG TotalVirtualSizeBytes;
334 ULONG PageFaultCount;
335 ULONG PeakWorkingSetSizeBytes;
336 ULONG TotalWorkingSetSizeBytes;
337 ULONG PeakPagedPoolUsagePages;
338 ULONG TotalPagedPoolUsagePages;
339 ULONG PeakNonPagedPoolUsagePages;
340 ULONG TotalNonPagedPoolUsagePages;
341 ULONG TotalPageFileUsageBytes;
342 ULONG PeakPageFileUsageBytes;
343 ULONG TotalPrivateBytes;
344 SYSTEM_THREAD_INFORMATION ThreadSysInfo [1];
345
346 } SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
347
348 // SystemCallCountInformation (6)
349 typedef
350 struct _SYSTEM_SDT_INFORMATION
351 {
352 ULONG BufferLength;
353 ULONG NumberOfSystemServiceTables;
354 ULONG NumberOfServices [1];
355 ULONG ServiceCounters [1];
356
357 } SYSTEM_SDT_INFORMATION, *PSYSTEM_SDT_INFORMATION;
358
359 // SystemDeviceInformation (7)
360 typedef
361 struct _SYSTEM_DEVICE_INFORMATION
362 {
363 ULONG NumberOfDisks;
364 ULONG NumberOfFloppies;
365 ULONG NumberOfCdRoms;
366 ULONG NumberOfTapes;
367 ULONG NumberOfSerialPorts;
368 ULONG NumberOfParallelPorts;
369 } SYSTEM_DEVICE_INFORMATION, *PSYSTEM_DEVICE_INFORMATION;
370
371 // SystemProcessorPerformanceInformation (8)
372 typedef
373 struct _SYSTEM_PROCESSORTIME_INFO
374 {
375 TIME TotalProcessorRunTime;
376 TIME TotalProcessorTime;
377 TIME TotalProcessorUserTime;
378 TIME TotalDPCTime;
379 TIME TotalInterruptTime;
380 ULONG TotalInterrupts;
381 ULONG Unused;
382
383 } SYSTEM_PROCESSORTIME_INFO, *PSYSTEM_PROCESSORTIME_INFO;
384
385 // SystemFlagsInformation (9)
386 typedef
387 struct _SYSTEM_FLAGS_INFORMATION
388 {
389 ULONG Flags;
390
391 } SYSTEM_FLAGS_INFORMATION, * PSYSTEM_FLAGS_INFORMATION;
392
393 #define FLG_STOP_ON_EXCEPTION 0x00000001
394 #define FLG_SHOW_LDR_SNAPS 0x00000002
395 #define FLG_DEBUG_INITIAL_COMMAND 0x00000004
396 #define FLG_STOP_ON_HANG_GUI 0x00000008
397 #define FLG_HEAP_ENABLE_TAIL_CHECK 0x00000010
398 #define FLG_HEAP_ENABLE_FREE_CHECK 0x00000020
399 #define FLG_HEAP_VALIDATE_PARAMETERS 0x00000040
400 #define FLG_HEAP_VALIDATE_ALL 0x00000080
401 #define FLG_POOL_ENABLE_TAIL_CHECK 0x00000100
402 #define FLG_POOL_ENABLE_FREE_CHECK 0x00000200
403 #define FLG_POOL_ENABLE_TAGGING 0x00000400
404 #define FLG_HEAP_ENABLE_TAGGING 0x00000800
405 #define FLG_USER_STACK_TRACE_DB 0x00001000
406 #define FLG_KERNEL_STACK_TRACE_DB 0x00002000
407 #define FLG_MAINTAIN_OBJECT_TYPELIST 0x00004000
408 #define FLG_HEAP_ENABLE_TAG_BY_DLL 0x00008000
409 #define FLG_IGNORE_DEBUG_PRIV 0x00010000
410 #define FLG_ENABLE_CSRDEBUG 0x00020000
411 #define FLG_ENABLE_KDEBUG_SYMBOL_LOAD 0x00040000
412 #define FLG_DISABLE_PAGE_KERNEL_STACKS 0x00080000
413 #define FLG_HEAP_ENABLE_CALL_TRACING 0x00100000
414 #define FLG_HEAP_DISABLE_COALESCING 0x00200000
415 #define FLG_ENABLE_CLOSE_EXCEPTION 0x00400000
416 #define FLG_ENABLE_EXCEPTION_LOGGING 0x00800000
417 #define FLG_UNKNOWN_01000000 0x01000000
418 #define FLG_UNKNOWN_02000000 0x02000000
419 #define FLG_UNKNOWN_04000000 0x04000000
420 #define FLG_ENABLE_DBGPRINT_BUFFERING 0x08000000
421 #define FLG_UNKNOWN_10000000 0x10000000
422 #define FLG_UNKNOWN_20000000 0x20000000
423 #define FLG_UNKNOWN_40000000 0x40000000
424 #define FLG_UNKNOWN_80000000 0x80000000
425
426 // SystemCallTimeInformation (10)
427 // UNKNOWN
428
429 // SystemModuleInformation (11)
430 typedef
431 struct _SYSTEM_MODULE_ENTRY
432 {
433 ULONG Unused;
434 ULONG Always0;
435 ULONG ModuleBaseAddress;
436 ULONG ModuleSize;
437 ULONG Unknown;
438 ULONG ModuleEntryIndex;
439 USHORT ModuleNameLength; /* Length of module name not including the path, this field contains valid value only for NTOSKRNL module*/
440 USHORT ModulePathLength; /* Length of 'directory path' part of modulename*/
441 CHAR ModuleName [256];
442
443 } SYSTEM_MODULE_ENTRY, * PSYSTEM_MODULE_ENTRY;
444
445 typedef
446 struct _SYSTEM_MODULE_INFORMATION
447 {
448 ULONG Count;
449 SYSTEM_MODULE_ENTRY Module [1];
450
451 } SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
452
453 // SystemLocksInformation (12)
454 typedef
455 struct _SYSTEM_RESOURCE_LOCK_ENTRY
456 {
457 ULONG ResourceAddress;
458 ULONG Always1;
459 ULONG Unknown;
460 ULONG ActiveCount;
461 ULONG ContentionCount;
462 ULONG Unused[2];
463 ULONG NumberOfSharedWaiters;
464 ULONG NumberOfExclusiveWaiters;
465
466 } SYSTEM_RESOURCE_LOCK_ENTRY, *PSYSTEM_RESOURCE_LOCK_ENTRY;
467
468 typedef
469 struct _SYSTEM_RESOURCE_LOCK_INFO
470 {
471 ULONG Count;
472 SYSTEM_RESOURCE_LOCK_ENTRY Lock [1];
473
474 } SYSTEM_RESOURCE_LOCK_INFO, *PSYSTEM_RESOURCE_LOCK_INFO;
475
476 // SystemInformation13 (13)
477 // UNKNOWN
478
479 // SystemInformation14 (14)
480 // UNKNOWN
481
482 // SystemInformation15 (15)
483 // UNKNOWN
484
485 // SystemHandleInformation (16)
486 // (see ontypes.h)
487 typedef
488 struct _SYSTEM_HANDLE_ENTRY
489 {
490 ULONG OwnerPid;
491 BYTE ObjectType;
492 BYTE HandleFlags;
493 USHORT HandleValue;
494 PVOID ObjectPointer;
495 ULONG AccessMask;
496
497 } SYSTEM_HANDLE_ENTRY, *PSYSTEM_HANDLE_ENTRY;
498
499 typedef
500 struct _SYSTEM_HANDLE_INFORMATION
501 {
502 ULONG Count;
503 SYSTEM_HANDLE_ENTRY Handle [1];
504
505 } SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
506
507 // SystemObjectInformation (17)
508 // UNKNOWN
509 typedef
510 struct _SYSTEM_OBJECT_INFORMATION
511 {
512 DWORD Unknown;
513 /* FIXME */
514 } SYSTEM_OBJECT_INFORMATION, *PSYSTEM_OBJECT_INFORMATION;
515
516 // SystemPageFileInformation (18)
517 typedef
518 struct _SYSTEM_PAGEFILE_INFORMATION
519 {
520 ULONG RelativeOffset;
521 ULONG CurrentSizePages;
522 ULONG TotalUsedPages;
523 ULONG PeakUsedPages;
524 UNICODE_STRING PagefileFileName;
525
526 } SYSTEM_PAGEFILE_INFORMATION, *PSYSTEM_PAGEFILE_INFORMATION;
527
528 // SystemInstructionEmulationInfo (19)
529 typedef
530 struct _SYSTEM_VDM_INFORMATION
531 {
532 ULONG VdmSegmentNotPresentCount;
533 ULONG VdmINSWCount;
534 ULONG VdmESPREFIXCount;
535 ULONG VdmCSPREFIXCount;
536 ULONG VdmSSPREFIXCount;
537 ULONG VdmDSPREFIXCount;
538 ULONG VdmFSPREFIXCount;
539 ULONG VdmGSPREFIXCount;
540 ULONG VdmOPER32PREFIXCount;
541 ULONG VdmADDR32PREFIXCount;
542 ULONG VdmINSBCount;
543 ULONG VdmINSWV86Count;
544 ULONG VdmOUTSBCount;
545 ULONG VdmOUTSWCount;
546 ULONG VdmPUSHFCount;
547 ULONG VdmPOPFCount;
548 ULONG VdmINTNNCount;
549 ULONG VdmINTOCount;
550 ULONG VdmIRETCount;
551 ULONG VdmINBIMMCount;
552 ULONG VdmINWIMMCount;
553 ULONG VdmOUTBIMMCount;
554 ULONG VdmOUTWIMMCount;
555 ULONG VdmINBCount;
556 ULONG VdmINWCount;
557 ULONG VdmOUTBCount;
558 ULONG VdmOUTWCount;
559 ULONG VdmLOCKPREFIXCount;
560 ULONG VdmREPNEPREFIXCount;
561 ULONG VdmREPPREFIXCount;
562 ULONG VdmHLTCount;
563 ULONG VdmCLICount;
564 ULONG VdmSTICount;
565 ULONG VdmBopCount;
566
567 } SYSTEM_VDM_INFORMATION, *PSYSTEM_VDM_INFORMATION;
568
569 // SystemInformation20 (20)
570 // UNKNOWN
571
572 // SystemCacheInformation (21)
573 typedef
574 struct _SYSTEM_CACHE_INFORMATION
575 {
576 ULONG CurrentSize;
577 ULONG PeakSize;
578 ULONG PageFaultCount;
579 ULONG MinimumWorkingSet;
580 ULONG MaximumWorkingSet;
581 ULONG Unused[4];
582
583 } SYSTEM_CACHE_INFORMATION;
584
585 // SystemPoolTagInformation (22)
586 // found by Klaus P. Gerlicher
587 // (implemented only in checked builds)
588 typedef
589 struct _POOL_TAG_STATS
590 {
591 ULONG AllocationCount;
592 ULONG FreeCount;
593 ULONG SizeBytes;
594
595 } POOL_TAG_STATS;
596
597 typedef
598 struct _SYSTEM_POOL_TAG_ENTRY
599 {
600 ULONG Tag;
601 POOL_TAG_STATS Paged;
602 POOL_TAG_STATS NonPaged;
603
604 } SYSTEM_POOL_TAG_ENTRY, * PSYSTEM_POOL_TAG_ENTRY;
605
606 typedef
607 struct _SYSTEM_POOL_TAG_INFO
608 {
609 ULONG Count;
610 SYSTEM_POOL_TAG_ENTRY PoolEntry [1];
611
612 } SYSTEM_POOL_TAG_INFO, *PSYSTEM_POOL_TAG_INFO;
613
614 // SystemProcessorScheduleInfo (23)
615 typedef
616 struct _SYSTEM_PROCESSOR_SCHEDULE_INFO
617 {
618 ULONG nContextSwitches;
619 ULONG nDPCQueued;
620 ULONG nDPCRate;
621 ULONG TimerResolution;
622 ULONG nDPCBypasses;
623 ULONG nAPCBypasses;
624
625 } SYSTEM_PROCESSOR_SCHEDULE_INFO, *PSYSTEM_PROCESSOR_SCHEDULE_INFO;
626
627 // SystemDpcInformation (24)
628 typedef
629 struct _SYSTEM_DPC_INFORMATION
630 {
631 ULONG Unused;
632 ULONG KiMaximumDpcQueueDepth;
633 ULONG KiMinimumDpcRate;
634 ULONG KiAdjustDpcThreshold;
635 ULONG KiIdealDpcRate;
636
637 } SYSTEM_DPC_INFORMATION, *PSYSTEM_DPC_INFORMATION;
638
639 // SystemInformation25 (25)
640 // UNKNOWN
641
642 // SystemLoadGdiDriverInformation (26)
643 // SystemUnloadGdiDriverInformation (27)
644 typedef struct _SYSTEM_GDI_DRIVER_INFORMATION
645 {
646 UNICODE_STRING DriverName;
647 PVOID ImageAddress;
648 PVOID SectionPointer;
649 PVOID EntryPoint;
650 // PIMAGE_EXPORT_DIRECTORY ExportSectionPointer;
651 PVOID ExportSectionPointer;
652 } SYSTEM_GDI_DRIVER_INFORMATION, *PSYSTEM_GDI_DRIVER_INFORMATION;
653
654 // SystemTimeAdjustmentInformation (28)
655 // (what is the right one?)
656 #if 0
657 typedef
658 struct _SYSTEM_TIME_ADJUSTMENT_INFO
659 {
660 TIME TimeAdjustment;
661 BOOL TimeAdjustmentDisabled;
662
663 } SYSTEM_TIME_ADJUSTMENT_INFO, *PSYSTEM_TIME_ADJUSTMENT_INFO;
664 #else
665 typedef
666 struct _SYSTEM_TIME_ADJUSTMENT_INFO
667 {
668 ULONG KeTimeAdjustment;
669 ULONG KeMaximumIncrement;
670 BOOLEAN KeTimeSynchronization;
671
672 } SYSTEM_TIME_ADJUSTMENT_INFO, *PSYSTEM_TIME_ADJUSTMENT_INFO;
673 #endif
674
675 // SystemProcessorFaultCountInfo (33)
676 typedef
677 struct _SYSTEM_PROCESSOR_FAULT_INFO
678 {
679 ULONG nAlignmentFixup;
680 ULONG nExceptionDispatches;
681 ULONG nFloatingEmulation;
682 ULONG Unknown;
683
684 } SYSTEM_PROCESSOR_FAULT_INFO, *PSYSTEM_PROCESSOR_FAULT_INFO;
685
686 // SystemCrashDumpStateInfo (34)
687 //
688
689 // SystemDebuggerInformation (35)
690 typedef
691 struct _SYSTEM_DEBUGGER_INFO
692 {
693 BOOLEAN KdDebuggerEnabled;
694 BOOLEAN KdDebuggerPresent;
695
696 } SYSTEM_DEBUGGER_INFO, *PSYSTEM_DEBUGGER_INFO;
697
698 // SystemInformation36 (36)
699 // UNKNOWN
700
701 // SystemQuotaInformation (37)
702 typedef
703 struct _SYSTEM_QUOTA_INFORMATION
704 {
705 ULONG CmpGlobalQuota;
706 ULONG CmpGlobalQuotaUsed;
707 ULONG MmSizeofPagedPoolInBytes;
708
709 } SYSTEM_QUOTA_INFORMATION, *PSYSTEM_QUOTA_INFORMATION;
710
711 // SystemLoadDriver (38)
712 typedef
713 struct _SYSTEM_DRIVER_LOAD
714 {
715 UNICODE_STRING DriverRegistryEntry;
716
717 } SYSTEM_DRIVER_LOAD, *PSYSTEM_DRIVER_LOAD;
718
719 // SystemTimeZoneInformation (44)
720 typedef
721 struct _SYSTEM_TIME_ZONE_INFORMATION
722 {
723 LONG Bias;
724 WCHAR StandardName [32];
725 SYSTEMTIME StandardDate;
726 LONG StandardBias;
727 WCHAR DaylightName [32];
728 SYSTEMTIME DaylightDate;
729 LONG DaylightBias;
730
731 } SYSTEM_TIME_ZONE_INFORMATION, * PSYSTEM_TIME_ZONE_INFORMATION;
732
733 // memory information
734
735 #define MemoryBasicInformation 0
736
737 // shutdown action
738
739 typedef enum SHUTDOWN_ACTION_TAG {
740 ShutdownNoReboot,
741 ShutdownReboot,
742 ShutdownPowerOff
743 } SHUTDOWN_ACTION;
744
745 // wait type
746
747 #define WaitAll 0
748 #define WaitAny 1
749
750 // number of wait objects
751
752 #define THREAD_WAIT_OBJECTS 3
753 //#define MAXIMUM_WAIT_OBJECTS 64
754
755 // key restore flags
756
757 #define REG_WHOLE_HIVE_VOLATILE 1
758 #define REG_REFRESH_HIVE 2
759
760 // object type access rights
761
762 #define OBJECT_TYPE_CREATE 0x0001
763 #define OBJECT_TYPE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
764
765 // directory access rights
766
767 #define DIRECTORY_QUERY 0x0001
768 #define DIRECTORY_TRAVERSE 0x0002
769 #define DIRECTORY_CREATE_OBJECT 0x0004
770 #define DIRECTORY_CREATE_SUBDIRECTORY 0x0008
771
772 #define DIRECTORY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0xF)
773
774 // symbolic link access rights
775
776 #define SYMBOLIC_LINK_QUERY 0x0001
777 #define SYMBOLIC_LINK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
778
779 typedef struct _PROCESS_WS_WATCH_INFORMATION
780 {
781 PVOID FaultingPc;
782 PVOID FaultingVa;
783 } PROCESS_WS_WATCH_INFORMATION, *PPROCESS_WS_WATCH_INFORMATION;
784
785 typedef struct _PROCESS_BASIC_INFORMATION
786 {
787 NTSTATUS ExitStatus;
788 PPEB PebBaseAddress;
789 KAFFINITY AffinityMask;
790 KPRIORITY BasePriority;
791 ULONG UniqueProcessId;
792 ULONG InheritedFromUniqueProcessId;
793 } PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;
794
795 typedef struct _QUOTA_LIMITS
796 {
797 ULONG PagedPoolLimit;
798 ULONG NonPagedPoolLimit;
799 ULONG MinimumWorkingSetSize;
800 ULONG MaximumWorkingSetSize;
801 ULONG PagefileLimit;
802 TIME TimeLimit;
803 } QUOTA_LIMITS, *PQUOTA_LIMITS;
804
805 typedef struct _IO_COUNTERS
806 {
807 ULONG ReadOperationCount;
808 ULONG WriteOperationCount;
809 ULONG OtherOperationCount;
810 LARGE_INTEGER ReadTransferCount;
811 LARGE_INTEGER WriteTransferCount;
812 LARGE_INTEGER OtherTransferCount;
813 } IO_COUNTERS, *PIO_COUNTERS;
814
815
816 typedef struct _VM_COUNTERS_
817 {
818 ULONG PeakVirtualSize;
819 ULONG VirtualSize;
820 ULONG PageFaultCount;
821 ULONG PeakWorkingSetSize;
822 ULONG WorkingSetSize;
823 ULONG QuotaPeakPagedPoolUsage;
824 ULONG QuotaPagedPoolUsage;
825 ULONG QuotaPeakNonPagedPoolUsage;
826 ULONG QuotaNonPagedPoolUsage;
827 ULONG PagefileUsage;
828 ULONG PeakPagefileUsage;
829 } VM_COUNTERS, *PVM_COUNTERS;
830
831
832 typedef struct _POOLED_USAGE_AND_LIMITS_
833 {
834 ULONG PeakPagedPoolUsage;
835 ULONG PagedPoolUsage;
836 ULONG PagedPoolLimit;
837 ULONG PeakNonPagedPoolUsage;
838 ULONG NonPagedPoolUsage;
839 ULONG NonPagedPoolLimit;
840 ULONG PeakPagefileUsage;
841 ULONG PagefileUsage;
842 ULONG PagefileLimit;
843 } POOLED_USAGE_AND_LIMITS, *PPOOLED_USAGE_AND_LIMITS;
844
845
846 typedef struct _PROCESS_ACCESS_TOKEN
847 {
848 HANDLE Token;
849 HANDLE Thread;
850 } PROCESS_ACCESS_TOKEN, *PPROCESS_ACCESS_TOKEN;
851
852 typedef struct _KERNEL_USER_TIMES
853 {
854 TIME CreateTime;
855 TIME ExitTime;
856 TIME KernelTime;
857 TIME UserTime;
858 } KERNEL_USER_TIMES;
859 typedef KERNEL_USER_TIMES *PKERNEL_USER_TIMES;
860
861 // thread information
862
863 // incompatible with MS NT
864
865 typedef struct _THREAD_BASIC_INFORMATION
866 {
867 NTSTATUS ExitStatus;
868 PVOID TebBaseAddress;
869 KAFFINITY AffinityMask;
870 KPRIORITY BasePriority;
871 ULONG UniqueThreadId;
872 } THREAD_BASIC_INFORMATION, *PTHREAD_BASIC_INFORMATION;
873
874 // object information
875
876 typedef struct _OBJECT_NAME_INFORMATION
877 {
878 UNICODE_STRING Name;
879 } OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
880
881
882
883 typedef struct _OBJECT_DATA_INFORMATION
884 {
885 BOOLEAN bInheritHandle;
886 BOOLEAN bProtectFromClose;
887 } OBJECT_DATA_INFORMATION, *POBJECT_DATA_INFORMATION;
888
889
890 typedef struct _OBJECT_TYPE_INFORMATION
891 {
892 UNICODE_STRING Name;
893 UNICODE_STRING Type;
894 ULONG TotalHandles;
895 ULONG ReferenceCount;
896 } OBJECT_TYPE_INFORMATION, *POBJECT_TYPE_INFORMATION;
897
898 // file information
899
900 typedef struct _FILE_BASIC_INFORMATION
901 {
902 TIME CreationTime;
903 TIME LastAccessTime;
904 TIME LastWriteTime;
905 TIME ChangeTime;
906 ULONG FileAttributes;
907 } FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION;
908
909 typedef struct _FILE_STANDARD_INFORMATION
910 {
911 LARGE_INTEGER AllocationSize;
912 LARGE_INTEGER EndOfFile;
913 ULONG NumberOfLinks;
914 BOOLEAN DeletePending;
915 BOOLEAN Directory;
916 } FILE_STANDARD_INFORMATION, *PFILE_STANDARD_INFORMATION;
917
918 typedef struct _FILE_POSITION_INFORMATION
919 {
920 LARGE_INTEGER CurrentByteOffset;
921 } FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION;
922
923 typedef struct _FILE_ALIGNMENT_INFORMATION
924 {
925 ULONG AlignmentRequirement;
926 } FILE_ALIGNMENT_INFORMATION, *PFILE_ALIGNMENT_INFORMATION;
927
928 typedef struct _FILE_DISPOSITION_INFORMATION
929 {
930 BOOLEAN DoDeleteFile;
931 } FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
932
933 typedef struct _FILE_END_OF_FILE_INFORMATION
934 {
935 LARGE_INTEGER EndOfFile;
936 } FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION;
937
938 typedef struct _FILE_NETWORK_OPEN_INFORMATION
939 {
940 TIME CreationTime;
941 TIME LastAccessTime;
942 TIME LastWriteTime;
943 TIME ChangeTime;
944 LARGE_INTEGER AllocationSize;
945 LARGE_INTEGER EndOfFile;
946 ULONG FileAttributes;
947 } FILE_NETWORK_OPEN_INFORMATION, *PFILE_NETWORK_OPEN_INFORMATION;
948
949 typedef struct _FILE_FULL_EA_INFORMATION
950 {
951 ULONG NextEntryOffset;
952 UCHAR Flags;
953 UCHAR EaNameLength;
954 USHORT EaValueLength;
955 CHAR EaName[0];
956 } FILE_FULL_EA_INFORMATION, *PFILE_FULL_EA_INFORMATION;
957
958
959 typedef struct _FILE_EA_INFORMATION {
960 ULONG EaSize;
961 } FILE_EA_INFORMATION, *PFILE_EA_INFORMATION;
962
963
964 typedef struct _FILE_GET_EA_INFORMATION {
965 ULONG NextEntryOffset;
966 UCHAR EaNameLength;
967 CHAR EaName[0];
968 } FILE_GET_EA_INFORMATION, *PFILE_GET_EA_INFORMATION;
969
970 typedef struct _FILE_STREAM_INFORMATION {
971 ULONG NextEntryOffset;
972 ULONG StreamNameLength;
973 LARGE_INTEGER StreamSize;
974 LARGE_INTEGER StreamAllocationSize;
975 WCHAR StreamName[0];
976 } FILE_STREAM_INFORMATION, *PFILE_STREAM_INFORMATION;
977
978 typedef struct _FILE_ALLOCATION_INFORMATION {
979 LARGE_INTEGER AllocationSize;
980 } FILE_ALLOCATION_INFORMATION, *PFILE_ALLOCATION_INFORMATION;
981
982 typedef struct _FILE_NAME_INFORMATION {
983 ULONG FileNameLength;
984 WCHAR FileName[0];
985 } FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
986
987 typedef struct _FILE_NAMES_INFORMATION
988 {
989 ULONG NextEntryOffset;
990 ULONG FileIndex;
991 ULONG FileNameLength;
992 WCHAR FileName[0];
993 } FILE_NAMES_INFORMATION, *PFILE_NAMES_INFORMATION;
994
995
996 typedef struct _FILE_RENAME_INFORMATION {
997 BOOLEAN Replace;
998 HANDLE RootDir;
999 ULONG FileNameLength;
1000 WCHAR FileName[0];
1001 } FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION;
1002
1003
1004 typedef struct _FILE_INTERNAL_INFORMATION {
1005 LARGE_INTEGER IndexNumber;
1006 } FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION;
1007
1008 typedef struct _FILE_ACCESS_INFORMATION {
1009 ACCESS_MASK AccessFlags;
1010 } FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION;
1011
1012
1013 typedef struct _FILE_MODE_INFORMATION {
1014 ULONG Mode;
1015 } FILE_MODE_INFORMATION, *PFILE_MODE_INFORMATION;
1016
1017 typedef struct _FILE_COMPRESSION_INFORMATION {
1018 LARGE_INTEGER CompressedFileSize;
1019 USHORT CompressionFormat;
1020 UCHAR CompressionUnitShift;
1021 UCHAR ChunkShift;
1022 UCHAR ClusterShift;
1023 UCHAR Reserved[3];
1024 } FILE_COMPRESSION_INFORMATION, *PFILE_COMPRESSION_INFORMATION;
1025
1026 typedef struct _FILE_ALL_INFORMATION {
1027 FILE_BASIC_INFORMATION BasicInformation;
1028 FILE_STANDARD_INFORMATION StandardInformation;
1029 FILE_INTERNAL_INFORMATION InternalInformation;
1030 FILE_EA_INFORMATION EaInformation;
1031 FILE_ACCESS_INFORMATION AccessInformation;
1032 FILE_POSITION_INFORMATION PositionInformation;
1033 FILE_MODE_INFORMATION ModeInformation;
1034 FILE_ALIGNMENT_INFORMATION AlignmentInformation;
1035 FILE_NAME_INFORMATION NameInformation;
1036 } FILE_ALL_INFORMATION, *PFILE_ALL_INFORMATION;
1037
1038 // file system information structures
1039
1040 typedef struct _FILE_FS_DEVICE_INFORMATION {
1041 DEVICE_TYPE DeviceType;
1042 ULONG Characteristics;
1043 } FILE_FS_DEVICE_INFORMATION, *PFILE_FS_DEVICE_INFORMATION;
1044
1045
1046 typedef struct _FILE_FS_VOLUME_INFORMATION {
1047 TIME VolumeCreationTime;
1048 ULONG VolumeSerialNumber;
1049 ULONG VolumeLabelLength;
1050 BOOLEAN SupportsObjects;
1051 WCHAR VolumeLabel[0];
1052 } FILE_FS_VOLUME_INFORMATION, *PFILE_FS_VOLUME_INFORMATION;
1053
1054 typedef struct _FILE_FS_SIZE_INFORMATION {
1055 LARGE_INTEGER TotalAllocationUnits;
1056 LARGE_INTEGER AvailableAllocationUnits;
1057 ULONG SectorsPerAllocationUnit;
1058 ULONG BytesPerSector;
1059 } FILE_FS_SIZE_INFORMATION, *PFILE_FS_SIZE_INFORMATION;
1060
1061 typedef struct _FILE_FS_ATTRIBUTE_INFORMATION {
1062 ULONG FileSystemAttributes;
1063 LONG MaximumComponentNameLength;
1064 ULONG FileSystemNameLength;
1065 WCHAR FileSystemName[0];
1066 } FILE_FS_ATTRIBUTE_INFORMATION, *PFILE_FS_ATTRIBUTE_INFORMATION;
1067
1068 /*
1069 FileSystemAttributes is one of the following values:
1070
1071 FILE_CASE_SENSITIVE_SEARCH 0x00000001
1072 FILE_CASE_PRESERVED_NAMES 0x00000002
1073 FILE_UNICODE_ON_DISK 0x00000004
1074 FILE_PERSISTENT_ACLS 0x00000008
1075 FILE_FILE_COMPRESSION 0x00000010
1076 FILE_VOLUME_QUOTAS 0x00000020
1077 FILE_VOLUME_IS_COMPRESSED 0x00008000
1078 */
1079 typedef struct _FILE_FS_LABEL_INFORMATION {
1080 ULONG VolumeLabelLength;
1081 WCHAR VolumeLabel[0];
1082 } FILE_FS_LABEL_INFORMATION, *PFILE_FS_LABEL_INFORMATION;
1083
1084 // read file scatter / write file scatter
1085 //FIXME I am a win32 struct aswell
1086
1087 typedef union _FILE_SEGMENT_ELEMENT {
1088 PVOID Buffer;
1089 ULONG Alignment;
1090 }FILE_SEGMENT_ELEMENT, *PFILE_SEGMENT_ELEMENT;
1091
1092 // directory information
1093
1094 typedef struct _OBJDIR_INFORMATION {
1095 UNICODE_STRING ObjectName;
1096 UNICODE_STRING ObjectTypeName; // Directory, Device ...
1097 UCHAR Data[0];
1098 } OBJDIR_INFORMATION, *POBJDIR_INFORMATION;
1099
1100
1101 typedef struct _FILE_DIRECTORY_INFORMATION {
1102 ULONG NextEntryOffset;
1103 ULONG FileIndex;
1104 TIME CreationTime;
1105 TIME LastAccessTime;
1106 TIME LastWriteTime;
1107 TIME ChangeTime;
1108 LARGE_INTEGER EndOfFile;
1109 LARGE_INTEGER AllocationSize;
1110 ULONG FileAttributes;
1111 ULONG FileNameLength;
1112 WCHAR FileName[0];
1113 } FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION;
1114
1115 typedef struct _FILE_FULL_DIRECTORY_INFORMATION {
1116 ULONG NextEntryOffset;
1117 ULONG FileIndex;
1118 TIME CreationTime;
1119 TIME LastAccessTime;
1120 TIME LastWriteTime;
1121 TIME ChangeTime;
1122 LARGE_INTEGER EndOfFile;
1123 LARGE_INTEGER AllocationSize;
1124 ULONG FileAttributes;
1125 ULONG FileNameLength;
1126 ULONG EaSize;
1127 WCHAR FileName[0]; // variable size
1128 } FILE_FULL_DIRECTORY_INFORMATION, *PFILE_FULL_DIRECTORY_INFORMATION,
1129 FILE_FULL_DIR_INFORMATION, *PFILE_FULL_DIR_INFORMATION;
1130
1131
1132 typedef struct _FILE_BOTH_DIRECTORY_INFORMATION {
1133 ULONG NextEntryOffset;
1134 ULONG FileIndex;
1135 TIME CreationTime;
1136 TIME LastAccessTime;
1137 TIME LastWriteTime;
1138 TIME ChangeTime;
1139 LARGE_INTEGER EndOfFile;
1140 LARGE_INTEGER AllocationSize;
1141 ULONG FileAttributes;
1142 ULONG FileNameLength;
1143 ULONG EaSize;
1144 CHAR ShortNameLength;
1145 WCHAR ShortName[12]; // 8.3 name
1146 WCHAR FileName[0];
1147 } FILE_BOTH_DIRECTORY_INFORMATION, *PFILE_BOTH_DIRECTORY_INFORMATION,
1148 FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION;
1149
1150
1151 /*
1152 NotifyFilter / CompletionFilter:
1153
1154 FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
1155 FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002
1156 FILE_NOTIFY_CHANGE_NAME 0x00000003
1157 FILE_NOTIFY_CHANGE_ATTRIBUTES 0x00000004
1158 FILE_NOTIFY_CHANGE_SIZE 0x00000008
1159 FILE_NOTIFY_CHANGE_LAST_WRITE 0x00000010
1160 FILE_NOTIFY_CHANGE_LAST_ACCESS 0x00000020
1161 FILE_NOTIFY_CHANGE_CREATION 0x00000040
1162 FILE_NOTIFY_CHANGE_EA 0x00000080
1163 FILE_NOTIFY_CHANGE_SECURITY 0x00000100
1164 FILE_NOTIFY_CHANGE_STREAM_NAME 0x00000200
1165 FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000400
1166 FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800
1167 */
1168
1169 typedef struct _FILE_NOTIFY_INFORMATION {
1170 ULONG Action;
1171 ULONG FileNameLength;
1172 WCHAR FileName[0];
1173 } FILE_NOTIFY_INFORMATION;
1174
1175
1176 /*
1177 Action is one of the following values:
1178
1179 FILE_ACTION_ADDED 0x00000001
1180 FILE_ACTION_REMOVED 0x00000002
1181 FILE_ACTION_MODIFIED 0x00000003
1182 FILE_ACTION_RENAMED_OLD_NAME 0x00000004
1183 FILE_ACTION_RENAMED_NEW_NAME 0x00000005
1184 FILE_ACTION_ADDED_STREAM 0x00000006
1185 FILE_ACTION_REMOVED_STREAM 0x00000007
1186 FILE_ACTION_MODIFIED_STREAM 0x00000008
1187
1188 */
1189
1190
1191 //FIXME: I am a win32 object
1192 typedef
1193 VOID
1194 (*PTIMERAPCROUTINE)(
1195 LPVOID lpArgToCompletionRoutine,
1196 DWORD dwTimerLowValue,
1197 DWORD dwTimerHighValue
1198 );
1199
1200
1201 // File System Control commands ( related to defragging )
1202
1203 #define FSCTL_READ_MFT_RECORD 0x90068 // NTFS only
1204 #define FSCTL_GET_VOLUME_BITMAP 0x9006F
1205 #define FSCTL_GET_RETRIEVAL_POINTERS 0x90073
1206 #define FSCTL_MOVE_FILE 0x90074
1207
1208 typedef struct _MAPPING_PAIR
1209 {
1210 ULONGLONG Vcn;
1211 ULONGLONG Lcn;
1212 } MAPPING_PAIR, *PMAPPING_PAIR;
1213
1214 typedef struct _GET_RETRIEVAL_DESCRIPTOR
1215 {
1216 ULONG NumberOfPairs;
1217 ULONGLONG StartVcn;
1218 MAPPING_PAIR Pair[0]; // variable size
1219 } GET_RETRIEVAL_DESCRIPTOR, *PGET_RETRIEVAL_DESCRIPTOR;
1220
1221 typedef struct _BITMAP_DESCRIPTOR
1222 {
1223 ULONGLONG StartLcn;
1224 ULONGLONG ClustersToEndOfVol;
1225 BYTE Map[0]; // variable size
1226 } BITMAP_DESCRIPTOR, *PBITMAP_DESCRIPTOR;
1227
1228 typedef struct _MOVEFILE_DESCRIPTOR
1229 {
1230 HANDLE FileHandle;
1231 ULONG Reserved;
1232 LARGE_INTEGER StartVcn;
1233 LARGE_INTEGER TargetLcn;
1234 ULONG NumVcns;
1235 ULONG Reserved1;
1236 } MOVEFILE_DESCRIPTOR, *PMOVEFILE_DESCRIPTOR;
1237
1238
1239
1240 //typedef enum _TIMER_TYPE
1241 //{
1242 // NotificationTimer,
1243 // SynchronizationTimer
1244 //} TIMER_TYPE;
1245
1246 typedef
1247 struct _LPC_PORT_BASIC_INFORMATION
1248 {
1249 DWORD Unknown0;
1250 DWORD Unknown1;
1251 DWORD Unknown2;
1252 DWORD Unknown3;
1253 DWORD Unknown4;
1254 DWORD Unknown5;
1255 DWORD Unknown6;
1256 DWORD Unknown7;
1257 DWORD Unknown8;
1258 DWORD Unknown9;
1259 DWORD Unknown10;
1260 DWORD Unknown11;
1261 DWORD Unknown12;
1262 DWORD Unknown13;
1263
1264 } LPC_PORT_BASIC_INFORMATION, * PLPC_PORT_BASIC_INFORMATION;
1265
1266 #endif