FLG macros 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
728 } SYSTEM_TIME_ZONE_INFORMATION, * PSYSTEM_TIME_ZONE_INFORMATION;
729
730 // memory information
731
732 #define MemoryBasicInformation 0
733
734 // shutdown action
735
736 typedef enum SHUTDOWN_ACTION_TAG {
737 ShutdownNoReboot,
738 ShutdownReboot,
739 ShutdownPowerOff
740 } SHUTDOWN_ACTION;
741
742 // wait type
743
744 #define WaitAll 0
745 #define WaitAny 1
746
747 // number of wait objects
748
749 #define THREAD_WAIT_OBJECTS 3
750 //#define MAXIMUM_WAIT_OBJECTS 64
751
752 // key restore flags
753
754 #define REG_WHOLE_HIVE_VOLATILE 1
755 #define REG_REFRESH_HIVE 2
756
757 // object type access rights
758
759 #define OBJECT_TYPE_CREATE 0x0001
760 #define OBJECT_TYPE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
761
762 // directory access rights
763
764 #define DIRECTORY_QUERY 0x0001
765 #define DIRECTORY_TRAVERSE 0x0002
766 #define DIRECTORY_CREATE_OBJECT 0x0004
767 #define DIRECTORY_CREATE_SUBDIRECTORY 0x0008
768
769 #define DIRECTORY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0xF)
770
771 // symbolic link access rights
772
773 #define SYMBOLIC_LINK_QUERY 0x0001
774 #define SYMBOLIC_LINK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
775
776 typedef struct _PROCESS_WS_WATCH_INFORMATION
777 {
778 PVOID FaultingPc;
779 PVOID FaultingVa;
780 } PROCESS_WS_WATCH_INFORMATION, *PPROCESS_WS_WATCH_INFORMATION;
781
782 typedef struct _PROCESS_BASIC_INFORMATION
783 {
784 NTSTATUS ExitStatus;
785 PPEB PebBaseAddress;
786 KAFFINITY AffinityMask;
787 KPRIORITY BasePriority;
788 ULONG UniqueProcessId;
789 ULONG InheritedFromUniqueProcessId;
790 } PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;
791
792 typedef struct _QUOTA_LIMITS
793 {
794 ULONG PagedPoolLimit;
795 ULONG NonPagedPoolLimit;
796 ULONG MinimumWorkingSetSize;
797 ULONG MaximumWorkingSetSize;
798 ULONG PagefileLimit;
799 TIME TimeLimit;
800 } QUOTA_LIMITS, *PQUOTA_LIMITS;
801
802 typedef struct _IO_COUNTERS
803 {
804 ULONG ReadOperationCount;
805 ULONG WriteOperationCount;
806 ULONG OtherOperationCount;
807 LARGE_INTEGER ReadTransferCount;
808 LARGE_INTEGER WriteTransferCount;
809 LARGE_INTEGER OtherTransferCount;
810 } IO_COUNTERS, *PIO_COUNTERS;
811
812
813 typedef struct _VM_COUNTERS_
814 {
815 ULONG PeakVirtualSize;
816 ULONG VirtualSize;
817 ULONG PageFaultCount;
818 ULONG PeakWorkingSetSize;
819 ULONG WorkingSetSize;
820 ULONG QuotaPeakPagedPoolUsage;
821 ULONG QuotaPagedPoolUsage;
822 ULONG QuotaPeakNonPagedPoolUsage;
823 ULONG QuotaNonPagedPoolUsage;
824 ULONG PagefileUsage;
825 ULONG PeakPagefileUsage;
826 } VM_COUNTERS, *PVM_COUNTERS;
827
828
829 typedef struct _POOLED_USAGE_AND_LIMITS_
830 {
831 ULONG PeakPagedPoolUsage;
832 ULONG PagedPoolUsage;
833 ULONG PagedPoolLimit;
834 ULONG PeakNonPagedPoolUsage;
835 ULONG NonPagedPoolUsage;
836 ULONG NonPagedPoolLimit;
837 ULONG PeakPagefileUsage;
838 ULONG PagefileUsage;
839 ULONG PagefileLimit;
840 } POOLED_USAGE_AND_LIMITS, *PPOOLED_USAGE_AND_LIMITS;
841
842
843 typedef struct _PROCESS_ACCESS_TOKEN
844 {
845 HANDLE Token;
846 HANDLE Thread;
847 } PROCESS_ACCESS_TOKEN, *PPROCESS_ACCESS_TOKEN;
848
849 typedef struct _KERNEL_USER_TIMES
850 {
851 TIME CreateTime;
852 TIME ExitTime;
853 TIME KernelTime;
854 TIME UserTime;
855 } KERNEL_USER_TIMES;
856 typedef KERNEL_USER_TIMES *PKERNEL_USER_TIMES;
857
858 // thread information
859
860 // incompatible with MS NT
861
862 typedef struct _THREAD_BASIC_INFORMATION
863 {
864 NTSTATUS ExitStatus;
865 PVOID TebBaseAddress;
866 KAFFINITY AffinityMask;
867 KPRIORITY BasePriority;
868 ULONG UniqueThreadId;
869 } THREAD_BASIC_INFORMATION, *PTHREAD_BASIC_INFORMATION;
870
871 // object information
872
873 typedef struct _OBJECT_NAME_INFORMATION
874 {
875 UNICODE_STRING Name;
876 } OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
877
878
879
880 typedef struct _OBJECT_DATA_INFORMATION
881 {
882 BOOLEAN bInheritHandle;
883 BOOLEAN bProtectFromClose;
884 } OBJECT_DATA_INFORMATION, *POBJECT_DATA_INFORMATION;
885
886
887 typedef struct _OBJECT_TYPE_INFORMATION
888 {
889 UNICODE_STRING Name;
890 UNICODE_STRING Type;
891 ULONG TotalHandles;
892 ULONG ReferenceCount;
893 } OBJECT_TYPE_INFORMATION, *POBJECT_TYPE_INFORMATION;
894
895 // file information
896
897 typedef struct _FILE_BASIC_INFORMATION
898 {
899 TIME CreationTime;
900 TIME LastAccessTime;
901 TIME LastWriteTime;
902 TIME ChangeTime;
903 ULONG FileAttributes;
904 } FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION;
905
906 typedef struct _FILE_STANDARD_INFORMATION
907 {
908 LARGE_INTEGER AllocationSize;
909 LARGE_INTEGER EndOfFile;
910 ULONG NumberOfLinks;
911 BOOLEAN DeletePending;
912 BOOLEAN Directory;
913 } FILE_STANDARD_INFORMATION, *PFILE_STANDARD_INFORMATION;
914
915 typedef struct _FILE_POSITION_INFORMATION
916 {
917 LARGE_INTEGER CurrentByteOffset;
918 } FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION;
919
920 typedef struct _FILE_ALIGNMENT_INFORMATION
921 {
922 ULONG AlignmentRequirement;
923 } FILE_ALIGNMENT_INFORMATION, *PFILE_ALIGNMENT_INFORMATION;
924
925 typedef struct _FILE_DISPOSITION_INFORMATION
926 {
927 BOOLEAN DoDeleteFile;
928 } FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
929
930 typedef struct _FILE_END_OF_FILE_INFORMATION
931 {
932 LARGE_INTEGER EndOfFile;
933 } FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION;
934
935 typedef struct _FILE_NETWORK_OPEN_INFORMATION
936 {
937 TIME CreationTime;
938 TIME LastAccessTime;
939 TIME LastWriteTime;
940 TIME ChangeTime;
941 LARGE_INTEGER AllocationSize;
942 LARGE_INTEGER EndOfFile;
943 ULONG FileAttributes;
944 } FILE_NETWORK_OPEN_INFORMATION, *PFILE_NETWORK_OPEN_INFORMATION;
945
946 typedef struct _FILE_FULL_EA_INFORMATION
947 {
948 ULONG NextEntryOffset;
949 UCHAR Flags;
950 UCHAR EaNameLength;
951 USHORT EaValueLength;
952 CHAR EaName[0];
953 } FILE_FULL_EA_INFORMATION, *PFILE_FULL_EA_INFORMATION;
954
955
956 typedef struct _FILE_EA_INFORMATION {
957 ULONG EaSize;
958 } FILE_EA_INFORMATION, *PFILE_EA_INFORMATION;
959
960
961 typedef struct _FILE_GET_EA_INFORMATION {
962 ULONG NextEntryOffset;
963 UCHAR EaNameLength;
964 CHAR EaName[0];
965 } FILE_GET_EA_INFORMATION, *PFILE_GET_EA_INFORMATION;
966
967 typedef struct _FILE_STREAM_INFORMATION {
968 ULONG NextEntryOffset;
969 ULONG StreamNameLength;
970 LARGE_INTEGER StreamSize;
971 LARGE_INTEGER StreamAllocationSize;
972 WCHAR StreamName[0];
973 } FILE_STREAM_INFORMATION, *PFILE_STREAM_INFORMATION;
974
975 typedef struct _FILE_ALLOCATION_INFORMATION {
976 LARGE_INTEGER AllocationSize;
977 } FILE_ALLOCATION_INFORMATION, *PFILE_ALLOCATION_INFORMATION;
978
979 typedef struct _FILE_NAME_INFORMATION {
980 ULONG FileNameLength;
981 WCHAR FileName[0];
982 } FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
983
984 typedef struct _FILE_NAMES_INFORMATION
985 {
986 ULONG NextEntryOffset;
987 ULONG FileIndex;
988 ULONG FileNameLength;
989 WCHAR FileName[0];
990 } FILE_NAMES_INFORMATION, *PFILE_NAMES_INFORMATION;
991
992
993 typedef struct _FILE_RENAME_INFORMATION {
994 BOOLEAN Replace;
995 HANDLE RootDir;
996 ULONG FileNameLength;
997 WCHAR FileName[0];
998 } FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION;
999
1000
1001 typedef struct _FILE_INTERNAL_INFORMATION {
1002 LARGE_INTEGER IndexNumber;
1003 } FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION;
1004
1005 typedef struct _FILE_ACCESS_INFORMATION {
1006 ACCESS_MASK AccessFlags;
1007 } FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION;
1008
1009
1010 typedef struct _FILE_MODE_INFORMATION {
1011 ULONG Mode;
1012 } FILE_MODE_INFORMATION, *PFILE_MODE_INFORMATION;
1013
1014 typedef struct _FILE_COMPRESSION_INFORMATION {
1015 LARGE_INTEGER CompressedFileSize;
1016 USHORT CompressionFormat;
1017 UCHAR CompressionUnitShift;
1018 UCHAR ChunkShift;
1019 UCHAR ClusterShift;
1020 UCHAR Reserved[3];
1021 } FILE_COMPRESSION_INFORMATION, *PFILE_COMPRESSION_INFORMATION;
1022
1023 typedef struct _FILE_ALL_INFORMATION {
1024 FILE_BASIC_INFORMATION BasicInformation;
1025 FILE_STANDARD_INFORMATION StandardInformation;
1026 FILE_INTERNAL_INFORMATION InternalInformation;
1027 FILE_EA_INFORMATION EaInformation;
1028 FILE_ACCESS_INFORMATION AccessInformation;
1029 FILE_POSITION_INFORMATION PositionInformation;
1030 FILE_MODE_INFORMATION ModeInformation;
1031 FILE_ALIGNMENT_INFORMATION AlignmentInformation;
1032 FILE_NAME_INFORMATION NameInformation;
1033 } FILE_ALL_INFORMATION, *PFILE_ALL_INFORMATION;
1034
1035 // file system information structures
1036
1037 typedef struct _FILE_FS_DEVICE_INFORMATION {
1038 DEVICE_TYPE DeviceType;
1039 ULONG Characteristics;
1040 } FILE_FS_DEVICE_INFORMATION, *PFILE_FS_DEVICE_INFORMATION;
1041
1042
1043 typedef struct _FILE_FS_VOLUME_INFORMATION {
1044 TIME VolumeCreationTime;
1045 ULONG VolumeSerialNumber;
1046 ULONG VolumeLabelLength;
1047 BOOLEAN SupportsObjects;
1048 WCHAR VolumeLabel[0];
1049 } FILE_FS_VOLUME_INFORMATION, *PFILE_FS_VOLUME_INFORMATION;
1050
1051 typedef struct _FILE_FS_SIZE_INFORMATION {
1052 LARGE_INTEGER TotalAllocationUnits;
1053 LARGE_INTEGER AvailableAllocationUnits;
1054 ULONG SectorsPerAllocationUnit;
1055 ULONG BytesPerSector;
1056 } FILE_FS_SIZE_INFORMATION, *PFILE_FS_SIZE_INFORMATION;
1057
1058 typedef struct _FILE_FS_ATTRIBUTE_INFORMATION {
1059 ULONG FileSystemAttributes;
1060 LONG MaximumComponentNameLength;
1061 ULONG FileSystemNameLength;
1062 WCHAR FileSystemName[0];
1063 } FILE_FS_ATTRIBUTE_INFORMATION, *PFILE_FS_ATTRIBUTE_INFORMATION;
1064
1065 /*
1066 FileSystemAttributes is one of the following values:
1067
1068 FILE_CASE_SENSITIVE_SEARCH 0x00000001
1069 FILE_CASE_PRESERVED_NAMES 0x00000002
1070 FILE_UNICODE_ON_DISK 0x00000004
1071 FILE_PERSISTENT_ACLS 0x00000008
1072 FILE_FILE_COMPRESSION 0x00000010
1073 FILE_VOLUME_QUOTAS 0x00000020
1074 FILE_VOLUME_IS_COMPRESSED 0x00008000
1075 */
1076 typedef struct _FILE_FS_LABEL_INFORMATION {
1077 ULONG VolumeLabelLength;
1078 WCHAR VolumeLabel[0];
1079 } FILE_FS_LABEL_INFORMATION, *PFILE_FS_LABEL_INFORMATION;
1080
1081 // read file scatter / write file scatter
1082 //FIXME I am a win32 struct aswell
1083
1084 typedef union _FILE_SEGMENT_ELEMENT {
1085 PVOID Buffer;
1086 ULONG Alignment;
1087 }FILE_SEGMENT_ELEMENT, *PFILE_SEGMENT_ELEMENT;
1088
1089 // directory information
1090
1091 typedef struct _OBJDIR_INFORMATION {
1092 UNICODE_STRING ObjectName;
1093 UNICODE_STRING ObjectTypeName; // Directory, Device ...
1094 UCHAR Data[0];
1095 } OBJDIR_INFORMATION, *POBJDIR_INFORMATION;
1096
1097
1098 typedef struct _FILE_DIRECTORY_INFORMATION {
1099 ULONG NextEntryOffset;
1100 ULONG FileIndex;
1101 TIME CreationTime;
1102 TIME LastAccessTime;
1103 TIME LastWriteTime;
1104 TIME ChangeTime;
1105 LARGE_INTEGER EndOfFile;
1106 LARGE_INTEGER AllocationSize;
1107 ULONG FileAttributes;
1108 ULONG FileNameLength;
1109 WCHAR FileName[0];
1110 } FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION;
1111
1112 typedef struct _FILE_FULL_DIRECTORY_INFORMATION {
1113 ULONG NextEntryOffset;
1114 ULONG FileIndex;
1115 TIME CreationTime;
1116 TIME LastAccessTime;
1117 TIME LastWriteTime;
1118 TIME ChangeTime;
1119 LARGE_INTEGER EndOfFile;
1120 LARGE_INTEGER AllocationSize;
1121 ULONG FileAttributes;
1122 ULONG FileNameLength;
1123 ULONG EaSize;
1124 WCHAR FileName[0]; // variable size
1125 } FILE_FULL_DIRECTORY_INFORMATION, *PFILE_FULL_DIRECTORY_INFORMATION,
1126 FILE_FULL_DIR_INFORMATION, *PFILE_FULL_DIR_INFORMATION;
1127
1128
1129 typedef struct _FILE_BOTH_DIRECTORY_INFORMATION {
1130 ULONG NextEntryOffset;
1131 ULONG FileIndex;
1132 TIME CreationTime;
1133 TIME LastAccessTime;
1134 TIME LastWriteTime;
1135 TIME ChangeTime;
1136 LARGE_INTEGER EndOfFile;
1137 LARGE_INTEGER AllocationSize;
1138 ULONG FileAttributes;
1139 ULONG FileNameLength;
1140 ULONG EaSize;
1141 CHAR ShortNameLength;
1142 WCHAR ShortName[12]; // 8.3 name
1143 WCHAR FileName[0];
1144 } FILE_BOTH_DIRECTORY_INFORMATION, *PFILE_BOTH_DIRECTORY_INFORMATION,
1145 FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION;
1146
1147
1148 /*
1149 NotifyFilter / CompletionFilter:
1150
1151 FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
1152 FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002
1153 FILE_NOTIFY_CHANGE_NAME 0x00000003
1154 FILE_NOTIFY_CHANGE_ATTRIBUTES 0x00000004
1155 FILE_NOTIFY_CHANGE_SIZE 0x00000008
1156 FILE_NOTIFY_CHANGE_LAST_WRITE 0x00000010
1157 FILE_NOTIFY_CHANGE_LAST_ACCESS 0x00000020
1158 FILE_NOTIFY_CHANGE_CREATION 0x00000040
1159 FILE_NOTIFY_CHANGE_EA 0x00000080
1160 FILE_NOTIFY_CHANGE_SECURITY 0x00000100
1161 FILE_NOTIFY_CHANGE_STREAM_NAME 0x00000200
1162 FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000400
1163 FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800
1164 */
1165
1166 typedef struct _FILE_NOTIFY_INFORMATION {
1167 ULONG Action;
1168 ULONG FileNameLength;
1169 WCHAR FileName[0];
1170 } FILE_NOTIFY_INFORMATION;
1171
1172
1173 /*
1174 Action is one of the following values:
1175
1176 FILE_ACTION_ADDED 0x00000001
1177 FILE_ACTION_REMOVED 0x00000002
1178 FILE_ACTION_MODIFIED 0x00000003
1179 FILE_ACTION_RENAMED_OLD_NAME 0x00000004
1180 FILE_ACTION_RENAMED_NEW_NAME 0x00000005
1181 FILE_ACTION_ADDED_STREAM 0x00000006
1182 FILE_ACTION_REMOVED_STREAM 0x00000007
1183 FILE_ACTION_MODIFIED_STREAM 0x00000008
1184
1185 */
1186
1187
1188 //FIXME: I am a win32 object
1189 typedef
1190 VOID
1191 (*PTIMERAPCROUTINE)(
1192 LPVOID lpArgToCompletionRoutine,
1193 DWORD dwTimerLowValue,
1194 DWORD dwTimerHighValue
1195 );
1196
1197
1198 // File System Control commands ( related to defragging )
1199
1200 #define FSCTL_READ_MFT_RECORD 0x90068 // NTFS only
1201 #define FSCTL_GET_VOLUME_BITMAP 0x9006F
1202 #define FSCTL_GET_RETRIEVAL_POINTERS 0x90073
1203 #define FSCTL_MOVE_FILE 0x90074
1204
1205 typedef struct _MAPPING_PAIR
1206 {
1207 ULONGLONG Vcn;
1208 ULONGLONG Lcn;
1209 } MAPPING_PAIR, *PMAPPING_PAIR;
1210
1211 typedef struct _GET_RETRIEVAL_DESCRIPTOR
1212 {
1213 ULONG NumberOfPairs;
1214 ULONGLONG StartVcn;
1215 MAPPING_PAIR Pair[0]; // variable size
1216 } GET_RETRIEVAL_DESCRIPTOR, *PGET_RETRIEVAL_DESCRIPTOR;
1217
1218 typedef struct _BITMAP_DESCRIPTOR
1219 {
1220 ULONGLONG StartLcn;
1221 ULONGLONG ClustersToEndOfVol;
1222 BYTE Map[0]; // variable size
1223 } BITMAP_DESCRIPTOR, *PBITMAP_DESCRIPTOR;
1224
1225 typedef struct _MOVEFILE_DESCRIPTOR
1226 {
1227 HANDLE FileHandle;
1228 ULONG Reserved;
1229 LARGE_INTEGER StartVcn;
1230 LARGE_INTEGER TargetLcn;
1231 ULONG NumVcns;
1232 ULONG Reserved1;
1233 } MOVEFILE_DESCRIPTOR, *PMOVEFILE_DESCRIPTOR;
1234
1235
1236
1237 //typedef enum _TIMER_TYPE
1238 //{
1239 // NotificationTimer,
1240 // SynchronizationTimer
1241 //} TIMER_TYPE;
1242
1243 typedef
1244 struct _LPC_PORT_BASIC_INFORMATION
1245 {
1246 DWORD Unknown0;
1247 DWORD Unknown1;
1248 DWORD Unknown2;
1249 DWORD Unknown3;
1250 DWORD Unknown4;
1251 DWORD Unknown5;
1252 DWORD Unknown6;
1253 DWORD Unknown7;
1254 DWORD Unknown8;
1255 DWORD Unknown9;
1256 DWORD Unknown10;
1257 DWORD Unknown11;
1258 DWORD Unknown12;
1259 DWORD Unknown13;
1260
1261 } LPC_PORT_BASIC_INFORMATION, * PLPC_PORT_BASIC_INFORMATION;
1262
1263 #endif