3 Copyright (c) Alex Ionescu. All rights reserved.
11 Type definitions for the Process Manager
15 Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
29 #ifndef NTOS_MODE_USER
35 // KUSER_SHARED_DATA location in User Mode
37 #define USER_SHARED_DATA (0x7FFE0000)
42 #ifndef NTOS_MODE_USER
44 extern NTSYSAPI
struct _EPROCESS
* PsInitialSystemProcess
;
45 extern NTSYSAPI POBJECT_TYPE PsProcessType
;
52 #define FLG_STOP_ON_EXCEPTION 0x00000001
53 #define FLG_SHOW_LDR_SNAPS 0x00000002
54 #define FLG_DEBUG_INITIAL_COMMAND 0x00000004
55 #define FLG_STOP_ON_HUNG_GUI 0x00000008
56 #define FLG_HEAP_ENABLE_TAIL_CHECK 0x00000010
57 #define FLG_HEAP_ENABLE_FREE_CHECK 0x00000020
58 #define FLG_HEAP_VALIDATE_PARAMETERS 0x00000040
59 #define FLG_HEAP_VALIDATE_ALL 0x00000080
60 #define FLG_POOL_ENABLE_TAIL_CHECK 0x00000100
61 #define FLG_POOL_ENABLE_FREE_CHECK 0x00000200
62 #define FLG_POOL_ENABLE_TAGGING 0x00000400
63 #define FLG_HEAP_ENABLE_TAGGING 0x00000800
64 #define FLG_USER_STACK_TRACE_DB 0x00001000
65 #define FLG_KERNEL_STACK_TRACE_DB 0x00002000
66 #define FLG_MAINTAIN_OBJECT_TYPELIST 0x00004000
67 #define FLG_HEAP_ENABLE_TAG_BY_DLL 0x00008000
68 #define FLG_IGNORE_DEBUG_PRIV 0x00010000
69 #define FLG_ENABLE_CSRDEBUG 0x00020000
70 #define FLG_ENABLE_KDEBUG_SYMBOL_LOAD 0x00040000
71 #define FLG_DISABLE_PAGE_KERNEL_STACKS 0x00080000
72 #define FLG_HEAP_ENABLE_CALL_TRACING 0x00100000
73 #define FLG_HEAP_DISABLE_COALESCING 0x00200000
74 #define FLG_ENABLE_CLOSE_EXCEPTIONS 0x00400000
75 #define FLG_ENABLE_EXCEPTION_LOGGING 0x00800000
76 #define FLG_ENABLE_HANDLE_TYPE_TAGGING 0x01000000
77 #define FLG_HEAP_PAGE_ALLOCS 0x02000000
78 #define FLG_DEBUG_INITIAL_COMMAND_EX 0x04000000
81 // Process priority classes
83 #define PROCESS_PRIORITY_CLASS_INVALID 0
84 #define PROCESS_PRIORITY_CLASS_IDLE 1
85 #define PROCESS_PRIORITY_CLASS_NORMAL 2
86 #define PROCESS_PRIORITY_CLASS_HIGH 3
87 #define PROCESS_PRIORITY_CLASS_REALTIME 4
88 #define PROCESS_PRIORITY_CLASS_BELOW_NORMAL 5
89 #define PROCESS_PRIORITY_CLASS_ABOVE_NORMAL 6
92 // Process base priorities
94 #define PROCESS_PRIORITY_IDLE 3
95 #define PROCESS_PRIORITY_NORMAL 8
96 #define PROCESS_PRIORITY_NORMAL_FOREGROUND 9
102 #define JOB_OBJECT_ASSIGN_PROCESS 0x1
103 #define JOB_OBJECT_SET_ATTRIBUTES 0x2
104 #define JOB_OBJECT_QUERY 0x4
105 #define JOB_OBJECT_TERMINATE 0x8
106 #define JOB_OBJECT_SET_SECURITY_ATTRIBUTES 0x10
107 #define JOB_OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 31)
110 #ifdef NTOS_MODE_USER
112 // Current Process/Thread built-in 'special' handles
114 #define NtCurrentProcess() ((HANDLE)(LONG_PTR)-1)
115 #define ZwCurrentProcess() NtCurrentProcess()
116 #define NtCurrentThread() ((HANDLE)(LONG_PTR)-2)
117 #define ZwCurrentThread() NtCurrentThread()
120 // Process/Thread/Job Information Classes for NtQueryInformationProcess/Thread/Job
122 typedef enum _PROCESSINFOCLASS
124 ProcessBasicInformation
,
130 ProcessRaisePriority
,
132 ProcessExceptionPort
,
134 ProcessLdtInformation
,
136 ProcessDefaultHardErrorMode
,
137 ProcessIoPortHandlers
,
138 ProcessPooledUsageAndLimits
,
139 ProcessWorkingSetWatch
,
141 ProcessEnableAlignmentFaultFixup
,
142 ProcessPriorityClass
,
143 ProcessWx86Information
,
146 ProcessPriorityBoost
,
148 ProcessSessionInformation
,
149 ProcessForegroundInformation
,
150 ProcessWow64Information
,
151 ProcessImageFileName
,
152 ProcessLUIDDeviceMapsEnabled
,
153 ProcessBreakOnTermination
,
154 ProcessDebugObjectHandle
,
156 ProcessHandleTracing
,
159 ProcessTlsInformation
,
161 ProcessImageInformation
,
164 ProcessInstrumentationCallback
,
168 typedef enum _THREADINFOCLASS
170 ThreadBasicInformation
,
175 ThreadImpersonationToken
,
176 ThreadDescriptorTableEntry
,
177 ThreadEnableAlignmentFaultFixup
,
178 ThreadEventPair_Reusable
,
179 ThreadQuerySetWin32StartAddress
,
181 ThreadPerformanceCount
,
183 ThreadIdealProcessor
,
185 ThreadSetTlsArrayAddress
,
187 ThreadHideFromDebugger
,
188 ThreadBreakOnTermination
,
189 ThreadSwitchLegacyState
,
191 ThreadLastSystemCall
,
195 ThreadActualBasePriority
,
201 typedef enum _JOBOBJECTINFOCLASS
203 JobObjectBasicAccountingInformation
= 1,
204 JobObjectBasicLimitInformation
,
205 JobObjectBasicProcessIdList
,
206 JobObjectBasicUIRestrictions
,
207 JobObjectSecurityLimitInformation
,
208 JobObjectEndOfJobTimeInformation
,
209 JobObjectAssociateCompletionPortInformation
,
210 JobObjectBasicAndIoAccountingInformation
,
211 JobObjectExtendedLimitInformation
,
212 JobObjectJobSetInformation
,
213 MaxJobObjectInfoClass
214 } JOBOBJECTINFOCLASS
;
217 // Declare empty structure definitions so that they may be referenced by
218 // routines before they are defined
225 // Win32K Process and Thread Callbacks
228 (NTAPI
*PW32_PROCESS_CALLBACK
)(
229 struct _EPROCESS
*Process
,
234 (NTAPI
*PW32_THREAD_CALLBACK
)(
235 struct _ETHREAD
*Thread
,
241 #ifdef NTOS_MODE_USER
244 // ClientID Structure
246 typedef struct _CLIENT_ID
248 HANDLE UniqueProcess
;
250 } CLIENT_ID
, *PCLIENT_ID
;
255 // Descriptor Table Entry Definition
257 #define _DESCRIPTOR_TABLE_ENTRY_DEFINED
258 typedef struct _DESCRIPTOR_TABLE_ENTRY
261 LDT_ENTRY Descriptor
;
262 } DESCRIPTOR_TABLE_ENTRY
, *PDESCRIPTOR_TABLE_ENTRY
;
268 (NTAPI
*PPEBLOCKROUTINE
)(
273 // PEB Free Block Descriptor
275 typedef struct _PEB_FREE_BLOCK
277 struct _PEB_FREE_BLOCK
* Next
;
279 } PEB_FREE_BLOCK
, *PPEB_FREE_BLOCK
;
282 // Process Environment Block (PEB)
286 UCHAR InheritedAddressSpace
; /* 00h */
287 UCHAR ReadImageFileExecOptions
; /* 01h */
288 UCHAR BeingDebugged
; /* 02h */
289 BOOLEAN SpareBool
; /* 03h */
290 HANDLE Mutant
; /* 04h */
291 PVOID ImageBaseAddress
; /* 08h */
292 PPEB_LDR_DATA Ldr
; /* 0Ch */
293 struct _RTL_USER_PROCESS_PARAMETERS
*ProcessParameters
; /* 10h */
294 PVOID SubSystemData
; /* 14h */
295 PVOID ProcessHeap
; /* 18h */
296 PVOID FastPebLock
; /* 1Ch */
297 PPEBLOCKROUTINE FastPebLockRoutine
; /* 20h */
298 PPEBLOCKROUTINE FastPebUnlockRoutine
; /* 24h */
299 ULONG EnvironmentUpdateCount
; /* 28h */
300 PVOID
* KernelCallbackTable
; /* 2Ch */
301 PVOID EventLogSection
; /* 30h */
302 PVOID EventLog
; /* 34h */
303 PPEB_FREE_BLOCK FreeList
; /* 38h */
304 ULONG TlsExpansionCounter
; /* 3Ch */
305 PVOID TlsBitmap
; /* 40h */
306 ULONG TlsBitmapBits
[0x2]; /* 44h */
307 PVOID ReadOnlySharedMemoryBase
; /* 4Ch */
308 PVOID ReadOnlySharedMemoryHeap
; /* 50h */
309 PVOID
* ReadOnlyStaticServerData
; /* 54h */
310 PVOID AnsiCodePageData
; /* 58h */
311 PVOID OemCodePageData
; /* 5Ch */
312 PVOID UnicodeCaseTableData
; /* 60h */
313 ULONG NumberOfProcessors
; /* 64h */
314 ULONG NtGlobalFlag
; /* 68h */
315 LARGE_INTEGER CriticalSectionTimeout
; /* 70h */
316 ULONG HeapSegmentReserve
; /* 78h */
317 ULONG HeapSegmentCommit
; /* 7Ch */
318 ULONG HeapDeCommitTotalFreeThreshold
; /* 80h */
319 ULONG HeapDeCommitFreeBlockThreshold
; /* 84h */
320 ULONG NumberOfHeaps
; /* 88h */
321 ULONG MaximumNumberOfHeaps
; /* 8Ch */
322 PVOID
* ProcessHeaps
; /* 90h */
323 PVOID GdiSharedHandleTable
; /* 94h */
324 PVOID ProcessStarterHelper
; /* 98h */
325 PVOID GdiDCAttributeList
; /* 9Ch */
326 PVOID LoaderLock
; /* A0h */
327 ULONG OSMajorVersion
; /* A4h */
328 ULONG OSMinorVersion
; /* A8h */
329 USHORT OSBuildNumber
; /* ACh */
330 USHORT OSCSDVersion
; /* AEh */
331 ULONG OSPlatformId
; /* B0h */
332 ULONG ImageSubSystem
; /* B4h */
333 ULONG ImageSubSystemMajorVersion
; /* B8h */
334 ULONG ImageSubSystemMinorVersion
; /* BCh */
335 ULONG ImageProcessAffinityMask
; /* C0h */
336 ULONG GdiHandleBuffer
[0x22]; /* C4h */
337 PVOID PostProcessInitRoutine
; /* 14Ch */
338 struct _RTL_BITMAP
*TlsExpansionBitmap
; /* 150h */
339 ULONG TlsExpansionBitmapBits
[0x20]; /* 154h */
340 ULONG SessionId
; /* 1D4h */
341 PVOID AppCompatInfo
; /* 1D8h */
342 UNICODE_STRING CSDVersion
; /* 1DCh */
346 // GDI Batch Descriptor
348 typedef struct _GDI_TEB_BATCH
353 } GDI_TEB_BATCH
, *PGDI_TEB_BATCH
;
358 typedef struct _INITIAL_TEB
360 PVOID PreviousStackBase
;
361 PVOID PreviousStackLimit
;
364 PVOID AllocatedStackBase
;
365 } INITIAL_TEB
, *PINITIAL_TEB
;
368 // TEB Active Frame Structures
370 typedef struct _TEB_ACTIVE_FRAME_CONTEXT
374 } TEB_ACTIVE_FRAME_CONTEXT
, *PTEB_ACTIVE_FRAME_CONTEXT
;
376 typedef struct _TEB_ACTIVE_FRAME
379 struct _TEB_ACTIVE_FRAME
*Previous
;
380 PTEB_ACTIVE_FRAME_CONTEXT Context
;
381 } TEB_ACTIVE_FRAME
, *PTEB_ACTIVE_FRAME
;
384 // Thread Environment Block (TEB)
388 NT_TIB Tib
; /* 00h */
389 PVOID EnvironmentPointer
; /* 1Ch */
390 CLIENT_ID Cid
; /* 20h */
391 PVOID ActiveRpcHandle
; /* 28h */
392 PVOID ThreadLocalStoragePointer
; /* 2Ch */
393 struct _PEB
*ProcessEnvironmentBlock
; /* 30h */
394 ULONG LastErrorValue
; /* 34h */
395 ULONG CountOfOwnedCriticalSections
; /* 38h */
396 PVOID CsrClientThread
; /* 3Ch */
397 struct _W32THREAD
* Win32ThreadInfo
; /* 40h */
398 ULONG User32Reserved
[0x1A]; /* 44h */
399 ULONG UserReserved
[5]; /* ACh */
400 PVOID WOW32Reserved
; /* C0h */
401 LCID CurrentLocale
; /* C4h */
402 ULONG FpSoftwareStatusRegister
; /* C8h */
403 PVOID SystemReserved1
[0x36]; /* CCh */
404 LONG ExceptionCode
; /* 1A4h */
405 struct _ACTIVATION_CONTEXT_STACK
*ActivationContextStackPointer
; /* 1A8h */
406 UCHAR SpareBytes1
[0x28]; /* 1ACh */
407 GDI_TEB_BATCH GdiTebBatch
; /* 1D4h */
408 CLIENT_ID RealClientId
; /* 6B4h */
409 PVOID GdiCachedProcessHandle
; /* 6BCh */
410 ULONG GdiClientPID
; /* 6C0h */
411 ULONG GdiClientTID
; /* 6C4h */
412 PVOID GdiThreadLocalInfo
; /* 6C8h */
413 ULONG Win32ClientInfo
[62]; /* 6CCh */
414 PVOID glDispatchTable
[0xE9]; /* 7C4h */
415 ULONG glReserved1
[0x1D]; /* B68h */
416 PVOID glReserved2
; /* BDCh */
417 PVOID glSectionInfo
; /* BE0h */
418 PVOID glSection
; /* BE4h */
419 PVOID glTable
; /* BE8h */
420 PVOID glCurrentRC
; /* BECh */
421 PVOID glContext
; /* BF0h */
422 NTSTATUS LastStatusValue
; /* BF4h */
423 UNICODE_STRING StaticUnicodeString
; /* BF8h */
424 WCHAR StaticUnicodeBuffer
[0x105]; /* C00h */
425 PVOID DeallocationStack
; /* E0Ch */
426 PVOID TlsSlots
[0x40]; /* E10h */
427 LIST_ENTRY TlsLinks
; /* F10h */
428 PVOID Vdm
; /* F18h */
429 PVOID ReservedForNtRpc
; /* F1Ch */
430 PVOID DbgSsReserved
[0x2]; /* F20h */
431 ULONG HardErrorDisabled
; /* F28h */
432 PVOID Instrumentation
[14]; /* F2Ch */
433 PVOID SubProcessTag
; /* F64h */
434 PVOID EtwTraceData
; /* F68h */
435 PVOID WinSockData
; /* F6Ch */
436 ULONG GdiBatchCount
; /* F70h */
437 BOOLEAN InDbgPrint
; /* F74h */
438 BOOLEAN FreeStackOnTermination
; /* F75h */
439 BOOLEAN HasFiberData
; /* F76h */
440 UCHAR IdealProcessor
; /* F77h */
441 ULONG GuaranteedStackBytes
; /* F78h */
442 PVOID ReservedForPerf
; /* F7Ch */
443 PVOID ReservedForOle
; /* F80h */
444 ULONG WaitingOnLoaderLock
; /* F84h */
445 ULONG SparePointer1
; /* F88h */
446 ULONG SoftPatchPtr1
; /* F8Ch */
447 ULONG SoftPatchPtr2
; /* F90h */
448 PVOID
*TlsExpansionSlots
; /* F94h */
449 ULONG ImpersionationLocale
; /* F98h */
450 ULONG IsImpersonating
; /* F9Ch */
451 PVOID NlsCache
; /* FA0h */
452 PVOID pShimData
; /* FA4h */
453 ULONG HeapVirualAffinity
; /* FA8h */
454 PVOID CurrentTransactionHandle
; /* FACh */
455 PTEB_ACTIVE_FRAME ActiveFrame
; /* FB0h */
456 PVOID FlsData
; /* FB4h */
457 UCHAR SafeThunkCall
; /* FB8h */
458 UCHAR BooleanSpare
[3]; /* FB9h */
461 #ifdef NTOS_MODE_USER
464 // Process Information Structures for NtQueryProcessInformation
466 typedef struct _PROCESS_BASIC_INFORMATION
470 ULONG_PTR AffinityMask
;
471 KPRIORITY BasePriority
;
472 ULONG_PTR UniqueProcessId
;
473 ULONG_PTR InheritedFromUniqueProcessId
;
474 } PROCESS_BASIC_INFORMATION
,*PPROCESS_BASIC_INFORMATION
;
476 typedef struct _PROCESS_ACCESS_TOKEN
480 } PROCESS_ACCESS_TOKEN
, *PPROCESS_ACCESS_TOKEN
;
482 typedef struct _PROCESS_DEVICEMAP_INFORMATION
488 HANDLE DirectoryHandle
;
496 } PROCESS_DEVICEMAP_INFORMATION
, *PPROCESS_DEVICEMAP_INFORMATION
;
498 typedef struct _KERNEL_USER_TIMES
500 LARGE_INTEGER CreateTime
;
501 LARGE_INTEGER ExitTime
;
502 LARGE_INTEGER KernelTime
;
503 LARGE_INTEGER UserTime
;
504 } KERNEL_USER_TIMES
, *PKERNEL_USER_TIMES
;
506 typedef struct _PROCESS_SESSION_INFORMATION
509 } PROCESS_SESSION_INFORMATION
, *PPROCESS_SESSION_INFORMATION
;
513 typedef struct _PROCESS_PRIORITY_CLASS
517 } PROCESS_PRIORITY_CLASS
, *PPROCESS_PRIORITY_CLASS
;
520 // Thread Information Structures for NtQueryProcessInformation
522 typedef struct _THREAD_BASIC_INFORMATION
525 PVOID TebBaseAddress
;
527 KAFFINITY AffinityMask
;
529 KPRIORITY BasePriority
;
530 } THREAD_BASIC_INFORMATION
, *PTHREAD_BASIC_INFORMATION
;
532 #ifndef NTOS_MODE_USER
535 // EPROCESS Quota Structures
537 typedef struct _EPROCESS_QUOTA_ENTRY
543 } EPROCESS_QUOTA_ENTRY
, *PEPROCESS_QUOTA_ENTRY
;
545 typedef struct _EPROCESS_QUOTA_BLOCK
547 EPROCESS_QUOTA_ENTRY QuotaEntry
[3];
548 LIST_ENTRY QuotaList
;
549 ULONG ReferenceCount
;
551 } EPROCESS_QUOTA_BLOCK
, *PEPROCESS_QUOTA_BLOCK
;
554 // FIXME: This really belongs in mmtypes.h
556 typedef struct _PAGEFAULT_HISTORY
562 PROCESS_WS_WATCH_INFORMATION WatchInfo
[1];
563 } PAGEFAULT_HISTORY
, *PPAGEFAULT_HISTORY
;
566 // Process Impersonation Information
568 typedef struct _PS_IMPERSONATION_INFORMATION
572 BOOLEAN EffectiveOnly
;
573 SECURITY_IMPERSONATION_LEVEL ImpersonationLevel
;
574 } PS_IMPERSONATION_INFORMATION
, *PPS_IMPERSONATION_INFORMATION
;
577 // Process Termination Port
579 typedef struct _TERMINATION_PORT
581 struct _TERMINATION_PORT
*Next
;
583 } TERMINATION_PORT
, *PTERMINATION_PORT
;
586 // Executive Thread (ETHREAD)
588 #include <pshpack4.h>
589 typedef struct _ETHREAD
591 KTHREAD Tcb
; /* 1C0 */
592 LARGE_INTEGER CreateTime
; /* 1C0 */
593 LARGE_INTEGER ExitTime
; /* 1C0 */
596 LIST_ENTRY LpcReplyChain
; /* 1C0 */
597 LIST_ENTRY KeyedWaitChain
; /* 1C0 */
601 NTSTATUS ExitStatus
; /* 1C8 */
602 PVOID OfsChain
; /* 1C8 */
604 LIST_ENTRY PostBlockList
; /* 1CC */
607 struct _TERMINATION_PORT
*TerminationPort
; /* 1D4 */
608 struct _ETHREAD
*ReaperLink
; /* 1D4 */
609 PVOID KeyedWaitValue
; /* 1D4 */
611 KSPIN_LOCK ActiveTimerListLock
; /* 1D8 */
612 LIST_ENTRY ActiveTimerListHead
; /* 1D8 */
613 CLIENT_ID Cid
; /* 1E0 */
616 KSEMAPHORE LpcReplySemaphore
; /* 1E4 */
617 KSEMAPHORE KeyedReplySemaphore
; /* 1E4 */
621 PVOID LpcReplyMessage
; /* 200 */
622 PVOID LpcWaitingOnPort
; /* 200 */
624 PPS_IMPERSONATION_INFORMATION ImpersonationInfo
; /* 204 */
625 LIST_ENTRY IrpList
; /* 208 */
626 ULONG TopLevelIrp
; /* 210 */
627 PDEVICE_OBJECT DeviceToVerify
; /* 214 */
628 struct _EPROCESS
*ThreadsProcess
; /* 218 */
629 PKSTART_ROUTINE StartAddress
; /* 21C */
632 PVOID Win32StartAddress
; /* 220 */
633 ULONG LpcReceivedMessageId
; /* 220 */
635 LIST_ENTRY ThreadListEntry
; /* 224 */
636 EX_RUNDOWN_REF RundownProtect
; /* 22C */
637 EX_PUSH_LOCK ThreadLock
; /* 230 */
638 ULONG LpcReplyMessageId
; /* 234 */
639 ULONG ReadClusterSize
; /* 238 */
640 ACCESS_MASK GrantedAccess
; /* 23C */
647 ULONG HideFromDebugger
:1;
648 ULONG ActiveImpersonationInfo
:1;
649 ULONG SystemThread
:1;
650 ULONG HardErrorsAreDisabled
:1;
651 ULONG BreakOnTermination
:1;
652 ULONG SkipCreationMsg
:1;
653 ULONG SkipTerminationMsg
:1;
655 ULONG CrossThreadFlags
; /* 240 */
661 ULONG ActiveExWorker
:1;
662 ULONG ExWorkerCanWaitUser
:1;
664 ULONG KeyedEventInUse
:1;
666 ULONG SameThreadPassiveFlags
; /* 244 */
672 ULONG LpcReceivedMsgIdValid
:1;
673 ULONG LpcExitThreadCalled
:1;
674 ULONG AddressSpaceOwner
:1;
675 ULONG OwnsProcessWorkingSetExclusive
:1;
676 ULONG OwnsProcessWorkingSetShared
:1;
677 ULONG OwnsSystemWorkingSetExclusive
:1;
678 ULONG OwnsSystemWorkingSetShared
:1;
679 ULONG OwnsSessionWorkingSetExclusive
:1;
680 ULONG OwnsSessionWorkingSetShared
:1;
683 ULONG SameThreadApcFlags
; /* 248 */
685 UCHAR ForwardClusterOnly
; /* 24C */
686 UCHAR DisablePageFaultClustering
; /* 24D */
687 UCHAR ActiveFaultCount
; /* 24E */
690 #if defined(_NTOSKRNL_)
691 #include <internal/mm.h>
695 // Executive Process (EPROCESS)
697 typedef struct _EPROCESS
699 KPROCESS Pcb
; /* 000 */
700 EX_PUSH_LOCK ProcessLock
; /* 078 */
701 LARGE_INTEGER CreateTime
; /* 080 */
702 LARGE_INTEGER ExitTime
; /* 088 */
703 EX_RUNDOWN_REF RundownProtect
; /* 090 */
704 HANDLE UniqueProcessId
; /* 094 */
705 LIST_ENTRY ActiveProcessLinks
; /* 098 */
706 ULONG QuotaUsage
[3]; /* 0A0 */
707 ULONG QuotaPeak
[3]; /* 0AC */
708 ULONG CommitCharge
; /* 0B8 */
709 ULONG PeakVirtualSize
; /* 0BC */
710 ULONG VirtualSize
; /* 0C0 */
711 LIST_ENTRY SessionProcessLinks
; /* 0C4 */
712 PVOID DebugPort
; /* 0CC */
713 PVOID ExceptionPort
; /* 0D0 */
714 PHANDLE_TABLE ObjectTable
; /* 0D4 */
715 EX_FAST_REF Token
; /* 0D8 */
716 ULONG WorkingSetPage
; /* 0DC */
717 KGUARDED_MUTEX AddressCreationLock
; /* 0E0 */
718 KSPIN_LOCK HyperSpaceLock
; /* 100 */
719 PETHREAD ForkInProgress
; /* 104 */
720 ULONG HardwareTrigger
; /* 108 */
721 MM_AVL_TABLE PhysicalVadroot
; /* 10C */
722 PVOID CloneRoot
; /* 110 */
723 ULONG NumberOfPrivatePages
; /* 114 */
724 ULONG NumberOfLockedPages
; /* 118 */
725 PVOID
*Win32Process
; /* 11C */
726 struct _EJOB
*Job
; /* 120 */
727 PVOID SectionObject
; /* 124 */
728 PVOID SectionBaseAddress
; /* 128 */
729 PEPROCESS_QUOTA_BLOCK QuotaBlock
; /* 12C */
730 PPAGEFAULT_HISTORY WorkingSetWatch
; /* 130 */
731 PVOID Win32WindowStation
; /* 134 */
732 HANDLE InheritedFromUniqueProcessId
; /* 138 */
733 PVOID LdtInformation
; /* 13C */
734 PVOID VadFreeHint
; /* 140 */
735 PVOID VdmObjects
; /* 144 */
736 PVOID DeviceMap
; /* 148 */
737 PVOID Spare0
[3]; /* 14C */
740 HARDWARE_PTE_X86 PagedirectoryPte
; /* 158 */
741 ULONGLONG Filler
; /* 158 */
743 ULONG Session
; /* 160 */
744 CHAR ImageFileName
[16]; /* 164 */
745 LIST_ENTRY JobLinks
; /* 174 */
746 PVOID LockedPagesList
; /* 17C */
747 LIST_ENTRY ThreadListHead
; /* 184 */
748 PVOID SecurityPort
; /* 188 */
749 PVOID PaeTop
; /* 18C */
750 ULONG ActiveThreds
; /* 190 */
751 ACCESS_MASK GrantedAccess
; /* 194 */
752 ULONG DefaultHardErrorProcessing
; /* 198 */
753 NTSTATUS LastThreadExitStatus
; /* 19C */
754 struct _PEB
* Peb
; /* 1A0 */
755 EX_FAST_REF PrefetchTrace
; /* 1A4 */
756 LARGE_INTEGER ReadOperationCount
; /* 1A8 */
757 LARGE_INTEGER WriteOperationCount
; /* 1B0 */
758 LARGE_INTEGER OtherOperationCount
; /* 1B8 */
759 LARGE_INTEGER ReadTransferCount
; /* 1C0 */
760 LARGE_INTEGER WriteTransferCount
; /* 1C8 */
761 LARGE_INTEGER OtherTransferCount
; /* 1D0 */
762 ULONG CommitChargeLimit
; /* 1D8 */
763 ULONG CommitChargePeak
; /* 1DC */
764 PVOID AweInfo
; /* 1E0 */
765 SE_AUDIT_PROCESS_CREATION_INFO SeAuditProcessCreationInfo
; /* 1E4 */
766 MMSUPPORT Vm
; /* 1E8 */
767 LIST_ENTRY MmProcessLinks
; /* 230 */
768 ULONG ModifiedPageCount
; /* 238 */
769 ULONG JobStatus
; /* 23C */
774 ULONG CreateReported
:1;
775 ULONG NoDebugInherit
:1;
776 ULONG ProcessExiting
:1;
777 ULONG ProcessDelete
:1;
778 ULONG Wow64SplitPages
:1;
780 ULONG OutswapEnabled
:1;
783 ULONG Wow64VaSpace4Gb
:1;
784 ULONG AddressSpaceInitialized
:2;
785 ULONG SetTimerResolution
:1;
786 ULONG BreakOnTermination
:1;
787 ULONG SessionCreationUnderway
:1;
789 ULONG ProcessInSession
:1;
790 ULONG OverrideAddressSpace
:1;
791 ULONG HasAddressSpace
:1;
792 ULONG LaunchPrefetched
:1;
793 ULONG InjectInpageErrors
:1;
795 ULONG ImageNotifyDone
:1;
796 ULONG PdeUpdateNeeded
:1;
799 ULONG CreateFailed
:1;
800 ULONG DefaultIoPriority
:3;
804 ULONG Flags
; /* 240 */
807 NTSTATUS ExitStatus
; /* 244 */
808 USHORT NextPageColor
; /* 248 */
813 UCHAR SubSystemMinorVersion
; /* 24A */
814 UCHAR SubSystemMajorVersion
; /* 24B */
816 USHORT SubSystemVersion
; /* 24A */
818 UCHAR PriorityClass
; /* 24C */
819 MM_AVL_TABLE VadRoot
; /* 250 */
820 ULONG Cookie
; /* 270 */
823 /* FIXME: WILL BE DEPRECATED WITH PUSHLOCK SUPPORT IN 0.3.0*/
824 KEVENT LockEvent
; /* 274 */
825 ULONG LockCount
; /* 284 */
826 struct _KTHREAD
*LockOwner
; /* 288 */
828 /* FIXME: MOVE TO AVL TREES */
829 MADDRESS_SPACE AddressSpace
; /* 28C */
835 // Job Token Filter Data
837 #include <pshpack1.h>
838 typedef struct _PS_JOB_TOKEN_FILTER
840 ULONG CapturedSidCount
;
841 PSID_AND_ATTRIBUTES CapturedSids
;
842 ULONG CapturedSidsLength
;
843 ULONG CapturedGroupCount
;
844 PSID_AND_ATTRIBUTES CapturedGroups
;
845 ULONG CapturedGroupsLength
;
846 ULONG CapturedPrivilegeCount
;
847 PLUID_AND_ATTRIBUTES CapturedPrivileges
;
848 ULONG CapturedPrivilegesLength
;
849 } PS_JOB_TOKEN_FILTER
, *PPS_JOB_TOKEN_FILTER
;
852 // Executive Job (EJOB)
858 LIST_ENTRY ProcessListHead
;
860 LARGE_INTEGER TotalUserTime
;
861 LARGE_INTEGER TotalKernelTime
;
862 LARGE_INTEGER ThisPeriodTotalUserTime
;
863 LARGE_INTEGER ThisPeriodTotalKernelTime
;
864 ULONG TotalPageFaultCount
;
865 ULONG TotalProcesses
;
866 ULONG ActiveProcesses
;
867 ULONG TotalTerminatedProcesses
;
868 LARGE_INTEGER PerProcessUserTimeLimit
;
869 LARGE_INTEGER PerJobUserTimeLimit
;
871 ULONG MinimumWorkingSetSize
;
872 ULONG MaximumWorkingSetSize
;
873 ULONG ActiveProcessLimit
;
876 ULONG UIRestrictionsClass
;
877 ULONG SecurityLimitFlags
;
879 PPS_JOB_TOKEN_FILTER Filter
;
880 ULONG EndOfJobTimeAction
;
881 PVOID CompletionPort
;
884 ULONG SchedulingClass
;
885 ULONGLONG ReadOperationCount
;
886 ULONGLONG WriteOperationCount
;
887 ULONGLONG OtherOperationCount
;
888 ULONGLONG ReadTransferCount
;
889 ULONGLONG WriteTransferCount
;
890 ULONGLONG OtherTransferCount
;
892 ULONG ProcessMemoryLimit
;
893 ULONG JobMemoryLimit
;
894 ULONG PeakProcessMemoryUsed
;
895 ULONG PeakJobMemoryUsed
;
896 ULONG CurrentJobMemoryUsed
;
897 KGUARDED_MUTEX MemoryLimitsLock
;
904 // Win32K Callback Registration Data
906 typedef struct _W32_CALLOUT_DATA
908 PW32_PROCESS_CALLBACK W32ProcessCallout
;
909 PW32_THREAD_CALLBACK W32ThreadCallout
;
910 PVOID UserGlobalAtomTableCallout
;
911 PVOID UserPowerEventCallout
;
912 PVOID UserPowerStateCallout
;
913 PVOID UserJobCallout
;
914 PVOID NtGdiUserFlushUserBatch
;
915 OB_OPEN_METHOD DesktopOpen
;
917 OB_DELETE_METHOD DesktopDelete
;
918 OB_OKAYTOCLOSE_METHOD WinstaOkayToClose
;
919 OB_DELETE_METHOD WinStaDelete
;
920 OB_PARSE_METHOD WinStaParse
;
921 OB_OPEN_METHOD WinStaOpen
;
923 /* FIXME: REACTOS ONLY */
924 OB_FIND_METHOD WinStaFind
;
925 OB_OPEN_METHOD WinStaCreate
;
926 OB_CREATE_METHOD DesktopCreate
;
928 } W32_CALLOUT_DATA
, *PW32_CALLOUT_DATA
;
930 #endif // !NTOS_MODE_USER