ReactOS  0.4.13-dev-73-gcfe54aa
pstypes.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Process Manager Types *
3  ******************************************************************************/
5 
6 #define QUOTA_LIMITS_HARDWS_MIN_ENABLE 0x00000001
7 #define QUOTA_LIMITS_HARDWS_MIN_DISABLE 0x00000002
8 #define QUOTA_LIMITS_HARDWS_MAX_ENABLE 0x00000004
9 #define QUOTA_LIMITS_HARDWS_MAX_DISABLE 0x00000008
10 #define QUOTA_LIMITS_USE_DEFAULT_LIMITS 0x00000010
11 
12 /* Thread Access Rights */
13 #define THREAD_TERMINATE 0x0001
14 #define THREAD_SUSPEND_RESUME 0x0002
15 #define THREAD_ALERT 0x0004
16 #define THREAD_GET_CONTEXT 0x0008
17 #define THREAD_SET_CONTEXT 0x0010
18 #define THREAD_SET_INFORMATION 0x0020
19 #define THREAD_SET_LIMITED_INFORMATION 0x0400
20 #define THREAD_QUERY_LIMITED_INFORMATION 0x0800
21 
22 #define PROCESS_DUP_HANDLE (0x0040)
23 
24 #if (NTDDI_VERSION >= NTDDI_VISTA)
25 #define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xFFFF)
26 #else
27 #define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xFFF)
28 #endif
29 
30 #if (NTDDI_VERSION >= NTDDI_VISTA)
31 #define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xFFFF)
32 #else
33 #define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3FF)
34 #endif
35 
36 #define LOW_PRIORITY 0
37 #define LOW_REALTIME_PRIORITY 16
38 #define HIGH_PRIORITY 31
39 #define MAXIMUM_PRIORITY 32
40 
42 $if (_NTDDK_)
43 
44 #define QUOTA_LIMITS_HARDWS_MIN_ENABLE 0x00000001
45 #define QUOTA_LIMITS_HARDWS_MIN_DISABLE 0x00000002
46 #define QUOTA_LIMITS_HARDWS_MAX_ENABLE 0x00000004
47 #define QUOTA_LIMITS_HARDWS_MAX_DISABLE 0x00000008
48 #define QUOTA_LIMITS_USE_DEFAULT_LIMITS 0x00000010
49 
50 typedef struct _QUOTA_LIMITS {
58 
59 typedef union _RATE_QUOTA_LIMIT {
61  _ANONYMOUS_STRUCT struct {
66 
67 typedef struct _QUOTA_LIMITS_EX {
81 
82 typedef struct _IO_COUNTERS {
90 
91 typedef struct _VM_COUNTERS {
104 
105 typedef struct _VM_COUNTERS_EX {
119 
120 #define MAX_HW_COUNTERS 16
121 #define THREAD_PROFILING_FLAG_DISPATCH 0x00000001
122 
127 
128 typedef struct _HARDWARE_COUNTER {
133 
134 typedef struct _POOLED_USAGE_AND_LIMITS {
145 
146 typedef struct _PROCESS_ACCESS_TOKEN {
150 
151 #define PROCESS_EXCEPTION_PORT_ALL_STATE_BITS 0x00000003UL
152 #define PROCESS_EXCEPTION_PORT_ALL_STATE_FLAGS ((ULONG_PTR)((1UL << PROCESS_EXCEPTION_PORT_ALL_STATE_BITS) - 1))
153 
154 typedef struct _PROCESS_EXCEPTION_PORT {
158 
159 typedef VOID
161  _In_ HANDLE ParentId,
164 
165 typedef struct _PS_CREATE_NOTIFY_INFO {
167  _ANONYMOUS_UNION union {
169  _ANONYMOUS_STRUCT struct {
172  } DUMMYSTRUCTNAME;
173  } DUMMYUNIONNAME;
176  _Inout_ struct _FILE_OBJECT *FileObject;
181 
182 typedef VOID
187 
188 typedef VOID
191  _In_ HANDLE ThreadId,
193 
194 #define IMAGE_ADDRESSING_MODE_32BIT 3
195 
196 typedef struct _IMAGE_INFO {
197  _ANONYMOUS_UNION union {
199  _ANONYMOUS_STRUCT struct {
205  } DUMMYSTRUCTNAME;
206  } DUMMYUNIONNAME;
212 
213 typedef struct _IMAGE_INFO_EX {
216  struct _FILE_OBJECT *FileObject;
218 
219 typedef VOID
221  _In_ PUNICODE_STRING FullImageName,
223  _In_ PIMAGE_INFO ImageInfo);
224 
225 #define THREAD_CSWITCH_PMU_DISABLE FALSE
226 #define THREAD_CSWITCH_PMU_ENABLE TRUE
227 
228 #define PROCESS_LUID_DOSDEVICES_ONLY 0x00000001
229 
230 #define PROCESS_HANDLE_TRACING_MAX_STACKS 16
231 
232 typedef enum _PROCESSINFOCLASS {
286 
287 typedef enum _THREADINFOCLASS {
324 
328 
333 
334 typedef struct _PROCESS_BASIC_INFORMATION {
342 
346  _ANONYMOUS_UNION union {
348  _ANONYMOUS_STRUCT struct {
354  } DUMMYSTRUCTNAME;
355  } DUMMYUNIONNAME;
357 
359  _ANONYMOUS_UNION union {
360  struct {
362  } Set;
363  struct {
366  } Query;
367  } DUMMYUNIONNAME;
369 
371  _ANONYMOUS_UNION union {
372  struct {
374  } Set;
375  struct {
378  } Query;
379  } DUMMYUNIONNAME;
382 
386 
390 
395 
402 
408 
410 
411 $endif (_NTDDK_)
412 
struct _PROCESS_EXTENDED_BASIC_INFORMATION * PPROCESS_EXTENDED_BASIC_INFORMATION
LARGE_INTEGER TimeLimit
Definition: lsa.idl:292
SIZE_T PeakWorkingSetSize
Definition: pstypes.h:95
ULONGLONG OtherOperationCount
Definition: pstypes.h:85
struct _VM_COUNTERS_EX * PVM_COUNTERS_EX
INT64 NonPagedPoolLimit
Definition: lsa.idl:288
_ANONYMOUS_UNION union _PROCESS_DEVICEMAP_INFORMATION::@3772 DUMMYUNIONNAME
struct _FILE_OBJECT * FileObject
Definition: pstypes.h:216
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ProcessId
Definition: fatprocs.h:2697
ULONG PageFaultCount
Definition: pstypes.h:108
_In_ PCUNICODE_STRING ImageFileName
Definition: pstypes.h:177
SIZE_T QuotaPeakPagedPoolUsage
Definition: pstypes.h:97
struct _HARDWARE_COUNTER HARDWARE_COUNTER
INT64 PagefileLimit
Definition: lsa.idl:291
SIZE_T QuotaPagedPoolUsage
Definition: pstypes.h:98
ULONG ImageAddressingMode
Definition: pstypes.h:200
SIZE_T Reserved2
Definition: pstypes.h:75
SIZE_T WorkingSetSize
Definition: pstypes.h:96
_In_ SIZE_T Size
Definition: pstypes.h:166
struct _PROCESS_HANDLE_TRACING_ENABLE_EX * PPROCESS_HANDLE_TRACING_ENABLE_EX
ULONG Reserved
Definition: pstypes.h:204
VOID(NTAPI * PCREATE_THREAD_NOTIFY_ROUTINE)(_In_ HANDLE ProcessId, _In_ HANDLE ThreadId, _In_ BOOLEAN Create)
Definition: pstypes.h:189
ULONG ImageSelector
Definition: pstypes.h:208
#define _ANONYMOUS_UNION
Definition: ntbasedef.h:30
_In_ BOOLEAN Create
Definition: pstypes.h:511
PVOID ImageBase
Definition: pstypes.h:207
SIZE_T PeakPagefileUsage
Definition: pstypes.h:116
SIZE_T ImageSize
Definition: pstypes.h:209
LONG NTSTATUS
Definition: precomp.h:26
struct _PROCESS_DEVICEMAP_INFORMATION PROCESS_DEVICEMAP_INFORMATION
struct _PROCESS_ACCESS_TOKEN * PPROCESS_ACCESS_TOKEN
HARDWARE_COUNTER_TYPE Type
Definition: pstypes.h:129
SIZE_T PagedPoolLimit
Definition: pstypes.h:68
ULONGLONG WriteOperationCount
Definition: pstypes.h:84
struct _POOLED_USAGE_AND_LIMITS POOLED_USAGE_AND_LIMITS
struct _IMAGE_INFO_EX * PIMAGE_INFO_EX
SIZE_T PeakVirtualSize
Definition: pstypes.h:92
#define _WDMDDK_
Definition: wdm.template.h:26
_ANONYMOUS_STRUCT struct _PROCESS_EXTENDED_BASIC_INFORMATION::@3770::@3771 DUMMYSTRUCTNAME
SIZE_T WorkingSetSize
Definition: pstypes.h:110
struct _PROCESS_DEVICEMAP_INFORMATION * PPROCESS_DEVICEMAP_INFORMATION
SIZE_T QuotaNonPagedPoolUsage
Definition: pstypes.h:114
_ANONYMOUS_UNION union _PROCESS_EXTENDED_BASIC_INFORMATION::@3770 DUMMYUNIONNAME
struct _PROCESS_EXCEPTION_PORT PROCESS_EXCEPTION_PORT
_In_ ULONG Reserved
Definition: pstypes.h:171
struct _PROCESS_HANDLE_TRACING_QUERY * PPROCESS_HANDLE_TRACING_QUERY
ULONG Type
Definition: pstypes.h:399
_HARDWARE_COUNTER_TYPE
Definition: pstypes.h:123
struct _IMAGE_INFO_EX IMAGE_INFO_EX
_In_ HANDLE ExceptionPortHandle
Definition: pstypes.h:155
LONG KPRIORITY
Definition: compat.h:454
#define _In_opt_
Definition: no_sal2.h:213
_ANONYMOUS_UNION union _PS_CREATE_NOTIFY_INFO::@3766 DUMMYUNIONNAME
uint32_t ULONG_PTR
Definition: typedefs.h:63
ULONG ImageMappedToAllPids
Definition: pstypes.h:202
_In_ ULONG FileOpenNameAvailable
Definition: pstypes.h:170
SIZE_T PeakNonPagedPoolUsage
Definition: pstypes.h:138
union _RATE_QUOTA_LIMIT RATE_QUOTA_LIMIT
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
struct _QUOTA_LIMITS_EX * PQUOTA_LIMITS_EX
enum _HARDWARE_COUNTER_TYPE * PHARDWARE_COUNTER_TYPE
SIZE_T QuotaPeakNonPagedPoolUsage
Definition: pstypes.h:113
VOID(NTAPI * PLOAD_IMAGE_NOTIFY_ROUTINE)(_In_ PUNICODE_STRING FullImageName, _In_ HANDLE ProcessId, _In_ PIMAGE_INFO ImageInfo)
Definition: pstypes.h:220
struct _IMAGE_INFO IMAGE_INFO
INT64 PagedPoolLimit
Definition: lsa.idl:287
SIZE_T PeakVirtualSize
Definition: pstypes.h:106
SIZE_T PeakPagefileUsage
Definition: pstypes.h:102
enum _PROCESSINFOCLASS PROCESSINFOCLASS
struct _PROCESS_ACCESS_TOKEN PROCESS_ACCESS_TOKEN
unsigned char BOOLEAN
_ANONYMOUS_STRUCT struct _IMAGE_INFO::@3768::@3769 DUMMYSTRUCTNAME
VOID(NTAPI * PCREATE_PROCESS_NOTIFY_ROUTINE_EX)(_Inout_ PEPROCESS Process, _In_ HANDLE ProcessId, _Inout_opt_ PPS_CREATE_NOTIFY_INFO CreateInfo)
Definition: pstypes.h:183
struct _PROCESS_EXTENDED_BASIC_INFORMATION PROCESS_EXTENDED_BASIC_INFORMATION
SIZE_T PrivateUsage
Definition: pstypes.h:117
struct _PROCESS_HANDLE_TRACING_ENABLE_EX PROCESS_HANDLE_TRACING_ENABLE_EX
#define NTKERNELAPI
struct _PROCESS_HANDLE_TRACING_QUERY PROCESS_HANDLE_TRACING_QUERY
$endif(_WDMDDK_) $if(_NTDDK_) typedef struct _NEON128
Definition: ke.h:202
union _RATE_QUOTA_LIMIT * PRATE_QUOTA_LIMIT
struct _PS_CREATE_NOTIFY_INFO PS_CREATE_NOTIFY_INFO
ULONGLONG WriteTransferCount
Definition: pstypes.h:87
struct _IMAGE_INFO * PIMAGE_INFO
ULONG_PTR InheritedFromUniqueProcessId
Definition: pstypes.h:340
_ANONYMOUS_UNION union _PROCESS_DEVICEMAP_INFORMATION_EX::@3775 DUMMYUNIONNAME
struct _PAGE_PRIORITY_INFORMATION * PPAGE_PRIORITY_INFORMATION
QUOTA_LIMITS
Definition: pstypes.h:57
struct _PROCESS_DEVICEMAP_INFORMATION_EX::@3775::@3777 Query
struct _PROCESS_DEVICEMAP_INFORMATION::@3772::@3774 Query
struct _PROCESS_SESSION_INFORMATION * PPROCESS_SESSION_INFORMATION
ULONG SystemModeImage
Definition: pstypes.h:201
ULONG RateData
Definition: pstypes.h:60
enum _THREADINFOCLASS THREADINFOCLASS
enum _HARDWARE_COUNTER_TYPE HARDWARE_COUNTER_TYPE
SIZE_T QuotaPagedPoolUsage
Definition: pstypes.h:112
struct _VM_COUNTERS_EX VM_COUNTERS_EX
struct _HARDWARE_COUNTER * PHARDWARE_COUNTER
struct _PROCESS_HANDLE_TRACING_ENTRY PROCESS_HANDLE_TRACING_ENTRY
struct _POOLED_USAGE_AND_LIMITS * PPOOLED_USAGE_AND_LIMITS
uint64_t ULONGLONG
Definition: typedefs.h:65
SIZE_T VirtualSize
Definition: pstypes.h:107
_In_ HANDLE ParentProcessId
Definition: pstypes.h:174
struct _PROCESS_EXCEPTION_PORT * PPROCESS_EXCEPTION_PORT
ULONG ExtendedInfoPresent
Definition: pstypes.h:203
struct _VM_COUNTERS VM_COUNTERS
SIZE_T PagefileLimit
Definition: pstypes.h:72
#define _Inout_
Definition: no_sal2.h:244
$if(_WDMDDK_) $endif(_WDMDDK_) $if(_NTDDK_) typedef struct _QUOTA_LIMITS
Definition: pstypes.h:4
* PQUOTA_LIMITS
Definition: pstypes.h:57
VOID(NTAPI * PCREATE_PROCESS_NOTIFY_ROUTINE)(_In_ HANDLE ParentId, _In_ HANDLE ProcessId, _In_ BOOLEAN Create)
Definition: pstypes.h:160
_In_ ULONG Flags
Definition: pstypes.h:168
SIZE_T QuotaNonPagedPoolUsage
Definition: pstypes.h:100
_ANONYMOUS_STRUCT struct _PS_CREATE_NOTIFY_INFO::@3766::@3767 DUMMYSTRUCTNAME
unsigned __int64 ULONG64
Definition: imports.h:198
unsigned char UCHAR
Definition: xmlstorage.h:181
ULONGLONG ReadTransferCount
Definition: pstypes.h:86
#define VOID
Definition: acefi.h:82
struct _PROCESS_DEVICEMAP_INFORMATION::@3772::@3773 Set
_Inout_ NTSTATUS CreationStatus
Definition: pstypes.h:179
_ANONYMOUS_UNION union _IMAGE_INFO::@3768 DUMMYUNIONNAME
struct _PROCESS_BASIC_INFORMATION * PPROCESS_BASIC_INFORMATION
struct _PROCESS_WS_WATCH_INFORMATION * PPROCESS_WS_WATCH_INFORMATION
ULONG ImageSectionNumber
Definition: pstypes.h:210
NTKERNELAPI PEPROCESS PsInitialSystemProcess
Definition: psmgr.c:50
struct _PROCESS_HANDLE_TRACING_ENABLE PROCESS_HANDLE_TRACING_ENABLE
ULONG PageFaultCount
Definition: pstypes.h:94
INT64 MinimumWorkingSetSize
Definition: lsa.idl:289
#define _ANONYMOUS_STRUCT
Definition: ntbasedef.h:56
struct _PROCESS_BASIC_INFORMATION PROCESS_BASIC_INFORMATION
struct _PEB * PebBaseAddress
Definition: pstypes.h:336
CLIENT_ID ClientId
Definition: pstypes.h:398
SIZE_T MaximumWorkingSetSize
Definition: pstypes.h:71
#define _In_
Definition: no_sal2.h:204
PROCESS_BASIC_INFORMATION BasicInfo
Definition: pstypes.h:345
ULONG_PTR SIZE_T
Definition: typedefs.h:78
ULONG64 Index
Definition: pstypes.h:131
struct _PROCESS_WS_WATCH_INFORMATION PROCESS_WS_WATCH_INFORMATION
_Inout_ struct _FILE_OBJECT * FileObject
Definition: pstypes.h:176
ULONG RatePercent
Definition: pstypes.h:62
IMAGE_INFO ImageInfo
Definition: pstypes.h:215
struct _PROCESS_SESSION_INFORMATION PROCESS_SESSION_INFORMATION
SIZE_T Size
Definition: pstypes.h:214
Definition: pstypes.h:396
SIZE_T MinimumWorkingSetSize
Definition: pstypes.h:70
#define PROCESS_HANDLE_TRACING_MAX_STACKS
Definition: pstypes.h:230
SIZE_T WorkingSetLimit
Definition: pstypes.h:74
struct _PROCESS_DEVICEMAP_INFORMATION_EX * PPROCESS_DEVICEMAP_INFORMATION_EX
SIZE_T PagefileUsage
Definition: pstypes.h:101
HANDLE Handle
Definition: pstypes.h:397
struct _PROCESS_HANDLE_TRACING_ENABLE * PPROCESS_HANDLE_TRACING_ENABLE
ULONG Reserved0
Definition: pstypes.h:63
_Inout_ ULONG StateFlags
Definition: pstypes.h:156
INT64 MaximumWorkingSetSize
Definition: lsa.idl:290
PVOID Stacks[PROCESS_HANDLE_TRACING_MAX_STACKS]
Definition: pstypes.h:400
struct _VM_COUNTERS * PVM_COUNTERS
struct _IO_COUNTERS IO_COUNTERS
SIZE_T NonPagedPoolLimit
Definition: pstypes.h:69
_THREADINFOCLASS
Definition: compat.h:583
SIZE_T VirtualSize
Definition: pstypes.h:93
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:219
struct _QUOTA_LIMITS_EX QUOTA_LIMITS_EX
RATE_QUOTA_LIMIT CpuRateLimit
Definition: pstypes.h:79
unsigned int ULONG
Definition: retypes.h:1
SIZE_T PeakWorkingSetSize
Definition: pstypes.h:109
struct _PS_CREATE_NOTIFY_INFO * PPS_CREATE_NOTIFY_INFO
SIZE_T PagefileUsage
Definition: pstypes.h:115
struct _PROCESS_DEVICEMAP_INFORMATION_EX::@3775::@3776 Set
struct _PROCESS_DEVICEMAP_INFORMATION_EX PROCESS_DEVICEMAP_INFORMATION_EX
struct _PAGE_PRIORITY_INFORMATION PAGE_PRIORITY_INFORMATION
_In_opt_ PCUNICODE_STRING CommandLine
Definition: pstypes.h:178
ULONGLONG OtherTransferCount
Definition: pstypes.h:88
_In_ CLIENT_ID CreatingThreadId
Definition: pstypes.h:175
SIZE_T QuotaPeakNonPagedPoolUsage
Definition: pstypes.h:99
SIZE_T Reserved3
Definition: pstypes.h:76
_PROCESSINFOCLASS
Definition: winternl.h:392
SIZE_T QuotaPeakPagedPoolUsage
Definition: pstypes.h:111
struct _PROCESS_HANDLE_TRACING_ENTRY * PPROCESS_HANDLE_TRACING_ENTRY
_ANONYMOUS_STRUCT struct _RATE_QUOTA_LIMIT::@3765 DUMMYSTRUCTNAME
LARGE_INTEGER TimeLimit
Definition: pstypes.h:73
#define _NTDDK_
SIZE_T Reserved4
Definition: pstypes.h:77
ULONG Properties
Definition: pstypes.h:198
ULONGLONG ReadOperationCount
Definition: pstypes.h:83
#define _Inout_opt_
Definition: no_sal2.h:258
struct _IO_COUNTERS * PIO_COUNTERS
PROCESS_HANDLE_TRACING_ENTRY HandleTrace[1]
Definition: pstypes.h:406