ReactOS 0.4.16-dev-2357-g35d0dfe
ps_i.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Kernel
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Info Classes for the Process Manager
5 * COPYRIGHT: Copyright Alex Ionescu <alex.ionescu@reactos.org>
6 * Copyright Thomas Weidenmueller <w3seek@reactos.org>
7 * Copyright 2020-2021 George Bișoc <george.bisoc@reactos.org>
8 */
9
10#include "icif.h"
11
12//
13// Process Information Classes
14//
16{
17 /* ProcessBasicInformation */
19 (
21 ULONG,
23 ),
24
25 /* ProcessQuotaLimits */
27 (
29 ULONG,
30
31 /* NOTE: ICIF_SIZE_VARIABLE is for QUOTA_LIMITS_EX support */
33 ),
34
35 /* ProcessIoCounters */
37 (
39 ULONG,
41 ),
42
43 /* ProcessVmCounters */
45 (
47 ULONG,
49 ),
50
51 /* ProcessTimes */
53 (
55 ULONG,
57 ),
58
59 /* ProcessBasePriority */
61 (
63 ULONG,
65 ),
66
67 /* ProcessRaisePriority */
69 (
70 ULONG,
71 ULONG,
73 ),
74
75 /* ProcessDebugPort */
77 (
78 HANDLE,
79 ULONG,
81 ),
82
83 /* ProcessExceptionPort */
85 (
86 HANDLE,
87 HANDLE,
89 ),
90
91 /* ProcessAccessToken */
93 (
95 ULONG,
97 ),
98
99 /* ProcessLdtInformation */
101 (
103 ULONG,
105 ),
106
107 /* ProcessLdtSize */
109 (
111 ULONG,
113 ),
114
115 /* ProcessDefaultHardErrorMode */
117 (
118 ULONG,
119 ULONG,
121 ),
122
123 /* ProcessIoPortHandlers */
125 (
126 UCHAR,
127 ULONG,
129 ),
130
131 /* ProcessPooledUsageAndLimits */
133 (
135 ULONG,
137 ),
138
139 /* ProcessWorkingSetWatch */
141 (
143 ULONG,
145 ),
146
147 /* ProcessUserModeIOPL is only implemented in x86 */
148#if defined (_X86_)
150 (
151 ULONG,
153 ),
154#else
155 IQS_NONE,
156#endif
157
158 /* ProcessEnableAlignmentFaultFixup */
159 IQS
160 (
161 BOOLEAN,
162 ULONG,
163 BOOLEAN,
164 CHAR,
166 ),
167
168 /* ProcessPriorityClass */
169 IQS
170 (
172 ULONG,
174 CHAR,
176 ),
177
178 /* ProcessWx86Information */
180 (
181 ULONG,
182 ULONG,
184 ),
185
186 /* ProcessHandleCount */
188 (
189 ULONG,
190 ULONG,
192 ),
193
194 /* ProcessAffinityMask */
196 (
197 KAFFINITY,
198 KAFFINITY,
200 ),
201
202 /* ProcessPriorityBoost */
204 (
205 ULONG,
206 ULONG,
208 ),
209
210 /* ProcessDeviceMap */
211 IQS
212 (
214 ULONG,
216 ULONG,
218 ),
219
220 /* ProcessSessionInformation */
222 (
224 ULONG,
226 ),
227
228 /* ProcessForegroundInformation */
229 IQS
230 (
231 CHAR,
232 ULONG,
233 BOOLEAN,
234 CHAR,
236 ),
237
238 /* ProcessWow64Information */
240 (
241 ULONG_PTR,
242 ULONG,
244 ),
245
246 /* ProcessImageFileName */
248 (
250 ULONG,
252 ),
253
254 /* ProcessLUIDDeviceMapsEnabled */
256 (
257 ULONG,
258 ULONG,
260 ),
261
262 /* ProcessBreakOnTermination */
264 (
265 ULONG,
266 ULONG,
268 ),
269
270 /* ProcessDebugObjectHandle */
272 (
273 HANDLE,
274 ULONG,
276 ),
277
278 /* ProcessDebugFlags */
280 (
281 ULONG,
282 ULONG,
284 ),
285
286 /* ProcessHandleTracing */
287 IQS
288 (
290 ULONG,
291 ULONG,
292 ULONG,
294 ),
295
296 /* ProcessIoPriority */
297 IQS_NONE,
298
299 /* ProcessExecuteFlags */
301 (
302 ULONG,
303 ULONG,
305 ),
306
307 /* ProcessTlsInformation */
308 IQS_NONE,
309
310 /* ProcessCookie */
312 (
313 ULONG,
314 ULONG,
316 ),
317
318 /* ProcessImageInformation */
320 (
322 ULONG,
324 ),
325
326 /* ProcessCycleTime */
327 IQS_NONE,
328
329 /* ProcessPagePriority */
330 IQS_NONE,
331
332 /* ProcessInstrumentationCallback */
333 IQS_NONE,
334
335 /* ProcessThreadStackAllocation */
336 IQS_NONE,
337
338 /* ProcessWorkingSetWatchEx */
339 IQS_NONE,
340
341 /* ProcessImageFileNameWin32 */
343 (
345 ULONG_PTR,
347 ),
348
349 /* ProcessImageFileMapping */
350 IQS_NONE,
351
352 /* ProcessAffinityUpdateMode */
353 IQS_NONE,
354
355 /* ProcessMemoryAllocationMode */
356 IQS_NONE,
357};
358
359//
360// Thread Information Classes
361//
363{
364 /* ThreadBasicInformation */
366 (
368 ULONG,
370 ),
371
372 /* ThreadTimes */
374 (
376 ULONG,
378 ),
379
380 /* ThreadPriority */
382 (
383 KPRIORITY,
384 ULONG,
386 ),
387
388 /* ThreadBasePriority */
390 (
391 LONG,
392 ULONG,
394 ),
395
396 /* ThreadAffinityMask */
398 (
399 KAFFINITY,
400 ULONG,
402 ),
403
404 /* ThreadImpersonationToken */
406 (
407 HANDLE,
408 ULONG,
410 ),
411
412 /* ThreadDescriptorTableEntry is only implemented in x86 as well as the descriptor entry */
413#if defined(_X86_)
415 (
416 DESCRIPTOR_TABLE_ENTRY,
417 ULONG,
419 ),
420#else
421 IQS_NONE,
422#endif
423
424 /* ThreadEnableAlignmentFaultFixup */
425 IQS
426 (
427 CHAR,
428 CHAR,
429 BOOLEAN,
430 UCHAR,
432 ),
433
434 /* ThreadEventPair_Reusable */
435 IQS_NONE,
436
437 /* ThreadQuerySetWin32StartAddress */
438 IQS
439 (
440 PVOID,
441 ULONG,
442 ULONG_PTR,
443 ULONG,
445 ),
446
447 /* ThreadZeroTlsCell */
449 (
450 ULONG,
451 ULONG,
453 ),
454
455 /* ThreadPerformanceCount */
457 (
459 ULONG,
461 ),
462
463 /* ThreadAmILastThread */
465 (
466 ULONG,
467 ULONG,
469 ),
470
471 /* ThreadIdealProcessor */
473 (
474 ULONG_PTR,
475 ULONG,
477 ),
478
479 /* ThreadPriorityBoost */
480 IQS
481 (
482 ULONG,
483 ULONG,
484 ULONG_PTR,
485 ULONG,
487 ),
488
489 /* ThreadSetTlsArrayAddress */
491 (
492 PVOID,
493 ULONG,
495 ),
496
497 /* ThreadIsIoPending */
499 (
500 ULONG,
501 ULONG,
503 ),
504
505 /* ThreadHideFromDebugger */
506 {
507#if (NTDDI_VERSION >= NTDDI_VISTA)
508 sizeof(BOOLEAN), /* Query support only on Vista and above */
509#else
510 0,
511#endif
512 sizeof(ULONG), // UCHAR
513 0, /* No size for Set */
514 sizeof(ULONG),
516 ICIF_QUERY |
517#endif
519 },
520
521 /* ThreadBreakOnTermination */
523 (
524 ULONG,
525 ULONG,
527 ),
528
529 /* ThreadSwitchLegacyState */
531 (
532 ULONG,
533 ULONG,
535 ),
536
537 /* ThreadIsTerminated */
539 (
540 ULONG,
541 ULONG,
543 ),
544
545 /* ThreadLastSystemCall */
546 IQS_NONE,
547
548 /* ThreadIoPriority */
549 IQS_NONE,
550
551 /* ThreadCycleTime */
552 IQS_NONE,
553
554 /* ThreadPagePriority */
555 IQS_NONE,
556
557 /* ThreadActualBasePriority */
558 IQS_NONE,
559
560 /* ThreadTebInformation */
561 IQS_NONE,
562
563 /* ThreadCSwitchMon */
564 IQS_NONE,
565
566#if 0 // Hermes will surely fix this properly
567 // Windows 7
568 /* ThreadCSwitchPmu */
569 IQS_NONE,
570 /* ThreadWow64Context */
571 IQS_NONE,
572 /* ThreadGroupInformation */
573 IQS_NONE,
574 /* ThreadUmsInformation */
575 IQS_NONE,
576 /* ThreadCounterProfiling */
577 IQS_NONE,
578 /* ThreadIdealProcessorEx */
579 IQS_NONE,
580
581 // Windows 8
582 /* ThreadCpuAccountingInformation */
583 IQS_NONE,
584
585 // Windows 8.1
586 /* ThreadSuspendCount */
587 IQS_NONE,
588
589 // Windows 10
590 /* ThreadHeterogeneousCpuPolicy */
591 IQS_NONE,
592 /* ThreadContainerId */
593 IQS_NONE,
594 /* ThreadNameInformation */
595 IQS_NONE,
596 /* ThreadSelectedCpuSets */
597 IQS_NONE,
598 /* ThreadSystemThreadInformation */
599 IQS_NONE,
600 /* ThreadActualGroupAffinity */
601 IQS_NONE,
602
603 /* ThreadDynamicCodePolicyInfo */
604 IQS_NONE,
605 /* ThreadExplicitCaseSensitivity */
606 IQS_NONE,
607 /* ThreadWorkOnBehalfTicket */
608 IQS_NONE,
609 /* ThreadSubsystemInformation */
610 IQS_NONE,
611 /* ThreadDbgkWerReportActive */
612 IQS_NONE,
613 /* ThreadAttachContainer */
614 IQS_NONE,
615 /* ThreadManageWritesToExecutableMemory */
616 IQS_NONE,
617 /* ThreadPowerThrottlingState */
618 IQS_NONE,
619 /* ThreadWorkloadClass */
620 IQS_NONE,
621 /* ThreadCreateStateChange */
622 IQS_NONE,
623 /* ThreadApplyStateChange */
624 IQS_NONE,
625 /* ThreadStrongerBadHandleChecks */
626 IQS_NONE,
627 /* ThreadEffectiveIoPriority */
628 IQS_NONE,
629 /* ThreadEffectivePagePriority */
630 IQS_NONE,
631#endif
632};
unsigned char BOOLEAN
Definition: actypes.h:127
BOOL Query(LPCTSTR *ServiceArgs, DWORD ArgCount, BOOL bExtended)
Definition: query.c:292
ULONG_PTR KAFFINITY
Definition: compat.h:85
LONG KPRIORITY
Definition: compat.h:803
#define ICIF_QUERY_SIZE_VARIABLE
Definition: icif.h:20
#define IQS_NONE
Definition: icif.h:46
#define ICIF_QUERY
Definition: icif.h:18
#define ICIF_SET
Definition: icif.h:19
#define ICIF_SET_SIZE_VARIABLE
Definition: icif.h:21
#define IQS(TypeQuery, AlignmentQuery, TypeSet, AlignmentSet, Flags)
Definition: icif.h:40
#define IQS_NO_TYPE_LENGTH(Alignment, Flags)
Definition: icif.h:43
#define ICIF_SIZE_VARIABLE
Definition: icif.h:22
#define IQS_SAME(Type, Alignment, Flags)
Definition: icif.h:37
#define NTDDI_VERSION
Definition: k32.h:35
#define RTL_FIELD_TYPE(type, field)
Definition: ntbasedef.h:679
static BOOL Set
Definition: pageheap.c:10
#define BOOLEAN
Definition: pedump.c:73
long LONG
Definition: pedump.c:60
static const INFORMATION_CLASS_INFO PsThreadInfoClass[]
Definition: ps_i.h:362
static const INFORMATION_CLASS_INFO PsProcessInfoClass[]
Definition: ps_i.h:15
#define NTDDI_VISTA
Definition: sdkddkver.h:103
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
unsigned char UCHAR
Definition: xmlstorage.h:181
char CHAR
Definition: xmlstorage.h:175