- NDK 0.98, now with versionned headers. Too many changes to list, see the TinyKRNL...
[reactos.git] / reactos / include / ndk / extypes.h
1 /*++ NDK Version: 0098
2
3 Copyright (c) Alex Ionescu. All rights reserved.
4
5 Header Name:
6
7 extypes.h
8
9 Abstract:
10
11 Type definitions for the Executive.
12
13 Author:
14
15 Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
16
17 --*/
18
19 #ifndef _EXTYPES_H
20 #define _EXTYPES_H
21
22 //
23 // Dependencies
24 //
25 #include <umtypes.h>
26 #include <cfg.h>
27 #if defined(_MSC_VER) && !defined(NTOS_MODE_USER)
28 #include <ntimage.h>
29 #endif
30 #include <cmtypes.h>
31 #include <ketypes.h>
32 #include <potypes.h>
33 #include <lpctypes.h>
34
35 //
36 // Atom and Language IDs
37 //
38 typedef USHORT LANGID, *PLANGID;
39 typedef USHORT RTL_ATOM, *PRTL_ATOM;
40
41 #ifndef NTOS_MODE_USER
42
43 //
44 // Kernel Exported Object Types
45 //
46 extern POBJECT_TYPE NTSYSAPI ExDesktopObjectType;
47 extern POBJECT_TYPE NTSYSAPI ExWindowStationObjectType;
48 extern POBJECT_TYPE NTSYSAPI ExIoCompletionType;
49 extern POBJECT_TYPE NTSYSAPI ExMutantObjectType;
50 extern POBJECT_TYPE NTSYSAPI ExTimerType;
51
52 //
53 // Exported NT Build Number
54 //
55 extern ULONG NTSYSAPI NtBuildNumber;
56
57 //
58 // Invalid Handle Value Constant
59 //
60 #define INVALID_HANDLE_VALUE (HANDLE)-1
61
62 #endif
63
64 //
65 // Increments
66 //
67 #define MUTANT_INCREMENT 1
68
69 //
70 // Callback Object Access Mask
71 //
72 #define CALLBACK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x0001)
73 #define CALLBACK_EXECUTE (STANDARD_RIGHTS_EXECUTE|SYNCHRONIZE|0x0001)
74 #define CALLBACK_WRITE (STANDARD_RIGHTS_WRITE|SYNCHRONIZE|0x0001)
75 #define CALLBACK_READ (STANDARD_RIGHTS_READ|SYNCHRONIZE|0x0001)
76
77 //
78 // Event Object Access Masks
79 //
80 #ifdef NTOS_MODE_USER
81 #define EVENT_QUERY_STATE 0x0001
82
83 //
84 // Semaphore Object Acess Masks
85 //
86 #define SEMAPHORE_QUERY_STATE 0x0001
87 #endif
88
89 //
90 // Event Pair Access Masks
91 //
92 #define EVENT_PAIR_ALL_ACCESS 0x1F0000L
93
94 //
95 // Profile Object Access Masks
96 //
97 #define PROFILE_CONTROL 0x0001
98 #define PROFILE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | PROFILE_CONTROL)
99
100 //
101 // Maximum Parameters for NtRaiseHardError
102 //
103 #define MAXIMUM_HARDERROR_PARAMETERS 4
104
105 //
106 // Pushlock bits
107 //
108 #define EX_PUSH_LOCK_LOCK_V ((ULONG_PTR)0x0)
109 #define EX_PUSH_LOCK_LOCK ((ULONG_PTR)0x1)
110 #define EX_PUSH_LOCK_WAITING ((ULONG_PTR)0x2)
111 #define EX_PUSH_LOCK_WAKING ((ULONG_PTR)0x4)
112 #define EX_PUSH_LOCK_MULTIPLE_SHARED ((ULONG_PTR)0x8)
113 #define EX_PUSH_LOCK_SHARE_INC ((ULONG_PTR)0x10)
114 #define EX_PUSH_LOCK_PTR_BITS ((ULONG_PTR)0xf)
115
116 //
117 // Pushlock Wait Block Flags
118 //
119 #define EX_PUSH_LOCK_FLAGS_EXCLUSIVE 1
120 #define EX_PUSH_LOCK_FLAGS_WAIT 2
121
122 //
123 // Resource (ERESOURCE) Flags
124 //
125 #define ResourceHasDisabledPriorityBoost 0x08
126
127 //
128 // Shutdown types for NtShutdownSystem
129 //
130 typedef enum _SHUTDOWN_ACTION
131 {
132 ShutdownNoReboot,
133 ShutdownReboot,
134 ShutdownPowerOff
135 } SHUTDOWN_ACTION;
136
137 //
138 // Responses for NtRaiseHardError
139 //
140 typedef enum _HARDERROR_RESPONSE_OPTION
141 {
142 OptionAbortRetryIgnore,
143 OptionOk,
144 OptionOkCancel,
145 OptionRetryCancel,
146 OptionYesNo,
147 OptionYesNoCancel,
148 OptionShutdownSystem
149 } HARDERROR_RESPONSE_OPTION, *PHARDERROR_RESPONSE_OPTION;
150
151 typedef enum _HARDERROR_RESPONSE
152 {
153 ResponseReturnToCaller,
154 ResponseNotHandled,
155 ResponseAbort,
156 ResponseCancel,
157 ResponseIgnore,
158 ResponseNo,
159 ResponseOk,
160 ResponseRetry,
161 ResponseYes
162 } HARDERROR_RESPONSE, *PHARDERROR_RESPONSE;
163
164 //
165 // System Information Classes for NtQuerySystemInformation
166 //
167 typedef enum _SYSTEM_INFORMATION_CLASS
168 {
169 SystemBasicInformation,
170 SystemProcessorInformation,
171 SystemPerformanceInformation,
172 SystemTimeOfDayInformation,
173 SystemPathInformation, /// Obsolete: Use KUSER_SHARED_DATA
174 SystemProcessInformation,
175 SystemCallCountInformation,
176 SystemDeviceInformation,
177 SystemProcessorPerformanceInformation,
178 SystemFlagsInformation,
179 SystemCallTimeInformation,
180 SystemModuleInformation,
181 SystemLocksInformation,
182 SystemStackTraceInformation,
183 SystemPagedPoolInformation,
184 SystemNonPagedPoolInformation,
185 SystemHandleInformation,
186 SystemObjectInformation,
187 SystemPageFileInformation,
188 SystemVdmInstemulInformation,
189 SystemVdmBopInformation,
190 SystemFileCacheInformation,
191 SystemPoolTagInformation,
192 SystemInterruptInformation,
193 SystemDpcBehaviorInformation,
194 SystemFullMemoryInformation,
195 SystemLoadGdiDriverInformation,
196 SystemUnloadGdiDriverInformation,
197 SystemTimeAdjustmentInformation,
198 SystemSummaryMemoryInformation,
199 SystemMirrorMemoryInformation,
200 SystemPerformanceTraceInformation,
201 SystemObsolete0,
202 SystemExceptionInformation,
203 SystemCrashDumpStateInformation,
204 SystemKernelDebuggerInformation,
205 SystemContextSwitchInformation,
206 SystemRegistryQuotaInformation,
207 SystemExtendServiceTableInformation,
208 SystemPrioritySeperation,
209 SystemPlugPlayBusInformation,
210 SystemDockInformation,
211 SystemPowerInformationNative,
212 SystemProcessorSpeedInformation,
213 SystemCurrentTimeZoneInformation,
214 SystemLookasideInformation,
215 SystemTimeSlipNotification,
216 SystemSessionCreate,
217 SystemSessionDetach,
218 SystemSessionInformation,
219 SystemRangeStartInformation,
220 SystemVerifierInformation,
221 SystemAddVerifier,
222 SystemSessionProcessesInformation,
223 SystemLoadGdiDriverInSystemSpaceInformation,
224 SystemNumaProcessorMap,
225 SystemPrefetcherInformation,
226 SystemExtendedProcessInformation,
227 SystemRecommendedSharedDataAlignment,
228 SystemComPlusPackage,
229 SystemNumaAvailableMemory,
230 SystemProcessorPowerInformation,
231 SystemEmulationBasicInformation,
232 SystemEmulationProcessorInformation,
233 SystemExtendedHanfleInformation,
234 SystemLostDelayedWriteInformation,
235 SystemBigPoolInformation,
236 SystemSessionPoolTagInformation,
237 SystemSessionMappedViewInformation,
238 SystemHotpatchInformation,
239 SystemObjectSecurityMode,
240 SystemWatchDogTimerHandler,
241 SystemWatchDogTimerInformation,
242 SystemLogicalProcessorInformation,
243 SystemWo64SharedInformationObosolete,
244 SystemRegisterFirmwareTableInformationHandler,
245 SystemFirmwareTableInformation,
246 SystemModuleInformationEx,
247 SystemVerifierTriageInformation,
248 SystemSuperfetchInformation,
249 SystemMemoryListInformation,
250 SystemFileCacheInformationEx,
251 SystemThreadPriorityClientIdInformation,
252 SystemProcessorIdleCycleTimeInformation,
253 SystemVerifierCancellationInformation,
254 SystemProcessorPowerInformationEx,
255 SystemRefTraceInformation,
256 SystemSpecialPoolInformation,
257 SystemProcessIdInformation,
258 SystemErrorPortInformation,
259 SystemBootEnvironmentInformation,
260 SystemHypervisorInformation,
261 SystemVerifierInformationEx,
262 SystemTimeZoneInformation,
263 SystemImageFileExecutionOptionsInformation,
264 SystemCoverageInformation,
265 SystemPrefetchPathInformation,
266 SystemVerifierFaultsInformation,
267 MaxSystemInfoClass,
268 } SYSTEM_INFORMATION_CLASS;
269
270 //
271 // System Information Classes for NtQueryMutant
272 //
273 typedef enum _MUTANT_INFORMATION_CLASS
274 {
275 MutantBasicInformation,
276 MutantOwnerInformation
277 } MUTANT_INFORMATION_CLASS;
278
279 //
280 // System Information Classes for NtQueryAtom
281 //
282 typedef enum _ATOM_INFORMATION_CLASS
283 {
284 AtomBasicInformation,
285 AtomTableInformation,
286 } ATOM_INFORMATION_CLASS;
287
288 //
289 // System Information Classes for NtQueryTimer
290 //
291 typedef enum _TIMER_INFORMATION_CLASS
292 {
293 TimerBasicInformation
294 } TIMER_INFORMATION_CLASS;
295
296 //
297 // System Information Classes for NtQuerySemaphore
298 //
299 typedef enum _SEMAPHORE_INFORMATION_CLASS
300 {
301 SemaphoreBasicInformation
302 } SEMAPHORE_INFORMATION_CLASS;
303
304 //
305 // System Information Classes for NtQueryEvent
306 //
307 typedef enum _EVENT_INFORMATION_CLASS
308 {
309 EventBasicInformation
310 } EVENT_INFORMATION_CLASS;
311
312 #ifdef NTOS_MODE_USER
313
314 //
315 // Firmware Table Actions for SystemFirmwareTableInformation
316 //
317 typedef enum _SYSTEM_FIRMWARE_TABLE_ACTION
318 {
319 SystemFirmwareTable_Enumerate = 0,
320 SystemFirmwareTable_Get = 1,
321 } SYSTEM_FIRMWARE_TABLE_ACTION, *PSYSTEM_FIRMWARE_TABLE_ACTION;
322
323 //
324 // Firmware Handler Callback
325 //
326 struct _SYSTEM_FIRMWARE_TABLE_INFORMATION;
327 typedef
328 NTSTATUS
329 (__cdecl *PFNFTH)(
330 IN struct _SYSTEM_FIRMWARE_TABLE_INFORMATION *FirmwareTableInformation
331 );
332
333 #else
334
335 //
336 // Executive Work Queue Structures
337 //
338 typedef struct _EX_QUEUE_WORKER_INFO
339 {
340 ULONG QueueDisabled:1;
341 ULONG MakeThreadsAsNecessary:1;
342 ULONG WaitMode:1;
343 ULONG WorkerCount:29;
344 } EX_QUEUE_WORKER_INFO, *PEX_QUEUE_WORKER_INFO;
345
346 typedef struct _EX_WORK_QUEUE
347 {
348 KQUEUE WorkerQueue;
349 LONG DynamicThreadCount;
350 ULONG WorkItemsProcessed;
351 ULONG WorkItemsProcessedLastPass;
352 ULONG QueueDepthLastPass;
353 EX_QUEUE_WORKER_INFO Info;
354 } EX_WORK_QUEUE, *PEX_WORK_QUEUE;
355
356 //
357 // Executive Fast Reference Structure
358 //
359 typedef struct _EX_FAST_REF
360 {
361 union
362 {
363 PVOID Object;
364 ULONG RefCnt:3;
365 ULONG Value;
366 };
367 } EX_FAST_REF, *PEX_FAST_REF;
368
369 //
370 // Executive Cache-Aware Rundown Reference Descriptor
371 //
372 typedef struct _EX_RUNDOWN_REF_CACHE_AWARE
373 {
374 PEX_RUNDOWN_REF RunRefs;
375 PVOID PoolToFree;
376 ULONG RunRefSize;
377 ULONG Number;
378 } EX_RUNDOWN_REF_CACHE_AWARE, *PEX_RUNDOWN_REF_CACHE_AWARE;
379
380 //
381 // Executive Rundown Wait Block
382 //
383 typedef struct _EX_RUNDOWN_WAIT_BLOCK
384 {
385 ULONG_PTR Count;
386 KEVENT WakeEvent;
387 } EX_RUNDOWN_WAIT_BLOCK, *PEX_RUNDOWN_WAIT_BLOCK;
388
389 //
390 // Executive Pushlock
391 //
392 #undef EX_PUSH_LOCK
393 #undef PEX_PUSH_LOCK
394 typedef struct _EX_PUSH_LOCK
395 {
396 union
397 {
398 struct
399 {
400 ULONG_PTR Locked:1;
401 ULONG_PTR Waiting:1;
402 ULONG_PTR Waking:1;
403 ULONG_PTR MultipleShared:1;
404 ULONG_PTR Shared:sizeof (ULONG_PTR) * 8 - 4;
405 };
406 ULONG_PTR Value;
407 PVOID Ptr;
408 };
409 } EX_PUSH_LOCK, *PEX_PUSH_LOCK;
410
411 //
412 // Executive Pushlock Wait Block
413 //
414 #ifndef __GNUC__ // WARNING! PUSHLOCKS WILL NOT WORK IN GCC FOR NOW!!!
415 __declspec(align(16))
416 #endif
417 typedef struct _EX_PUSH_LOCK_WAIT_BLOCK
418 {
419 union
420 {
421 KGATE WakeGate;
422 KEVENT WakeEvent;
423 };
424 struct _EX_PUSH_LOCK_WAIT_BLOCK *Next;
425 struct _EX_PUSH_LOCK_WAIT_BLOCK *Last;
426 struct _EX_PUSH_LOCK_WAIT_BLOCK *Previous;
427 LONG ShareCount;
428 LONG Flags;
429 #if DBG
430 BOOLEAN Signaled;
431 EX_PUSH_LOCK NewValue;
432 EX_PUSH_LOCK OldValue;
433 PEX_PUSH_LOCK PushLock;
434 #endif
435 } EX_PUSH_LOCK_WAIT_BLOCK, *PEX_PUSH_LOCK_WAIT_BLOCK;
436
437 //
438 // Callback Object
439 //
440 typedef struct _CALLBACK_OBJECT
441 {
442 ULONG Name;
443 KSPIN_LOCK Lock;
444 LIST_ENTRY RegisteredCallbacks;
445 ULONG AllowMultipleCallbacks;
446 } CALLBACK_OBJECT , *PCALLBACK_OBJECT;
447
448 //
449 // Profile Object
450 //
451 typedef struct _EPROFILE
452 {
453 PEPROCESS Process;
454 PVOID RangeBase;
455 SIZE_T RangeSize;
456 PVOID Buffer;
457 ULONG BufferSize;
458 ULONG BucketSize;
459 PKPROFILE ProfileObject;
460 PVOID LockedBufferAddress;
461 PMDL Mdl;
462 ULONG Segment;
463 KPROFILE_SOURCE ProfileSource;
464 KAFFINITY Affinity;
465 } EPROFILE, *PEPROFILE;
466
467 //
468 // Handle Table Structures
469 //
470 typedef struct _HANDLE_TABLE_ENTRY_INFO
471 {
472 ULONG AuditMask;
473 } HANDLE_TABLE_ENTRY_INFO, *PHANDLE_TABLE_ENTRY_INFO;
474
475 typedef struct _HANDLE_TABLE_ENTRY
476 {
477 union
478 {
479 PVOID Object;
480 ULONG_PTR ObAttributes;
481 PHANDLE_TABLE_ENTRY_INFO InfoTable;
482 ULONG_PTR Value;
483 } u1;
484 union
485 {
486 ULONG GrantedAccess;
487 USHORT GrantedAccessIndex;
488 LONG NextFreeTableEntry;
489 } u2;
490 } HANDLE_TABLE_ENTRY, *PHANDLE_TABLE_ENTRY;
491
492 typedef struct _HANDLE_TABLE
493 {
494 ULONG Flags;
495 LONG HandleCount;
496 PHANDLE_TABLE_ENTRY **Table;
497 PEPROCESS QuotaProcess;
498 HANDLE UniqueProcessId;
499 LONG FirstFreeTableEntry;
500 LONG NextIndexNeedingPool;
501 ERESOURCE HandleTableLock;
502 LIST_ENTRY HandleTableList;
503 KEVENT HandleContentionEvent;
504 } HANDLE_TABLE, *PHANDLE_TABLE;
505
506 #endif
507
508 //
509 // Hard Error LPC Message
510 //
511 typedef struct _HARDERROR_MSG
512 {
513 PORT_MESSAGE h;
514 NTSTATUS Status;
515 LARGE_INTEGER ErrorTime;
516 ULONG ValidResponseOptions;
517 ULONG Response;
518 ULONG NumberOfParameters;
519 ULONG UnicodeStringParameterMask;
520 ULONG Parameters[MAXIMUM_HARDERROR_PARAMETERS];
521 } HARDERROR_MSG, *PHARDERROR_MSG;
522
523 //
524 // Information Structures for NtQueryMutant
525 //
526 typedef struct _MUTANT_BASIC_INFORMATION
527 {
528 LONG CurrentCount;
529 BOOLEAN OwnedByCaller;
530 BOOLEAN AbandonedState;
531 } MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
532
533 typedef struct _MUTANT_OWNER_INFORMATION
534 {
535 CLIENT_ID ClientId;
536 } MUTANT_OWNER_INFORMATION, *PMUTANT_OWNER_INFORMATION;
537
538 //
539 // Information Structures for NtQueryAtom
540 //
541 typedef struct _ATOM_BASIC_INFORMATION
542 {
543 USHORT UsageCount;
544 USHORT Flags;
545 USHORT NameLength;
546 WCHAR Name[1];
547 } ATOM_BASIC_INFORMATION, *PATOM_BASIC_INFORMATION;
548
549 typedef struct _ATOM_TABLE_INFORMATION
550 {
551 ULONG NumberOfAtoms;
552 USHORT Atoms[1];
553 } ATOM_TABLE_INFORMATION, *PATOM_TABLE_INFORMATION;
554
555 //
556 // Information Structures for NtQueryTimer
557 //
558 typedef struct _TIMER_BASIC_INFORMATION
559 {
560 LARGE_INTEGER TimeRemaining;
561 BOOLEAN SignalState;
562 } TIMER_BASIC_INFORMATION, *PTIMER_BASIC_INFORMATION;
563
564 //
565 // Information Structures for NtQuerySemaphore
566 //
567 typedef struct _SEMAPHORE_BASIC_INFORMATION
568 {
569 LONG CurrentCount;
570 LONG MaximumCount;
571 } SEMAPHORE_BASIC_INFORMATION, *PSEMAPHORE_BASIC_INFORMATION;
572
573 //
574 // Information Structures for NtQueryEvent
575 //
576 typedef struct _EVENT_BASIC_INFORMATION
577 {
578 EVENT_TYPE EventType;
579 LONG EventState;
580 } EVENT_BASIC_INFORMATION, *PEVENT_BASIC_INFORMATION;
581
582 //
583 // Information Structures for NtQuerySystemInformation
584 //
585 typedef struct _SYSTEM_BASIC_INFORMATION
586 {
587 ULONG Reserved;
588 ULONG TimerResolution;
589 ULONG PageSize;
590 ULONG NumberOfPhysicalPages;
591 ULONG LowestPhysicalPageNumber;
592 ULONG HighestPhysicalPageNumber;
593 ULONG AllocationGranularity;
594 ULONG MinimumUserModeAddress;
595 ULONG MaximumUserModeAddress;
596 KAFFINITY ActiveProcessorsAffinityMask;
597 CCHAR NumberOfProcessors;
598 } SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
599
600 // Class 1
601 typedef struct _SYSTEM_PROCESSOR_INFORMATION
602 {
603 USHORT ProcessorArchitecture;
604 USHORT ProcessorLevel;
605 USHORT ProcessorRevision;
606 USHORT Reserved;
607 ULONG ProcessorFeatureBits;
608 } SYSTEM_PROCESSOR_INFORMATION, *PSYSTEM_PROCESSOR_INFORMATION;
609
610 // Class 2
611 typedef struct _SYSTEM_PERFORMANCE_INFORMATION
612 {
613 LARGE_INTEGER IdleProcessTime;
614 LARGE_INTEGER IoReadTransferCount;
615 LARGE_INTEGER IoWriteTransferCount;
616 LARGE_INTEGER IoOtherTransferCount;
617 ULONG IoReadOperationCount;
618 ULONG IoWriteOperationCount;
619 ULONG IoOtherOperationCount;
620 ULONG AvailablePages;
621 ULONG CommittedPages;
622 ULONG CommitLimit;
623 ULONG PeakCommitment;
624 ULONG PageFaultCount;
625 ULONG CopyOnWriteCount;
626 ULONG TransitionCount;
627 ULONG CacheTransitionCount;
628 ULONG DemandZeroCount;
629 ULONG PageReadCount;
630 ULONG PageReadIoCount;
631 ULONG CacheReadCount;
632 ULONG CacheIoCount;
633 ULONG DirtyPagesWriteCount;
634 ULONG DirtyWriteIoCount;
635 ULONG MappedPagesWriteCount;
636 ULONG MappedWriteIoCount;
637 ULONG PagedPoolPages;
638 ULONG NonPagedPoolPages;
639 ULONG PagedPoolAllocs;
640 ULONG PagedPoolFrees;
641 ULONG NonPagedPoolAllocs;
642 ULONG NonPagedPoolFrees;
643 ULONG FreeSystemPtes;
644 ULONG ResidentSystemCodePage;
645 ULONG TotalSystemDriverPages;
646 ULONG TotalSystemCodePages;
647 ULONG NonPagedPoolLookasideHits;
648 ULONG PagedPoolLookasideHits;
649 ULONG Spare3Count;
650 ULONG ResidentSystemCachePage;
651 ULONG ResidentPagedPoolPage;
652 ULONG ResidentSystemDriverPage;
653 ULONG CcFastReadNoWait;
654 ULONG CcFastReadWait;
655 ULONG CcFastReadResourceMiss;
656 ULONG CcFastReadNotPossible;
657 ULONG CcFastMdlReadNoWait;
658 ULONG CcFastMdlReadWait;
659 ULONG CcFastMdlReadResourceMiss;
660 ULONG CcFastMdlReadNotPossible;
661 ULONG CcMapDataNoWait;
662 ULONG CcMapDataWait;
663 ULONG CcMapDataNoWaitMiss;
664 ULONG CcMapDataWaitMiss;
665 ULONG CcPinMappedDataCount;
666 ULONG CcPinReadNoWait;
667 ULONG CcPinReadWait;
668 ULONG CcPinReadNoWaitMiss;
669 ULONG CcPinReadWaitMiss;
670 ULONG CcCopyReadNoWait;
671 ULONG CcCopyReadWait;
672 ULONG CcCopyReadNoWaitMiss;
673 ULONG CcCopyReadWaitMiss;
674 ULONG CcMdlReadNoWait;
675 ULONG CcMdlReadWait;
676 ULONG CcMdlReadNoWaitMiss;
677 ULONG CcMdlReadWaitMiss;
678 ULONG CcReadAheadIos;
679 ULONG CcLazyWriteIos;
680 ULONG CcLazyWritePages;
681 ULONG CcDataFlushes;
682 ULONG CcDataPages;
683 ULONG ContextSwitches;
684 ULONG FirstLevelTbFills;
685 ULONG SecondLevelTbFills;
686 ULONG SystemCalls;
687 } SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;
688
689 // Class 3
690 typedef struct _SYSTEM_TIMEOFDAY_INFORMATION
691 {
692 LARGE_INTEGER BootTime;
693 LARGE_INTEGER CurrentTime;
694 LARGE_INTEGER TimeZoneBias;
695 ULONG TimeZoneId;
696 ULONG Reserved;
697 } SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION;
698
699 // Class 4
700 // This class is obsolete, please use KUSER_SHARED_DATA instead
701
702 // Class 5
703 typedef struct _SYSTEM_THREAD_INFORMATION
704 {
705 LARGE_INTEGER KernelTime;
706 LARGE_INTEGER UserTime;
707 LARGE_INTEGER CreateTime;
708 ULONG WaitTime;
709 PVOID StartAddress;
710 CLIENT_ID ClientId;
711 KPRIORITY Priority;
712 LONG BasePriority;
713 ULONG ContextSwitches;
714 ULONG ThreadState;
715 ULONG WaitReason;
716 } SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION;
717
718 typedef struct _SYSTEM_PROCESS_INFORMATION
719 {
720 ULONG NextEntryOffset;
721 ULONG NumberOfThreads;
722 LARGE_INTEGER SpareLi1;
723 LARGE_INTEGER SpareLi2;
724 LARGE_INTEGER SpareLi3;
725 LARGE_INTEGER CreateTime;
726 LARGE_INTEGER UserTime;
727 LARGE_INTEGER KernelTime;
728 UNICODE_STRING ImageName;
729 KPRIORITY BasePriority;
730 HANDLE UniqueProcessId;
731 HANDLE InheritedFromUniqueProcessId;
732 ULONG HandleCount;
733 ULONG SessionId;
734 ULONG UniqueProcessKey;
735
736 //
737 // This part corresponds to VM_COUNTERS_EX.
738 // NOTE: *NOT* THE SAME AS VM_COUNTERS!
739 //
740 ULONG PeakVirtualSize;
741 ULONG VirtualSize;
742 ULONG PageFaultCount;
743 ULONG PeakWorkingSetSize;
744 ULONG WorkingSetSize;
745 ULONG QuotaPeakPagedPoolUsage;
746 ULONG QuotaPagedPoolUsage;
747 ULONG QuotaPeakNonPagedPoolUsage;
748 ULONG QuotaNonPagedPoolUsage;
749 ULONG PagefileUsage;
750 ULONG PeakPagefileUsage;
751 ULONG PrivatePageCount;
752
753 //
754 // This part corresponds to IO_COUNTERS
755 //
756 LARGE_INTEGER ReadOperationCount;
757 LARGE_INTEGER WriteOperationCount;
758 LARGE_INTEGER OtherOperationCount;
759 LARGE_INTEGER ReadTransferCount;
760 LARGE_INTEGER WriteTransferCount;
761 LARGE_INTEGER OtherTransferCount;
762
763 //SYSTEM_THREAD_INFORMATION TH[1];
764 } SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
765
766 // Class 6
767 typedef struct _SYSTEM_CALL_COUNT_INFORMATION
768 {
769 ULONG Length;
770 ULONG NumberOfTables;
771 } SYSTEM_CALL_COUNT_INFORMATION, *PSYSTEM_CALL_COUNT_INFORMATION;
772
773 // Class 7
774 typedef struct _SYSTEM_DEVICE_INFORMATION
775 {
776 ULONG NumberOfDisks;
777 ULONG NumberOfFloppies;
778 ULONG NumberOfCdRoms;
779 ULONG NumberOfTapes;
780 ULONG NumberOfSerialPorts;
781 ULONG NumberOfParallelPorts;
782 } SYSTEM_DEVICE_INFORMATION, *PSYSTEM_DEVICE_INFORMATION;
783
784 // Class 8
785 typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
786 {
787 LARGE_INTEGER IdleTime;
788 LARGE_INTEGER KernelTime;
789 LARGE_INTEGER UserTime;
790 LARGE_INTEGER DpcTime;
791 LARGE_INTEGER InterruptTime;
792 ULONG InterruptCount;
793 } SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
794
795 // Class 9
796 typedef struct _SYSTEM_FLAGS_INFORMATION
797 {
798 ULONG Flags;
799 } SYSTEM_FLAGS_INFORMATION, *PSYSTEM_FLAGS_INFORMATION;
800
801 // Class 10
802 typedef struct _SYSTEM_CALL_TIME_INFORMATION
803 {
804 ULONG Length;
805 ULONG TotalCalls;
806 LARGE_INTEGER TimeOfCalls[1];
807 } SYSTEM_CALL_TIME_INFORMATION, *PSYSTEM_CALL_TIME_INFORMATION;
808
809 // Class 11 - See RTL_PROCESS_MODULES
810
811 // Class 12 - See RTL_PROCESS_LOCKS
812
813 // Class 13 - See RTL_PROCESS_BACKTRACES
814
815 // Class 14 - 15
816 typedef struct _SYSTEM_POOL_ENTRY
817 {
818 BOOLEAN Allocated;
819 BOOLEAN Spare0;
820 USHORT AllocatorBackTraceIndex;
821 ULONG Size;
822 union
823 {
824 UCHAR Tag[4];
825 ULONG TagUlong;
826 PVOID ProcessChargedQuota;
827 };
828 } SYSTEM_POOL_ENTRY, *PSYSTEM_POOL_ENTRY;
829
830 typedef struct _SYSTEM_POOL_INFORMATION
831 {
832 ULONG TotalSize;
833 PVOID FirstEntry;
834 USHORT EntryOverhead;
835 BOOLEAN PoolTagPresent;
836 BOOLEAN Spare0;
837 ULONG NumberOfEntries;
838 SYSTEM_POOL_ENTRY Entries[1];
839 } SYSTEM_POOL_INFORMATION, *PSYSTEM_POOL_INFORMATION;
840
841 // Class 16
842 typedef struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO
843 {
844 USHORT UniqueProcessId;
845 USHORT CreatorBackTraceIndex;
846 UCHAR ObjectTypeIndex;
847 UCHAR HandleAttributes;
848 USHORT HandleValue;
849 PVOID Object;
850 ULONG GrantedAccess;
851 } SYSTEM_HANDLE_TABLE_ENTRY_INFO, *PSYSTEM_HANDLE_TABLE_ENTRY_INFO;
852
853 typedef struct _SYSTEM_HANDLE_INFORMATION
854 {
855 ULONG NumberOfHandles;
856 SYSTEM_HANDLE_TABLE_ENTRY_INFO Handles[1];
857 } SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
858
859 // Class 17
860 typedef struct _SYSTEM_OBJECTTYPE_INFORMATION
861 {
862 ULONG NextEntryOffset;
863 ULONG NumberOfObjects;
864 ULONG NumberOfHandles;
865 ULONG TypeIndex;
866 ULONG InvalidAttributes;
867 GENERIC_MAPPING GenericMapping;
868 ULONG ValidAccessMask;
869 ULONG PoolType;
870 BOOLEAN SecurityRequired;
871 BOOLEAN WaitableObject;
872 UNICODE_STRING TypeName;
873 } SYSTEM_OBJECTTYPE_INFORMATION, *PSYSTEM_OBJECTTYPE_INFORMATION;
874
875 typedef struct _SYSTEM_OBJECT_INFORMATION
876 {
877 ULONG NextEntryOffset;
878 PVOID Object;
879 HANDLE CreatorUniqueProcess;
880 USHORT CreatorBackTraceIndex;
881 USHORT Flags;
882 LONG PointerCount;
883 LONG HandleCount;
884 ULONG PagedPoolCharge;
885 ULONG NonPagedPoolCharge;
886 HANDLE ExclusiveProcessId;
887 PVOID SecurityDescriptor;
888 OBJECT_NAME_INFORMATION NameInfo;
889 } SYSTEM_OBJECT_INFORMATION, *PSYSTEM_OBJECT_INFORMATION;
890
891 // Class 18
892 typedef struct _SYSTEM_PAGEFILE_INFORMATION
893 {
894 ULONG NextEntryOffset;
895 ULONG TotalSize;
896 ULONG TotalInUse;
897 ULONG PeakUsage;
898 UNICODE_STRING PageFileName;
899 } SYSTEM_PAGEFILE_INFORMATION, *PSYSTEM_PAGEFILE_INFORMATION;
900
901 // Class 19
902 typedef struct _SYSTEM_VDM_INSTEMUL_INFO
903 {
904 ULONG SegmentNotPresent;
905 ULONG VdmOpcode0F;
906 ULONG OpcodeESPrefix;
907 ULONG OpcodeCSPrefix;
908 ULONG OpcodeSSPrefix;
909 ULONG OpcodeDSPrefix;
910 ULONG OpcodeFSPrefix;
911 ULONG OpcodeGSPrefix;
912 ULONG OpcodeOPER32Prefix;
913 ULONG OpcodeADDR32Prefix;
914 ULONG OpcodeINSB;
915 ULONG OpcodeINSW;
916 ULONG OpcodeOUTSB;
917 ULONG OpcodeOUTSW;
918 ULONG OpcodePUSHF;
919 ULONG OpcodePOPF;
920 ULONG OpcodeINTnn;
921 ULONG OpcodeINTO;
922 ULONG OpcodeIRET;
923 ULONG OpcodeINBimm;
924 ULONG OpcodeINWimm;
925 ULONG OpcodeOUTBimm;
926 ULONG OpcodeOUTWimm ;
927 ULONG OpcodeINB;
928 ULONG OpcodeINW;
929 ULONG OpcodeOUTB;
930 ULONG OpcodeOUTW;
931 ULONG OpcodeLOCKPrefix;
932 ULONG OpcodeREPNEPrefix;
933 ULONG OpcodeREPPrefix;
934 ULONG OpcodeHLT;
935 ULONG OpcodeCLI;
936 ULONG OpcodeSTI;
937 ULONG BopCount;
938 } SYSTEM_VDM_INSTEMUL_INFO, *PSYSTEM_VDM_INSTEMUL_INFO;
939
940 // Class 20 - ULONG VDMBOPINFO
941
942 // Class 21
943 typedef struct _SYSTEM_FILECACHE_INFORMATION
944 {
945 ULONG CurrentSize;
946 ULONG PeakSize;
947 ULONG PageFaultCount;
948 ULONG MinimumWorkingSet;
949 ULONG MaximumWorkingSet;
950 ULONG CurrentSizeIncludingTransitionInPages;
951 ULONG PeakSizeIncludingTransitionInPages;
952 ULONG TransitionRePurposeCount;
953 ULONG Flags;
954 } SYSTEM_FILECACHE_INFORMATION, *PSYSTEM_FILECACHE_INFORMATION;
955
956 // Class 22
957 typedef struct _SYSTEM_POOLTAG
958 {
959 union
960 {
961 UCHAR Tag[4];
962 ULONG TagUlong;
963 };
964 ULONG PagedAllocs;
965 ULONG PagedFrees;
966 ULONG PagedUsed;
967 ULONG NonPagedAllocs;
968 ULONG NonPagedFrees;
969 ULONG NonPagedUsed;
970 } SYSTEM_POOLTAG, *PSYSTEM_POOLTAG;
971 typedef struct _SYSTEM_POOLTAG_INFORMATION
972 {
973 ULONG Count;
974 SYSTEM_POOLTAG TagInfo[1];
975 } SYSTEM_POOLTAG_INFORMATION, *PSYSTEM_POOLTAG_INFORMATION;
976
977 // Class 23
978 typedef struct _SYSTEM_INTERRUPT_INFORMATION
979 {
980 ULONG ContextSwitches;
981 ULONG DpcCount;
982 ULONG DpcRate;
983 ULONG TimeIncrement;
984 ULONG DpcBypassCount;
985 ULONG ApcBypassCount;
986 } SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION;
987
988 // Class 24
989 typedef struct _SYSTEM_DPC_BEHAVIOR_INFORMATION
990 {
991 ULONG Spare;
992 ULONG DpcQueueDepth;
993 ULONG MinimumDpcRate;
994 ULONG AdjustDpcThreshold;
995 ULONG IdealDpcRate;
996 } SYSTEM_DPC_BEHAVIOR_INFORMATION, *PSYSTEM_DPC_BEHAVIOR_INFORMATION;
997
998 // Class 25
999 typedef struct _SYSTEM_MEMORY_INFO
1000 {
1001 PUCHAR StringOffset;
1002 USHORT ValidCount;
1003 USHORT TransitionCount;
1004 USHORT ModifiedCount;
1005 USHORT PageTableCount;
1006 } SYSTEM_MEMORY_INFO, *PSYSTEM_MEMORY_INFO;
1007
1008 typedef struct _SYSTEM_MEMORY_INFORMATION
1009 {
1010 ULONG InfoSize;
1011 ULONG StringStart;
1012 SYSTEM_MEMORY_INFO Memory[1];
1013 } SYSTEM_MEMORY_INFORMATION, *PSYSTEM_MEMORY_INFORMATION;
1014
1015 // Class 26
1016 typedef struct _SYSTEM_GDI_DRIVER_INFORMATION
1017 {
1018 UNICODE_STRING DriverName;
1019 PVOID ImageAddress;
1020 PVOID SectionPointer;
1021 PVOID EntryPoint;
1022 PIMAGE_EXPORT_DIRECTORY ExportSectionPointer;
1023 ULONG ImageLength;
1024 } SYSTEM_GDI_DRIVER_INFORMATION, *PSYSTEM_GDI_DRIVER_INFORMATION;
1025
1026 // Class 27
1027 // Not an actually class, simply a PVOID to the ImageAddress
1028
1029 // Class 28
1030 typedef struct _SYSTEM_QUERY_TIME_ADJUST_INFORMATION
1031 {
1032 ULONG TimeAdjustment;
1033 ULONG TimeIncrement;
1034 BOOLEAN Enable;
1035 } SYSTEM_QUERY_TIME_ADJUST_INFORMATION, *PSYSTEM_QUERY_TIME_ADJUST_INFORMATION;
1036
1037 typedef struct _SYSTEM_SET_TIME_ADJUST_INFORMATION
1038 {
1039 ULONG TimeAdjustment;
1040 BOOLEAN Enable;
1041 } SYSTEM_SET_TIME_ADJUST_INFORMATION, *PSYSTEM_SET_TIME_ADJUST_INFORMATION;
1042
1043 // Class 29 - Same as 25
1044
1045 // FIXME: Class 30
1046
1047 // Class 31
1048 typedef struct _SYSTEM_REF_TRACE_INFORMATION
1049 {
1050 UCHAR TraceEnable;
1051 UCHAR TracePermanent;
1052 UNICODE_STRING TraceProcessName;
1053 UNICODE_STRING TracePoolTags;
1054 } SYSTEM_REF_TRACE_INFORMATION, *PSYSTEM_REF_TRACE_INFORMATION;
1055
1056 // Class 32 - OBSOLETE
1057
1058 // Class 33
1059 typedef struct _SYSTEM_EXCEPTION_INFORMATION
1060 {
1061 ULONG AlignmentFixupCount;
1062 ULONG ExceptionDispatchCount;
1063 ULONG FloatingEmulationCount;
1064 ULONG ByteWordEmulationCount;
1065 } SYSTEM_EXCEPTION_INFORMATION, *PSYSTEM_EXCEPTION_INFORMATION;
1066
1067 // Class 34
1068 typedef struct _SYSTEM_CRASH_STATE_INFORMATION
1069 {
1070 ULONG ValidCrashDump;
1071 } SYSTEM_CRASH_STATE_INFORMATION, *PSYSTEM_CRASH_STATE_INFORMATION;
1072
1073 // Class 35
1074 typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION
1075 {
1076 BOOLEAN KernelDebuggerEnabled;
1077 BOOLEAN KernelDebuggerNotPresent;
1078 } SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
1079
1080 // Class 36
1081 typedef struct _SYSTEM_CONTEXT_SWITCH_INFORMATION
1082 {
1083 ULONG ContextSwitches;
1084 ULONG FindAny;
1085 ULONG FindLast;
1086 ULONG FindIdeal;
1087 ULONG IdleAny;
1088 ULONG IdleCurrent;
1089 ULONG IdleLast;
1090 ULONG IdleIdeal;
1091 ULONG PreemptAny;
1092 ULONG PreemptCurrent;
1093 ULONG PreemptLast;
1094 ULONG SwitchToIdle;
1095 } SYSTEM_CONTEXT_SWITCH_INFORMATION, *PSYSTEM_CONTEXT_SWITCH_INFORMATION;
1096
1097 // Class 37
1098 typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION
1099 {
1100 ULONG RegistryQuotaAllowed;
1101 ULONG RegistryQuotaUsed;
1102 ULONG PagedPoolSize;
1103 } SYSTEM_REGISTRY_QUOTA_INFORMATION, *PSYSTEM_REGISTRY_QUOTA_INFORMATION;
1104
1105 // Class 38
1106 // Not a structure, simply send the UNICODE_STRING
1107
1108 // Class 39
1109 // Not a structure, simply send a ULONG containing the new separation
1110
1111 // Class 40
1112 typedef struct _SYSTEM_PLUGPLAY_BUS_INFORMATION
1113 {
1114 ULONG BusCount;
1115 PLUGPLAY_BUS_INSTANCE BusInstance[1];
1116 } SYSTEM_PLUGPLAY_BUS_INFORMATION, *PSYSTEM_PLUGPLAY_BUS_INFORMATION;
1117
1118 // Class 41
1119 typedef struct _SYSTEM_DOCK_INFORMATION
1120 {
1121 SYSTEM_DOCK_STATE DockState;
1122 INTERFACE_TYPE DeviceBusType;
1123 ULONG DeviceBusNumber;
1124 ULONG SlotNumber;
1125 } SYSTEM_DOCK_INFORMATION, *PSYSTEM_DOCK_INFORMATION;
1126
1127 // Class 42
1128 typedef struct _SYSTEM_POWER_INFORMATION_NATIVE
1129 {
1130 BOOLEAN SystemSuspendSupported;
1131 BOOLEAN SystemHibernateSupported;
1132 BOOLEAN ResumeTimerSupportsSuspend;
1133 BOOLEAN ResumeTimerSupportsHibernate;
1134 BOOLEAN LidSupported;
1135 BOOLEAN TurboSettingSupported;
1136 BOOLEAN TurboMode;
1137 BOOLEAN SystemAcOrDc;
1138 BOOLEAN PowerDownDisabled;
1139 LARGE_INTEGER SpindownDrives;
1140 } SYSTEM_POWER_INFORMATION_NATIVE, *PSYSTEM_POWER_INFORMATION_NATIVE;
1141
1142 // Class 43
1143 typedef struct _SYSTEM_LEGACY_DRIVER_INFORMATION
1144 {
1145 PNP_VETO_TYPE VetoType;
1146 UNICODE_STRING VetoDriver;
1147 // CHAR Buffer[0];
1148 } SYSTEM_LEGACY_DRIVER_INFORMATION, *PSYSTEM_LEGACY_DRIVER_INFORMATION;
1149
1150 // Class 44
1151 typedef struct _TIME_ZONE_INFORMATION RTL_TIME_ZONE_INFORMATION;
1152
1153 // Class 45
1154 typedef struct _SYSTEM_LOOKASIDE_INFORMATION
1155 {
1156 USHORT CurrentDepth;
1157 USHORT MaximumDepth;
1158 ULONG TotalAllocates;
1159 ULONG AllocateMisses;
1160 ULONG TotalFrees;
1161 ULONG FreeMisses;
1162 ULONG Type;
1163 ULONG Tag;
1164 ULONG Size;
1165 } SYSTEM_LOOKASIDE_INFORMATION, *PSYSTEM_LOOKASIDE_INFORMATION;
1166
1167 // Class 46
1168 // Not a structure. Only a HANDLE for the SlipEvent;
1169
1170 // Class 47
1171 // Not a structure. Only a ULONG for the SessionId;
1172
1173 // Class 48
1174 // Not a structure. Only a ULONG for the SessionId;
1175
1176 // FIXME: Class 49
1177
1178 // Class 50
1179 // Not a structure. Only a ULONG_PTR for the SystemRangeStart
1180
1181 // Class 51
1182 typedef struct _SYSTEM_VERIFIER_INFORMATION
1183 {
1184 ULONG NextEntryOffset;
1185 ULONG Level;
1186 UNICODE_STRING DriverName;
1187 ULONG RaiseIrqls;
1188 ULONG AcquireSpinLocks;
1189 ULONG SynchronizeExecutions;
1190 ULONG AllocationsAttempted;
1191 ULONG AllocationsSucceeded;
1192 ULONG AllocationsSucceededSpecialPool;
1193 ULONG AllocationsWithNoTag;
1194 ULONG TrimRequests;
1195 ULONG Trims;
1196 ULONG AllocationsFailed;
1197 ULONG AllocationsFailedDeliberately;
1198 ULONG Loads;
1199 ULONG Unloads;
1200 ULONG UnTrackedPool;
1201 ULONG CurrentPagedPoolAllocations;
1202 ULONG CurrentNonPagedPoolAllocations;
1203 ULONG PeakPagedPoolAllocations;
1204 ULONG PeakNonPagedPoolAllocations;
1205 ULONG PagedPoolUsageInBytes;
1206 ULONG NonPagedPoolUsageInBytes;
1207 ULONG PeakPagedPoolUsageInBytes;
1208 ULONG PeakNonPagedPoolUsageInBytes;
1209 } SYSTEM_VERIFIER_INFORMATION, *PSYSTEM_VERIFIER_INFORMATION;
1210
1211 // FIXME: Class 52
1212
1213 // Class 53
1214 typedef struct _SYSTEM_SESSION_PROCESS_INFORMATION
1215 {
1216 ULONG SessionId;
1217 ULONG SizeOfBuf;
1218 PVOID Buffer; // Same format as in SystemProcessInformation
1219 } SYSTEM_SESSION_PROCESS_INFORMATION, *PSYSTEM_SESSION_PROCESS_INFORMATION;
1220
1221 // FIXME: Class 54-97
1222
1223 //
1224 // Hotpatch flags
1225 //
1226 #define RTL_HOTPATCH_SUPPORTED_FLAG 0x01
1227 #define RTL_HOTPATCH_SWAP_OBJECT_NAMES 0x08 << 24
1228 #define RTL_HOTPATCH_SYNC_RENAME_FILES 0x10 << 24
1229 #define RTL_HOTPATCH_PATCH_USER_MODE 0x20 << 24
1230 #define RTL_HOTPATCH_REMAP_SYSTEM_DLL 0x40 << 24
1231 #define RTL_HOTPATCH_PATCH_KERNEL_MODE 0x80 << 24
1232
1233
1234 // Class 69
1235 typedef struct _SYSTEM_HOTPATCH_CODE_INFORMATION
1236 {
1237 ULONG Flags;
1238 ULONG InfoSize;
1239 union
1240 {
1241 struct
1242 {
1243 ULONG Foo;
1244 } CodeInfo;
1245 struct
1246 {
1247 USHORT NameOffset;
1248 USHORT NameLength;
1249 } KernelInfo;
1250 struct
1251 {
1252 USHORT NameOffset;
1253 USHORT NameLength;
1254 USHORT TargetNameOffset;
1255 USHORT TargetNameLength;
1256 UCHAR PatchingFinished;
1257 } UserModeInfo;
1258 struct
1259 {
1260 USHORT NameOffset;
1261 USHORT NameLength;
1262 USHORT TargetNameOffset;
1263 USHORT TargetNameLength;
1264 UCHAR PatchingFinished;
1265 NTSTATUS ReturnCode;
1266 HANDLE TargetProcess;
1267 } InjectionInfo;
1268 struct
1269 {
1270 HANDLE FileHandle1;
1271 PIO_STATUS_BLOCK IoStatusBlock1;
1272 PVOID RenameInformation1;
1273 PVOID RenameInformationLength1;
1274 HANDLE FileHandle2;
1275 PIO_STATUS_BLOCK IoStatusBlock2;
1276 PVOID RenameInformation2;
1277 PVOID RenameInformationLength2;
1278 } RenameInfo;
1279 struct
1280 {
1281 HANDLE ParentDirectory;
1282 HANDLE ObjectHandle1;
1283 HANDLE ObjectHandle2;
1284 } AtomicSwap;
1285 };
1286 } SYSTEM_HOTPATCH_CODE_INFORMATION, *PSYSTEM_HOTPATCH_CODE_INFORMATION;
1287
1288 //
1289 // Class 75
1290 //
1291 #ifdef NTOS_MODE_USER
1292 typedef struct _SYSTEM_FIRMWARE_TABLE_HANDLER
1293 {
1294 ULONG ProviderSignature;
1295 BOOLEAN Register;
1296 PFNFTH FirmwareTableHandler;
1297 PVOID DriverObject;
1298 } SYSTEM_FIRMWARE_TABLE_HANDLER, *PSYSTEM_FIRMWARE_TABLE_HANDLER;
1299
1300 //
1301 // Class 76
1302 //
1303 typedef struct _SYSTEM_FIRMWARE_TABLE_INFORMATION
1304 {
1305 ULONG ProviderSignature;
1306 SYSTEM_FIRMWARE_TABLE_ACTION Action;
1307 ULONG TableID;
1308 ULONG TableBufferLength;
1309 UCHAR TableBuffer[1];
1310 } SYSTEM_FIRMWARE_TABLE_INFORMATION, *PSYSTEM_FIRMWARE_TABLE_INFORMATION;
1311 #endif
1312 #endif