Author: akhaldi
Date: Tue Mar 16 15:15:22 2010
New Revision: 46227
URL:
http://svn.reactos.org/svn/reactos?rev=46227&view=rev
Log:
[NTDDK]
- Group related definitions
- Add PAGE_PRIORITY_INFORMATION, PROCESS_*, RATE_QUOTA_LIMIT, QUOTA_LIMITS_*,
MAX_HW_COUNTERS, THREAD_PROFILING_FLAG_DISPATCH and HARDWARE_COUNTER(_TYPE)
Modified:
branches/header-work/include/ddk/ntddk.h
Modified: branches/header-work/include/ddk/ntddk.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntddk.h…
==============================================================================
--- branches/header-work/include/ddk/ntddk.h [iso-8859-1] (original)
+++ branches/header-work/include/ddk/ntddk.h [iso-8859-1] Tue Mar 16 15:15:22 2010
@@ -1527,6 +1527,13 @@
ULONG Reserved:27;
} KEY_VIRTUALIZATION_INFORMATION, *PKEY_VIRTUALIZATION_INFORMATION;
+#define THREAD_CSWITCH_PMU_DISABLE FALSE
+#define THREAD_CSWITCH_PMU_ENABLE TRUE
+
+#define PROCESS_LUID_DOSDEVICES_ONLY 0x00000001
+
+#define PROCESS_HANDLE_TRACING_MAX_STACKS 16
+
typedef struct _NT_TIB {
struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList;
PVOID StackBase;
@@ -1659,61 +1666,127 @@
MaxThreadInfoClass
} THREADINFOCLASS;
-#define THREAD_CSWITCH_PMU_DISABLE FALSE
-#define THREAD_CSWITCH_PMU_ENABLE TRUE
-
-struct _LOADER_PARAMETER_BLOCK;
-struct _CREATE_DISK;
-struct _DRIVE_LAYOUT_INFORMATION_EX;
-struct _SET_PARTITION_INFORMATION_EX;
-
-//
-// GUID and UUID
-//
-#ifndef GUID_DEFINED
-#include <guiddef.h>
-#endif
-typedef GUID UUID;
-
-#define MAX_WOW64_SHARED_ENTRIES 16
-
-#define NX_SUPPORT_POLICY_ALWAYSOFF 0
-#define NX_SUPPORT_POLICY_ALWAYSON 1
-#define NX_SUPPORT_POLICY_OPTIN 2
-#define NX_SUPPORT_POLICY_OPTOUT 3
-
-/*
-** IRP function codes
-*/
-
-#define IRP_MN_QUERY_DIRECTORY 0x01
-#define IRP_MN_NOTIFY_CHANGE_DIRECTORY 0x02
-
-#define IRP_MN_USER_FS_REQUEST 0x00
-#define IRP_MN_MOUNT_VOLUME 0x01
-#define IRP_MN_VERIFY_VOLUME 0x02
-#define IRP_MN_LOAD_FILE_SYSTEM 0x03
-#define IRP_MN_TRACK_LINK 0x04
-#define IRP_MN_KERNEL_CALL 0x04
-
-#define IRP_MN_LOCK 0x01
-#define IRP_MN_UNLOCK_SINGLE 0x02
-#define IRP_MN_UNLOCK_ALL 0x03
-#define IRP_MN_UNLOCK_ALL_BY_KEY 0x04
-
-#define IRP_MN_FLUSH_AND_PURGE 0x01
-
-#define IRP_MN_NORMAL 0x00
-#define IRP_MN_DPC 0x01
-#define IRP_MN_MDL 0x02
-#define IRP_MN_COMPLETE 0x04
-#define IRP_MN_COMPRESSED 0x08
-
-#define IRP_MN_MDL_DPC (IRP_MN_MDL | IRP_MN_DPC)
-#define IRP_MN_COMPLETE_MDL (IRP_MN_COMPLETE | IRP_MN_MDL)
-#define IRP_MN_COMPLETE_MDL_DPC (IRP_MN_COMPLETE_MDL | IRP_MN_DPC)
-
-#define IRP_MN_QUERY_LEGACY_BUS_INFORMATION 0x18
+typedef struct _PAGE_PRIORITY_INFORMATION {
+ ULONG PagePriority;
+} PAGE_PRIORITY_INFORMATION, *PPAGE_PRIORITY_INFORMATION;
+
+typedef struct _PROCESS_WS_WATCH_INFORMATION {
+ PVOID FaultingPc;
+ PVOID FaultingVa;
+} PROCESS_WS_WATCH_INFORMATION, *PPROCESS_WS_WATCH_INFORMATION;
+
+typedef struct _PROCESS_BASIC_INFORMATION {
+ NTSTATUS ExitStatus;
+ struct _PEB *PebBaseAddress;
+ ULONG_PTR AffinityMask;
+ KPRIORITY BasePriority;
+ ULONG_PTR UniqueProcessId;
+ ULONG_PTR InheritedFromUniqueProcessId;
+} PROCESS_BASIC_INFORMATION,*PPROCESS_BASIC_INFORMATION;
+
+typedef struct _PROCESS_EXTENDED_BASIC_INFORMATION {
+ SIZE_T Size;
+ PROCESS_BASIC_INFORMATION BasicInfo;
+ union {
+ ULONG Flags;
+ struct {
+ ULONG IsProtectedProcess:1;
+ ULONG IsWow64Process:1;
+ ULONG IsProcessDeleting:1;
+ ULONG IsCrossSessionCreate:1;
+ ULONG SpareBits:28;
+ } DUMMYSTRUCTNAME;
+ } DUMMYUNIONNAME;
+} PROCESS_EXTENDED_BASIC_INFORMATION, *PPROCESS_EXTENDED_BASIC_INFORMATION;
+
+typedef struct _PROCESS_DEVICEMAP_INFORMATION {
+ __GNU_EXTENSION union {
+ struct {
+ HANDLE DirectoryHandle;
+ } Set;
+ struct {
+ ULONG DriveMap;
+ UCHAR DriveType[32];
+ } Query;
+ };
+} PROCESS_DEVICEMAP_INFORMATION, *PPROCESS_DEVICEMAP_INFORMATION;
+
+typedef struct _PROCESS_DEVICEMAP_INFORMATION_EX {
+ union {
+ struct {
+ HANDLE DirectoryHandle;
+ } Set;
+ struct {
+ ULONG DriveMap;
+ UCHAR DriveType[32];
+ } Query;
+ } DUMMYUNIONNAME;
+ ULONG Flags;
+} PROCESS_DEVICEMAP_INFORMATION_EX, *PPROCESS_DEVICEMAP_INFORMATION_EX;
+
+typedef struct _PROCESS_SESSION_INFORMATION {
+ ULONG SessionId;
+} PROCESS_SESSION_INFORMATION, *PPROCESS_SESSION_INFORMATION;
+
+typedef struct _PROCESS_HANDLE_TRACING_ENABLE {
+ ULONG Flags;
+} PROCESS_HANDLE_TRACING_ENABLE, *PPROCESS_HANDLE_TRACING_ENABLE;
+
+typedef struct _PROCESS_HANDLE_TRACING_ENABLE_EX {
+ ULONG Flags;
+ ULONG TotalSlots;
+} PROCESS_HANDLE_TRACING_ENABLE_EX, *PPROCESS_HANDLE_TRACING_ENABLE_EX;
+
+typedef struct _PROCESS_HANDLE_TRACING_ENTRY {
+ HANDLE Handle;
+ CLIENT_ID ClientId;
+ ULONG Type;
+ PVOID Stacks[PROCESS_HANDLE_TRACING_MAX_STACKS];
+} PROCESS_HANDLE_TRACING_ENTRY, *PPROCESS_HANDLE_TRACING_ENTRY;
+
+typedef struct _PROCESS_HANDLE_TRACING_QUERY {
+ HANDLE Handle;
+ ULONG TotalTraces;
+ PROCESS_HANDLE_TRACING_ENTRY HandleTrace[1];
+} PROCESS_HANDLE_TRACING_QUERY, *PPROCESS_HANDLE_TRACING_QUERY;
+
+#define QUOTA_LIMITS_HARDWS_MIN_ENABLE 0x00000001
+#define QUOTA_LIMITS_HARDWS_MIN_DISABLE 0x00000002
+#define QUOTA_LIMITS_HARDWS_MAX_ENABLE 0x00000004
+#define QUOTA_LIMITS_HARDWS_MAX_DISABLE 0x00000008
+#define QUOTA_LIMITS_USE_DEFAULT_LIMITS 0x00000010
+
+typedef struct _QUOTA_LIMITS {
+ SIZE_T PagedPoolLimit;
+ SIZE_T NonPagedPoolLimit;
+ SIZE_T MinimumWorkingSetSize;
+ SIZE_T MaximumWorkingSetSize;
+ SIZE_T PagefileLimit;
+ LARGE_INTEGER TimeLimit;
+} QUOTA_LIMITS, *PQUOTA_LIMITS;
+
+typedef union _RATE_QUOTA_LIMIT {
+ ULONG RateData;
+ struct {
+ ULONG RatePercent:7;
+ ULONG Reserved0:25;
+ } DUMMYSTRUCTNAME;
+} RATE_QUOTA_LIMIT, *PRATE_QUOTA_LIMIT;
+
+typedef struct _QUOTA_LIMITS_EX {
+ SIZE_T PagedPoolLimit;
+ SIZE_T NonPagedPoolLimit;
+ SIZE_T MinimumWorkingSetSize;
+ SIZE_T MaximumWorkingSetSize;
+ SIZE_T PagefileLimit;
+ LARGE_INTEGER TimeLimit;
+ SIZE_T WorkingSetLimit;
+ SIZE_T Reserved2;
+ SIZE_T Reserved3;
+ SIZE_T Reserved4;
+ ULONG Flags;
+ RATE_QUOTA_LIMIT CpuRateLimit;
+} QUOTA_LIMITS_EX, *PQUOTA_LIMITS_EX;
typedef struct _IO_COUNTERS {
ULONGLONG ReadOperationCount;
@@ -1738,8 +1811,7 @@
SIZE_T PeakPagefileUsage;
} VM_COUNTERS, *PVM_COUNTERS;
-typedef struct _VM_COUNTERS_EX
-{
+typedef struct _VM_COUNTERS_EX {
SIZE_T PeakVirtualSize;
SIZE_T VirtualSize;
ULONG PageFaultCount;
@@ -1754,8 +1826,21 @@
SIZE_T PrivateUsage;
} VM_COUNTERS_EX, *PVM_COUNTERS_EX;
-typedef struct _POOLED_USAGE_AND_LIMITS
-{
+#define MAX_HW_COUNTERS 16
+#define THREAD_PROFILING_FLAG_DISPATCH 0x00000001
+
+typedef enum _HARDWARE_COUNTER_TYPE {
+ PMCCounter,
+ MaxHardwareCounterType
+} HARDWARE_COUNTER_TYPE, *PHARDWARE_COUNTER_TYPE;
+
+typedef struct _HARDWARE_COUNTER {
+ HARDWARE_COUNTER_TYPE Type;
+ ULONG Reserved;
+ ULONG64 Index;
+} HARDWARE_COUNTER, *PHARDWARE_COUNTER;
+
+typedef struct _POOLED_USAGE_AND_LIMITS {
SIZE_T PeakPagedPoolUsage;
SIZE_T PagedPoolUsage;
SIZE_T PagedPoolLimit;
@@ -1766,6 +1851,100 @@
SIZE_T PagefileUsage;
SIZE_T PagefileLimit;
} POOLED_USAGE_AND_LIMITS, *PPOOLED_USAGE_AND_LIMITS;
+
+typedef struct _PROCESS_ACCESS_TOKEN {
+ HANDLE Token;
+ HANDLE Thread;
+} PROCESS_ACCESS_TOKEN, *PPROCESS_ACCESS_TOKEN;
+
+#define PROCESS_EXCEPTION_PORT_ALL_STATE_BITS 0x00000003UL
+#define PROCESS_EXCEPTION_PORT_ALL_STATE_FLAGS ((ULONG_PTR)((1UL <<
PROCESS_EXCEPTION_PORT_ALL_STATE_BITS) - 1))
+
+typedef struct _PROCESS_EXCEPTION_PORT {
+ IN HANDLE ExceptionPortHandle;
+ IN OUT ULONG StateFlags;
+} PROCESS_EXCEPTION_PORT, *PPROCESS_EXCEPTION_PORT;
+
+typedef struct _KERNEL_USER_TIMES {
+ LARGE_INTEGER CreateTime;
+ LARGE_INTEGER ExitTime;
+ LARGE_INTEGER KernelTime;
+ LARGE_INTEGER UserTime;
+} KERNEL_USER_TIMES, *PKERNEL_USER_TIMES;
+
+/* NtXxx Functions */
+
+NTSYSCALLAPI
+NTSTATUS
+NTAPI
+NtOpenProcess(
+ OUT PHANDLE ProcessHandle,
+ IN ACCESS_MASK DesiredAccess,
+ IN POBJECT_ATTRIBUTES ObjectAttributes,
+ IN PCLIENT_ID ClientId OPTIONAL);
+
+NTSYSCALLAPI
+NTSTATUS
+NTAPI
+NtQueryInformationProcess(
+ IN HANDLE ProcessHandle,
+ IN PROCESSINFOCLASS ProcessInformationClass,
+ OUT PVOID ProcessInformation OPTIONAL,
+ IN ULONG ProcessInformationLength,
+ OUT PULONG ReturnLength OPTIONAL);
+
+struct _LOADER_PARAMETER_BLOCK;
+struct _CREATE_DISK;
+struct _DRIVE_LAYOUT_INFORMATION_EX;
+struct _SET_PARTITION_INFORMATION_EX;
+
+//
+// GUID and UUID
+//
+#ifndef GUID_DEFINED
+#include <guiddef.h>
+#endif
+typedef GUID UUID;
+
+#define MAX_WOW64_SHARED_ENTRIES 16
+
+#define NX_SUPPORT_POLICY_ALWAYSOFF 0
+#define NX_SUPPORT_POLICY_ALWAYSON 1
+#define NX_SUPPORT_POLICY_OPTIN 2
+#define NX_SUPPORT_POLICY_OPTOUT 3
+
+/*
+** IRP function codes
+*/
+
+#define IRP_MN_QUERY_DIRECTORY 0x01
+#define IRP_MN_NOTIFY_CHANGE_DIRECTORY 0x02
+
+#define IRP_MN_USER_FS_REQUEST 0x00
+#define IRP_MN_MOUNT_VOLUME 0x01
+#define IRP_MN_VERIFY_VOLUME 0x02
+#define IRP_MN_LOAD_FILE_SYSTEM 0x03
+#define IRP_MN_TRACK_LINK 0x04
+#define IRP_MN_KERNEL_CALL 0x04
+
+#define IRP_MN_LOCK 0x01
+#define IRP_MN_UNLOCK_SINGLE 0x02
+#define IRP_MN_UNLOCK_ALL 0x03
+#define IRP_MN_UNLOCK_ALL_BY_KEY 0x04
+
+#define IRP_MN_FLUSH_AND_PURGE 0x01
+
+#define IRP_MN_NORMAL 0x00
+#define IRP_MN_DPC 0x01
+#define IRP_MN_MDL 0x02
+#define IRP_MN_COMPLETE 0x04
+#define IRP_MN_COMPRESSED 0x08
+
+#define IRP_MN_MDL_DPC (IRP_MN_MDL | IRP_MN_DPC)
+#define IRP_MN_COMPLETE_MDL (IRP_MN_COMPLETE | IRP_MN_MDL)
+#define IRP_MN_COMPLETE_MDL_DPC (IRP_MN_COMPLETE_MDL | IRP_MN_DPC)
+
+#define IRP_MN_QUERY_LEGACY_BUS_INFORMATION 0x18
/* DEVICE_OBJECT.Flags */
@@ -2353,48 +2532,6 @@
} IMAGE_INFO, *PIMAGE_INFO;
#define IMAGE_ADDRESSING_MODE_32BIT 3
-
-typedef struct _PROCESS_BASIC_INFORMATION {
- NTSTATUS ExitStatus;
- struct _PEB *PebBaseAddress;
- ULONG_PTR AffinityMask;
- KPRIORITY BasePriority;
- ULONG_PTR UniqueProcessId;
- ULONG_PTR InheritedFromUniqueProcessId;
-} PROCESS_BASIC_INFORMATION,*PPROCESS_BASIC_INFORMATION;
-
-typedef struct _PROCESS_WS_WATCH_INFORMATION {
- PVOID FaultingPc;
- PVOID FaultingVa;
-} PROCESS_WS_WATCH_INFORMATION, *PPROCESS_WS_WATCH_INFORMATION;
-
-typedef struct _PROCESS_DEVICEMAP_INFORMATION {
- __GNU_EXTENSION union {
- struct {
- HANDLE DirectoryHandle;
- } Set;
- struct {
- ULONG DriveMap;
- UCHAR DriveType[32];
- } Query;
- };
-} PROCESS_DEVICEMAP_INFORMATION, *PPROCESS_DEVICEMAP_INFORMATION;
-
-typedef struct _KERNEL_USER_TIMES {
- LARGE_INTEGER CreateTime;
- LARGE_INTEGER ExitTime;
- LARGE_INTEGER KernelTime;
- LARGE_INTEGER UserTime;
-} KERNEL_USER_TIMES, *PKERNEL_USER_TIMES;
-
-typedef struct _PROCESS_ACCESS_TOKEN {
- HANDLE Token;
- HANDLE Thread;
-} PROCESS_ACCESS_TOKEN, *PPROCESS_ACCESS_TOKEN;
-
-typedef struct _PROCESS_SESSION_INFORMATION {
- ULONG SessionId;
-} PROCESS_SESSION_INFORMATION, *PPROCESS_SESSION_INFORMATION;
typedef enum _IO_QUERY_DEVICE_DATA_FORMAT {
IoQueryDeviceIdentifier = 0,
@@ -3692,27 +3829,6 @@
#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */
-/* NtXxx Functions */
-
-NTSYSCALLAPI
-NTSTATUS
-NTAPI
-NtOpenProcess(
- OUT PHANDLE ProcessHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes,
- IN PCLIENT_ID ClientId OPTIONAL);
-
-NTSYSCALLAPI
-NTSTATUS
-NTAPI
-NtQueryInformationProcess(
- IN HANDLE ProcessHandle,
- IN PROCESSINFOCLASS ProcessInformationClass,
- OUT PVOID ProcessInformation OPTIONAL,
- IN ULONG ProcessInformationLength,
- OUT PULONG ReturnLength OPTIONAL);
-
/** Process manager types **/
typedef VOID