FLG macros added.
[reactos.git] / reactos / include / ddk / zwtypes.h
index 6653054..df561b6 100644 (file)
@@ -81,13 +81,34 @@ extern ULONG IMPORTED NtBuildNumber;
 #define ObjectAllInformation                   3
 #define ObjectDataInformation                  4
 
+
 // semaphore information
 
-#define SemaphoreBasicInformation              0
+typedef enum _SEMAPHORE_INFORMATION_CLASS
+{
+       SemaphoreBasicInformation               = 0
+} SEMAPHORE_INFORMATION_CLASS;
+
+typedef struct _SEMAPHORE_BASIC_INFORMATION
+{
+       LONG CurrentCount;
+       LONG MaximumCount;
+} SEMAPHORE_BASIC_INFORMATION, *PSEMAPHORE_BASIC_INFORMATION;
+
 
 // event information
 
-#define EventBasicInformation                  0
+typedef enum _EVENT_INFORMATION_CLASS
+{
+       EventBasicInformation                   = 0
+} EVENT_INFORMATION_CLASS;
+
+typedef struct _EVENT_BASIC_INFORMATION
+{
+       EVENT_TYPE EventType;
+       LONG EventState;
+} EVENT_BASIC_INFORMATION, *PEVENT_BASIC_INFORMATION;
+
 
 // system information
 // {Nt|Zw}{Query|Set}SystemInformation
@@ -99,48 +120,48 @@ enum _SYSTEM_INFORMATION_CLASS
        SystemBasicInformation                  = 0,    /* Q */
        SystemProcessorInformation              = 1,    /* Q */
        SystemPerformanceInformation            = 2,    /* Q */
-       SystemTimeInformation                   = 3,    /* Q */
-       SystemPathInformation                   = 4,
+       SystemTimeOfDayInformation              = 3,    /* Q */
+       SystemPathInformation                   = 4,    /* Q (checked build only) */
        SystemProcessInformation                = 5,    /* Q */
-       SystemServiceDescriptorTableInfo        = 6,    /* Q */
-       SystemIoConfigInformation               = 7,    /* Q */
-       SystemProcessorTimeInformation          = 8,    /* Q */
-       SystemNtGlobalFlagInformation           = 9,    /* QS */
-       SystemInformation10                     = 10,
+       SystemCallCountInfoInformation          = 6,    /* Q */
+       SystemDeviceInformation                 = 7,    /* Q */
+       SystemProcessorPerformanceInformation   = 8,    /* Q */
+       SystemFlagsInformation                  = 9,    /* QS */
+       SystemCallTimeInformation               = 10,
        SystemModuleInformation                 = 11,   /* Q */
-       SystemResourceLockInformation           = 12,   /* Q */
-       SystemInformation13                     = 13,
-       SystemInformation14                     = 14,
-       SystemInformation15                     = 15,
+       SystemLocksInformation                  = 12,   /* Q */
+       SystemStackTraceInformation             = 13,
+       SystemPagedPoolInformation              = 14,
+       SystemNonPagedPoolInformation           = 15,
        SystemHandleInformation                 = 16,   /* Q */
        SystemObjectInformation                 = 17,   /* Q */
        SystemPageFileInformation               = 18,   /* Q */
-       SystemInstructionEmulationInfo          = 19,   /* Q */
-       SystemInformation20                     = 20,
-       SystemCacheInformation                  = 21,   /* QS */
+       SystemVdmInstemulInformation            = 19,   /* Q */
+       SystemVdmBopInformation                 = 20,
+       SystemFileCacheInformation              = 21,   /* QS */
        SystemPoolTagInformation                = 22,   /* Q (checked build only) */
-       SystemProcessorScheduleInfo             = 23,   /* Q */
-       SystemDpcInformation                    = 24,   /* QS */
-       SystemInformation25                     = 25,
-       SystemLoadImage                         = 26,   /* S (callable) */
-       SystemUnloadImage                       = 27,   /* S (callable) */
+       SystemInterruptInformation              = 23,   /* Q */
+       SystemDpcBehaviourInformation           = 24,   /* QS */
+       SystemFullMemoryInformation             = 25,
+       SystemLoadGdiDriverInformation          = 26,   /* S (callable) */
+       SystemUnloadGdiDriverInformation        = 27,   /* S (callable) */
        SystemTimeAdjustmentInformation         = 28,   /* QS */
-       SystemInformation29                     = 29,
-       SystemInformation30                     = 30,
-       SystemInformation31                     = 31,
-       SystemCrashDumpSectionInfo              = 32,   /* Q */
-       SystemProcessorFaultCountInfo           = 33,   /* Q */
-       SystemCrashDumpStateInfo                = 34,   /* Q */
-       SystemDebuggerInformation               = 35,   /* Q */
-       SystemThreadSwitchCountersInfo          = 36,   /* Q */
-       SystemQuotaInformation                  = 37,   /* QS */
-       SystemLoadDriver                        = 38,   /* S */
-       SystemPrioritySeparationInfo            = 39,   /* S */
-       SystemInformation40                     = 40,
-       SystemInformation41                     = 41,
-       SystemInformation42                     = 42,
-       SystemInformation43                     = 43,
-       SystemTimeZoneInformation               = 44,   /* QS */
+       SystemSummryMemoryInformation           = 29,
+       SystemNextEventIdInformation            = 30,
+       SystemEventIdsInformation               = 31,
+       SystemCrashDumpInformation              = 32,   /* Q */
+       SystemExceptionInformation              = 33,   /* Q */
+       SystemCrashDumpStateInformation         = 34,   /* Q */
+       SystemKernelDebuggerInformation         = 35,   /* Q */
+       SystemContextSwitchInformation          = 36,   /* Q */
+       SystemRegistryQuotaInformation          = 37,   /* QS */
+       SystemExtendServiceTableInformation     = 38,   /* S */
+       SystemPrioritySeperation                = 39,   /* S */
+       SystemPlugPlayBusInformation            = 40,
+       SystemDockInformation                   = 41,
+       SystemPowerInformation                  = 42,
+       SystemProcessorSpeedInformation         = 43,
+       SystemCurrentTimeZoneInformation        = 44,   /* QS */
        SystemLookasideInformation              = 45,   /* Q */
        SystemInformationClassMax
 
@@ -150,62 +171,60 @@ enum _SYSTEM_INFORMATION_CLASS
 typedef
 struct _SYSTEM_BASIC_INFORMATION
 {
-       DWORD   AlwaysZero;
-       ULONG   KeMaximumIncrement;
-       ULONG   MmPageSize;
-       ULONG   MmNumberOfPhysicalPages;
-       ULONG   MmLowestPhysicalPage;
-       ULONG   MmHighestPhysicalPage;
-       PVOID   MmLowestUserAddress;
-       PVOID   MmLowestUserAddress1;
-       PVOID   MmHighestUserAddress;
-       DWORD   KeActiveProcessors;
-       USHORT  KeNumberProcessors;
-       
+       ULONG           Reserved;
+       ULONG           TimerResolution;
+       ULONG           PageSize;
+       ULONG           NumberOfPhysicalPages;
+       ULONG           LowestPhysicalPageNumber;
+       ULONG           HighestPhysicalPageNumber;
+       ULONG           AllocationGranularity;
+       ULONG           MinimumUserModeAddress;
+       ULONG           MaximumUserModeAddress;
+       KAFFINITY       ActiveProcessorsAffinityMask;
+       CCHAR           NumberOfProcessors;
 } SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
 
 // SystemProcessorInformation (1)
 typedef
 struct _SYSTEM_PROCESSOR_INFORMATION
 {
-       USHORT  KeProcessorArchitecture;
-       USHORT  KeProcessorLevel;
-       USHORT  KeProcessorRevision;
-       USHORT  AlwaysZero;
-       DWORD   KeFeatureBits;
-
+       USHORT  ProcessorArchitecture;
+       USHORT  ProcessorLevel;
+       USHORT  ProcessorRevision;
+       USHORT  Reserved;
+       ULONG   ProcessorFeatureBits;
 } SYSTEM_PROCESSOR_INFORMATION, *PSYSTEM_PROCESSOR_INFORMATION;
 
 // SystemPerformanceInfo (2)
 typedef
-struct _SYSTEM_PERFORMANCE_INFO
+struct _SYSTEM_PERFORMANCE_INFORMATION
 {
-       LARGE_INTEGER   TotalProcessorTime;
+       LARGE_INTEGER   IdleProcessorTime;
        LARGE_INTEGER   IoReadTransferCount;
        LARGE_INTEGER   IoWriteTransferCount;
        LARGE_INTEGER   IoOtherTransferCount;
        ULONG           IoReadOperationCount;
        ULONG           IoWriteOperationCount;
        ULONG           IoOtherOperationCount;
-       ULONG           MmAvailablePages;
-       ULONG           MmTotalCommitedPages;
-       ULONG           MmTotalCommitLimit;
-       ULONG           MmPeakLimit;
-       ULONG           PageFaults;
-       ULONG           WriteCopies;
-       ULONG           TransitionFaults;
-       ULONG           Unknown1;
-       ULONG           DemandZeroFaults;
-       ULONG           PagesInput;
-       ULONG           PagesRead;
-       ULONG           Unknown2;
-       ULONG           Unknown3;
-       ULONG           PagesOutput;
-       ULONG           PageWrites;
-       ULONG           Unknown4;
-       ULONG           Unknown5;
-       ULONG           PoolPagedBytes;
-       ULONG           PoolNonPagedBytes;
+       ULONG           AvailablePages;
+       ULONG           CommitedPages;
+       ULONG           CommitLimit;
+       ULONG           PeakCommitment;
+       ULONG           PageFaultCount;
+       ULONG           CopyOnWriteCount;
+       ULONG           TransitionCount;
+       ULONG           CacheTransitionCount;
+       ULONG           DemandZeroCount;
+       ULONG           PageReadCount;
+       ULONG           PageReadIoCount;
+       ULONG           CacheReadCount;
+       ULONG           CacheIoCount;
+       ULONG           DirtyPagesWriteCount;
+       ULONG           DirtyWriteIoCount;
+       ULONG           MappedPagesWriteCount;
+       ULONG           MappedWriteIoCount;
+       ULONG           PagedPoolPages;
+       ULONG           NonPagedPoolPages;
        ULONG           Unknown6;
        ULONG           Unknown7;
        ULONG           Unknown8;
@@ -257,17 +276,16 @@ struct _SYSTEM_PERFORMANCE_INFO
 
 } SYSTEM_PERFORMANCE_INFO, *PSYSTEM_PERFORMANCE_INFO;
 
-// SystemTimeInformation (3)
+// SystemTimeOfDayInformation (3)
 typedef
-struct _SYSTEM_TIME_INFORMATION
+struct _SYSTEM_TIMEOFDAY_INFORMATION
 {
-       TIME    KeBootTime;
-       TIME    KeSystemTime;
-       TIME    ExpTimeZoneBias;
-       ULONG   ExpTimeZoneId;
-       ULONG   Unused;
-       
-} SYSTEM_TIME_INFORMATION, *PSYSTEM_TIME_INFORMATION;
+       LARGE_INTEGER   BootTime;
+       LARGE_INTEGER   CurrentTime;
+       LARGE_INTEGER   TimeZoneBias;
+       ULONG           TimeZoneId;
+       ULONG           Reserved;
+} SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION;
 
 // SystemPathInformation (4)
 // IT DOES NOT WORK
@@ -278,7 +296,7 @@ struct _SYSTEM_PATH_INFORMATION
 
 } SYSTEM_PATH_INFORMATION, * PSYSTEM_PATH_INFORMATION;
 
-// SystemProcessThreadInfo (5)
+// SystemProcessInformation (5)
 typedef
 struct _SYSTEM_THREAD_INFORMATION
 {
@@ -327,7 +345,7 @@ struct SYSTEM_PROCESS_INFORMATION
        
 } SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
 
-// SystemServiceDescriptorTableInfo (6)
+// SystemCallCountInformation (6)
 typedef
 struct _SYSTEM_SDT_INFORMATION
 {
@@ -338,20 +356,19 @@ struct _SYSTEM_SDT_INFORMATION
 
 } SYSTEM_SDT_INFORMATION, *PSYSTEM_SDT_INFORMATION;
 
-// SystemIoConfigInformation (7)
+// SystemDeviceInformation (7)
 typedef
-struct _SYSTEM_IOCONFIG_INFORMATION
-{
-       ULONG   DiskCount;
-       ULONG   FloppyCount;
-       ULONG   CdRomCount;
-       ULONG   TapeCount;
-       ULONG   SerialCount;
-       ULONG   ParallelCount;
-       
-} SYSTEM_IOCONFIG_INFORMATION, *PSYSTEM_IOCONFIG_INFORMATION;
-
-// SystemProcessorTimeInformation (8)
+struct _SYSTEM_DEVICE_INFORMATION
+{
+       ULONG   NumberOfDisks;
+       ULONG   NumberOfFloppies;
+       ULONG   NumberOfCdRoms;
+       ULONG   NumberOfTapes;
+       ULONG   NumberOfSerialPorts;
+       ULONG   NumberOfParallelPorts;
+} SYSTEM_DEVICE_INFORMATION, *PSYSTEM_DEVICE_INFORMATION;
+
+// SystemProcessorPerformanceInformation (8)
 typedef
 struct _SYSTEM_PROCESSORTIME_INFO
 {
@@ -362,18 +379,51 @@ struct _SYSTEM_PROCESSORTIME_INFO
        TIME    TotalInterruptTime;
        ULONG   TotalInterrupts;
        ULONG   Unused;
-       
+
 } SYSTEM_PROCESSORTIME_INFO, *PSYSTEM_PROCESSORTIME_INFO;
 
-// SystemNtGlobalFlagInformation (9)
+// SystemFlagsInformation (9)
 typedef
-struct _SYSTEM_GLOBAL_FLAG_INFO
+struct _SYSTEM_FLAGS_INFORMATION
 {
-       ULONG   NtGlobalFlag;
-
-} SYSTEM_GLOBAL_FLAG_INFO, * PSYSTEM_GLOBAL_FLAG_INFO;
-
-// SystemInformation10 (10)
+       ULONG   Flags;
+
+} SYSTEM_FLAGS_INFORMATION, * PSYSTEM_FLAGS_INFORMATION;
+
+#define FLG_STOP_ON_EXCEPTION          0x00000001
+#define FLG_SHOW_LDR_SNAPS             0x00000002
+#define FLG_DEBUG_INITIAL_COMMAND      0x00000004
+#define FLG_STOP_ON_HANG_GUI           0x00000008
+#define FLG_HEAP_ENABLE_TAIL_CHECK     0x00000010
+#define FLG_HEAP_ENABLE_FREE_CHECK     0x00000020
+#define FLG_HEAP_VALIDATE_PARAMETERS   0x00000040
+#define FLG_HEAP_VALIDATE_ALL          0x00000080
+#define FLG_POOL_ENABLE_TAIL_CHECK     0x00000100
+#define FLG_POOL_ENABLE_FREE_CHECK     0x00000200
+#define FLG_POOL_ENABLE_TAGGING                0x00000400
+#define FLG_HEAP_ENABLE_TAGGING                0x00000800
+#define FLG_USER_STACK_TRACE_DB                0x00001000
+#define FLG_KERNEL_STACK_TRACE_DB      0x00002000
+#define FLG_MAINTAIN_OBJECT_TYPELIST   0x00004000
+#define FLG_HEAP_ENABLE_TAG_BY_DLL     0x00008000
+#define FLG_IGNORE_DEBUG_PRIV          0x00010000
+#define FLG_ENABLE_CSRDEBUG            0x00020000
+#define FLG_ENABLE_KDEBUG_SYMBOL_LOAD  0x00040000
+#define FLG_DISABLE_PAGE_KERNEL_STACKS 0x00080000
+#define FLG_HEAP_ENABLE_CALL_TRACING   0x00100000
+#define FLG_HEAP_DISABLE_COALESCING    0x00200000
+#define FLG_ENABLE_CLOSE_EXCEPTION     0x00400000
+#define FLG_ENABLE_EXCEPTION_LOGGING   0x00800000
+#define FLG_UNKNOWN_01000000           0x01000000
+#define FLG_UNKNOWN_02000000           0x02000000
+#define FLG_UNKNOWN_04000000           0x04000000
+#define FLG_ENABLE_DBGPRINT_BUFFERING  0x08000000
+#define FLG_UNKNOWN_10000000           0x10000000
+#define FLG_UNKNOWN_20000000           0x20000000
+#define FLG_UNKNOWN_40000000           0x40000000
+#define FLG_UNKNOWN_80000000           0x80000000
+
+// SystemCallTimeInformation (10)
 // UNKNOWN
 
 // SystemModuleInformation (11)
@@ -400,7 +450,7 @@ struct _SYSTEM_MODULE_INFORMATION
        
 } SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
 
-// SystemResourceLockInformation (12)
+// SystemLocksInformation (12)
 typedef
 struct _SYSTEM_RESOURCE_LOCK_ENTRY
 {
@@ -558,7 +608,7 @@ struct _SYSTEM_POOL_TAG_INFO
 {
        ULONG                   Count;
        SYSTEM_POOL_TAG_ENTRY   PoolEntry [1];
-    
+
 } SYSTEM_POOL_TAG_INFO, *PSYSTEM_POOL_TAG_INFO;
 
 // SystemProcessorScheduleInfo (23)
@@ -589,26 +639,17 @@ struct _SYSTEM_DPC_INFORMATION
 // SystemInformation25 (25)
 // UNKNOWN
 
-// SystemLoadImage (26)
-typedef
-struct _SYSTEM_IMAGE_LOAD
+// SystemLoadGdiDriverInformation (26)
+// SystemUnloadGdiDriverInformation (27)
+typedef struct _SYSTEM_GDI_DRIVER_INFORMATION
 {
-       UNICODE_STRING  ModuleFileName          IN;
-       PVOID           BaseAddress             OUT;
-       PVOID           Section                 OUT;
-       PVOID           EntryPoint              OUT;
-       PVOID           ExportDirectory         OUT;
-       
-} SYSTEM_IMAGE_LOAD, *PSYSTEM_IMAGE_LOAD;
-
-// SystemUnloadImage (27)
-typedef
-struct _SYSTEM_IMAGE_UNLOAD
-{
-       PVOID   Section IN; /* see SYSTEM_IMAGE_LOAD.ModuleSection */
-
-} SYSTEM_IMAGE_UNLOAD, *PSYSTEM_IMAGE_UNLOAD;
-
+       UNICODE_STRING          DriverName;
+       PVOID                   ImageAddress;
+       PVOID                   SectionPointer;
+       PVOID                   EntryPoint;
+//     PIMAGE_EXPORT_DIRECTORY ExportSectionPointer;
+       PVOID                   ExportSectionPointer;
+} SYSTEM_GDI_DRIVER_INFORMATION, *PSYSTEM_GDI_DRIVER_INFORMATION;
 
 // SystemTimeAdjustmentInformation (28)
 // (what is the right one?)
@@ -675,7 +716,16 @@ struct _SYSTEM_DRIVER_LOAD
        
 } SYSTEM_DRIVER_LOAD, *PSYSTEM_DRIVER_LOAD;
 
+// SystemTimeZoneInformation (44)
+// typedef
+struct _SYSTEM_TIME_ZONE_INFORMATION
+{
+       LONG            Bias;
+       WCHAR           StandardName [32];
+       SYSTEMTIME      StandardDate;
+       LONG            StandardBias;
 
+} SYSTEM_TIME_ZONE_INFORMATION, * PSYSTEM_TIME_ZONE_INFORMATION;
 
 // memory information
 
@@ -874,7 +924,7 @@ typedef struct _FILE_ALIGNMENT_INFORMATION
 
 typedef struct _FILE_DISPOSITION_INFORMATION
 {
-       BOOLEAN DeleteFile;
+       BOOLEAN DoDeleteFile;
 } FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
 
 typedef struct _FILE_END_OF_FILE_INFORMATION
@@ -1183,21 +1233,6 @@ typedef struct _MOVEFILE_DESCRIPTOR
 } MOVEFILE_DESCRIPTOR, *PMOVEFILE_DESCRIPTOR;
 
 
-// semaphore information
-
-typedef struct _SEMAPHORE_BASIC_INFORMATION
-{
-       ULONG CurrentCount;
-       ULONG MaximumCount;
-} SEMAPHORE_BASIC_INFORMATION, *PSEMAPHORE_BASIC_INFORMATION;
-
-// event information
-
-typedef struct _EVENT_BASIC_INFORMATION
-{
-       BOOL AutomaticReset;
-       BOOL Signaled;
-} EVENT_BASIC_INFORMATION, *PEVENT_INFORMATION;
 
 //typedef enum _TIMER_TYPE 
 //{