- Fix incompatible IO_STACK_LOCATION definition in W32api ddk/winddk.k
[reactos.git] / reactos / include / ndk / pstypes.h
1 /*
2 * PROJECT: ReactOS Native Headers
3 * FILE: include/ndk/pstypes.h
4 * PURPOSE: Defintions for Process Manager Types not documented in DDK/IFS.
5 * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
6 * UPDATE HISTORY:
7 * Created 06/10/04
8 */
9 #ifndef _PSTYPES_H
10 #define _PSTYPES_H
11
12 /* DEPENDENCIES **************************************************************/
13 #include "ldrtypes.h"
14 #include "mmtypes.h"
15 #include "obtypes.h"
16 #include "extypes.h"
17 #ifndef NTOS_MODE_USER
18 #include "setypes.h"
19 #endif
20
21 /* EXPORTED DATA *************************************************************/
22
23 #ifndef NTOS_MODE_USER
24 extern NTOSAPI struct _EPROCESS* PsInitialSystemProcess;
25 extern NTOSAPI POBJECT_TYPE PsProcessType;
26 extern NTOSAPI POBJECT_TYPE PsThreadType;
27 #endif
28
29 /* CONSTANTS *****************************************************************/
30
31 /* These are not exposed to drivers normally */
32 #ifndef NTOS_MODE_USER
33 #define JOB_OBJECT_ASSIGN_PROCESS 1
34 #define JOB_OBJECT_SET_ATTRIBUTES 2
35 #define JOB_OBJECT_QUERY 4
36 #define JOB_OBJECT_TERMINATE 8
37 #define JOB_OBJECT_SET_SECURITY_ATTRIBUTES 16
38 #define JOB_OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|31)
39 #endif
40
41 #define USER_SHARED_DATA (0x7FFE0000)
42
43 #ifdef NTOS_MODE_USER
44 /* Macros for current Process/Thread built-in 'special' ID */
45 #define NtCurrentProcess() ((HANDLE)(LONG_PTR)-1)
46 #define ZwCurrentProcess() NtCurrentProcess()
47 #define NtCurrentThread() ((HANDLE)(LONG_PTR)-2)
48 #define ZwCurrentThread() NtCurrentThread()
49 #endif
50
51 /* Process priority classes */
52 #define PROCESS_PRIORITY_CLASS_INVALID 0
53 #define PROCESS_PRIORITY_CLASS_IDLE 1
54 #define PROCESS_PRIORITY_CLASS_NORMAL 2
55 #define PROCESS_PRIORITY_CLASS_HIGH 3
56 #define PROCESS_PRIORITY_CLASS_REALTIME 4
57 #define PROCESS_PRIORITY_CLASS_BELOW_NORMAL 5
58 #define PROCESS_PRIORITY_CLASS_ABOVE_NORMAL 6
59
60 /* Global Flags */
61 #define FLG_STOP_ON_EXCEPTION 0x00000001
62 #define FLG_SHOW_LDR_SNAPS 0x00000002
63 #define FLG_DEBUG_INITIAL_COMMAND 0x00000004
64 #define FLG_STOP_ON_HUNG_GUI 0x00000008
65 #define FLG_HEAP_ENABLE_TAIL_CHECK 0x00000010
66 #define FLG_HEAP_ENABLE_FREE_CHECK 0x00000020
67 #define FLG_HEAP_VALIDATE_PARAMETERS 0x00000040
68 #define FLG_HEAP_VALIDATE_ALL 0x00000080
69 #define FLG_POOL_ENABLE_TAIL_CHECK 0x00000100
70 #define FLG_POOL_ENABLE_FREE_CHECK 0x00000200
71 #define FLG_POOL_ENABLE_TAGGING 0x00000400
72 #define FLG_HEAP_ENABLE_TAGGING 0x00000800
73 #define FLG_USER_STACK_TRACE_DB 0x00001000
74 #define FLG_KERNEL_STACK_TRACE_DB 0x00002000
75 #define FLG_MAINTAIN_OBJECT_TYPELIST 0x00004000
76 #define FLG_HEAP_ENABLE_TAG_BY_DLL 0x00008000
77 #define FLG_IGNORE_DEBUG_PRIV 0x00010000
78 #define FLG_ENABLE_CSRDEBUG 0x00020000
79 #define FLG_ENABLE_KDEBUG_SYMBOL_LOAD 0x00040000
80 #define FLG_DISABLE_PAGE_KERNEL_STACKS 0x00080000
81 #define FLG_HEAP_ENABLE_CALL_TRACING 0x00100000
82 #define FLG_HEAP_DISABLE_COALESCING 0x00200000
83 #define FLG_ENABLE_CLOSE_EXCEPTIONS 0x00400000
84 #define FLG_ENABLE_EXCEPTION_LOGGING 0x00800000
85 #define FLG_ENABLE_HANDLE_TYPE_TAGGING 0x01000000
86 #define FLG_HEAP_PAGE_ALLOCS 0x02000000
87 #define FLG_DEBUG_INITIAL_COMMAND_EX 0x04000000
88
89 /* ENUMERATIONS **************************************************************/
90
91 #ifdef NTOS_MODE_USER
92 typedef enum _PROCESSINFOCLASS
93 {
94 ProcessBasicInformation,
95 ProcessQuotaLimits,
96 ProcessIoCounters,
97 ProcessVmCounters,
98 ProcessTimes,
99 ProcessBasePriority,
100 ProcessRaisePriority,
101 ProcessDebugPort,
102 ProcessExceptionPort,
103 ProcessAccessToken,
104 ProcessLdtInformation,
105 ProcessLdtSize,
106 ProcessDefaultHardErrorMode,
107 ProcessIoPortHandlers,
108 ProcessPooledUsageAndLimits,
109 ProcessWorkingSetWatch,
110 ProcessUserModeIOPL,
111 ProcessEnableAlignmentFaultFixup,
112 ProcessPriorityClass,
113 ProcessWx86Information,
114 ProcessHandleCount,
115 ProcessAffinityMask,
116 ProcessPriorityBoost,
117 ProcessDeviceMap,
118 ProcessSessionInformation,
119 ProcessForegroundInformation,
120 ProcessWow64Information,
121 ProcessImageFileName,
122 ProcessLUIDDeviceMapsEnabled,
123 ProcessBreakOnTermination,
124 ProcessDebugObjectHandle,
125 ProcessDebugFlags,
126 ProcessHandleTracing,
127 MaxProcessInfoClass
128 } PROCESSINFOCLASS;
129
130 typedef enum _THREADINFOCLASS
131 {
132 ThreadBasicInformation,
133 ThreadTimes,
134 ThreadPriority,
135 ThreadBasePriority,
136 ThreadAffinityMask,
137 ThreadImpersonationToken,
138 ThreadDescriptorTableEntry,
139 ThreadEnableAlignmentFaultFixup,
140 ThreadEventPair_Reusable,
141 ThreadQuerySetWin32StartAddress,
142 ThreadZeroTlsCell,
143 ThreadPerformanceCount,
144 ThreadAmILastThread,
145 ThreadIdealProcessor,
146 ThreadPriorityBoost,
147 ThreadSetTlsArrayAddress,
148 ThreadIsIoPending,
149 ThreadHideFromDebugger,
150 ThreadBreakOnTermination,
151 MaxThreadInfoClass
152 } THREADINFOCLASS;
153 #endif
154
155 /* FUNCTION TYPES ************************************************************/
156 typedef VOID (NTAPI *PPEBLOCKROUTINE)(PVOID);
157
158 #ifndef NTOS_MODE_USER
159 typedef NTSTATUS
160 (NTAPI *PW32_PROCESS_CALLBACK)(
161 struct _EPROCESS *Process,
162 BOOLEAN Create
163 );
164
165 typedef NTSTATUS
166 (NTAPI *PW32_THREAD_CALLBACK)(
167 struct _ETHREAD *Thread,
168 BOOLEAN Create
169 );
170 #endif
171
172 /* TYPES *********************************************************************/
173
174 #ifdef NTOS_MODE_USER
175 typedef struct _CLIENT_ID
176 {
177 HANDLE UniqueProcess;
178 HANDLE UniqueThread;
179 } CLIENT_ID, *PCLIENT_ID;
180 #endif
181
182 struct _W32THREAD;
183 struct _W32PROCESS;
184
185 struct _ETHREAD;
186
187 typedef struct _DESCRIPTOR_TABLE_ENTRY
188 {
189 ULONG Selector;
190 LDT_ENTRY Descriptor;
191 } DESCRIPTOR_TABLE_ENTRY, *PDESCRIPTOR_TABLE_ENTRY;
192
193 typedef struct _PEB_FREE_BLOCK
194 {
195 struct _PEB_FREE_BLOCK* Next;
196 ULONG Size;
197 } PEB_FREE_BLOCK, *PPEB_FREE_BLOCK;
198
199 typedef struct _PEB
200 {
201 UCHAR InheritedAddressSpace; /* 00h */
202 UCHAR ReadImageFileExecOptions; /* 01h */
203 UCHAR BeingDebugged; /* 02h */
204 BOOLEAN SpareBool; /* 03h */
205 HANDLE Mutant; /* 04h */
206 PVOID ImageBaseAddress; /* 08h */
207 PPEB_LDR_DATA Ldr; /* 0Ch */
208 struct _RTL_USER_PROCESS_PARAMETERS *ProcessParameters; /* 10h */
209 PVOID SubSystemData; /* 14h */
210 PVOID ProcessHeap; /* 18h */
211 PVOID FastPebLock; /* 1Ch */
212 PPEBLOCKROUTINE FastPebLockRoutine; /* 20h */
213 PPEBLOCKROUTINE FastPebUnlockRoutine; /* 24h */
214 ULONG EnvironmentUpdateCount; /* 28h */
215 PVOID* KernelCallbackTable; /* 2Ch */
216 PVOID EventLogSection; /* 30h */
217 PVOID EventLog; /* 34h */
218 PPEB_FREE_BLOCK FreeList; /* 38h */
219 ULONG TlsExpansionCounter; /* 3Ch */
220 PVOID TlsBitmap; /* 40h */
221 ULONG TlsBitmapBits[0x2]; /* 44h */
222 PVOID ReadOnlySharedMemoryBase; /* 4Ch */
223 PVOID ReadOnlySharedMemoryHeap; /* 50h */
224 PVOID* ReadOnlyStaticServerData; /* 54h */
225 PVOID AnsiCodePageData; /* 58h */
226 PVOID OemCodePageData; /* 5Ch */
227 PVOID UnicodeCaseTableData; /* 60h */
228 ULONG NumberOfProcessors; /* 64h */
229 ULONG NtGlobalFlag; /* 68h */
230 LARGE_INTEGER CriticalSectionTimeout; /* 70h */
231 ULONG HeapSegmentReserve; /* 78h */
232 ULONG HeapSegmentCommit; /* 7Ch */
233 ULONG HeapDeCommitTotalFreeThreshold; /* 80h */
234 ULONG HeapDeCommitFreeBlockThreshold; /* 84h */
235 ULONG NumberOfHeaps; /* 88h */
236 ULONG MaximumNumberOfHeaps; /* 8Ch */
237 PVOID* ProcessHeaps; /* 90h */
238 PVOID GdiSharedHandleTable; /* 94h */
239 PVOID ProcessStarterHelper; /* 98h */
240 PVOID GdiDCAttributeList; /* 9Ch */
241 PVOID LoaderLock; /* A0h */
242 ULONG OSMajorVersion; /* A4h */
243 ULONG OSMinorVersion; /* A8h */
244 USHORT OSBuildNumber; /* ACh */
245 USHORT OSCSDVersion; /* AEh */
246 ULONG OSPlatformId; /* B0h */
247 ULONG ImageSubSystem; /* B4h */
248 ULONG ImageSubSystemMajorVersion; /* B8h */
249 ULONG ImageSubSystemMinorVersion; /* BCh */
250 ULONG ImageProcessAffinityMask; /* C0h */
251 ULONG GdiHandleBuffer[0x22]; /* C4h */
252 PVOID PostProcessInitRoutine; /* 14Ch */
253 struct _RTL_BITMAP *TlsExpansionBitmap; /* 150h */
254 ULONG TlsExpansionBitmapBits[0x20]; /* 154h */
255 ULONG SessionId; /* 1D4h */
256 PVOID AppCompatInfo; /* 1D8h */
257 UNICODE_STRING CSDVersion; /* 1DCh */
258 } PEB, *PPEB;
259
260 typedef struct _GDI_TEB_BATCH
261 {
262 ULONG Offset;
263 ULONG HDC;
264 ULONG Buffer[0x136];
265 } GDI_TEB_BATCH, *PGDI_TEB_BATCH;
266
267 typedef struct _INITIAL_TEB
268 {
269 PVOID PreviousStackBase;
270 PVOID PreviousStackLimit;
271 PVOID StackBase;
272 PVOID StackLimit;
273 PVOID AllocatedStackBase;
274 } INITIAL_TEB, *PINITIAL_TEB;
275
276 typedef struct _TEB_ACTIVE_FRAME_CONTEXT
277 {
278 ULONG Flags;
279 LPSTR FrameName;
280 } TEB_ACTIVE_FRAME_CONTEXT, *PTEB_ACTIVE_FRAME_CONTEXT;
281
282 typedef struct _TEB_ACTIVE_FRAME
283 {
284 ULONG Flags;
285 struct _TEB_ACTIVE_FRAME *Previous;
286 PTEB_ACTIVE_FRAME_CONTEXT Context;
287 } TEB_ACTIVE_FRAME, *PTEB_ACTIVE_FRAME;
288
289 typedef struct _TEB
290 {
291 NT_TIB Tib; /* 00h */
292 PVOID EnvironmentPointer; /* 1Ch */
293 CLIENT_ID Cid; /* 20h */
294 PVOID ActiveRpcHandle; /* 28h */
295 PVOID ThreadLocalStoragePointer; /* 2Ch */
296 struct _PEB *ProcessEnvironmentBlock; /* 30h */
297 ULONG LastErrorValue; /* 34h */
298 ULONG CountOfOwnedCriticalSections; /* 38h */
299 PVOID CsrClientThread; /* 3Ch */
300 struct _W32THREAD* Win32ThreadInfo; /* 40h */
301 ULONG User32Reserved[0x1A]; /* 44h */
302 ULONG UserReserved[5]; /* ACh */
303 PVOID WOW32Reserved; /* C0h */
304 LCID CurrentLocale; /* C4h */
305 ULONG FpSoftwareStatusRegister; /* C8h */
306 PVOID SystemReserved1[0x36]; /* CCh */
307 LONG ExceptionCode; /* 1A4h */
308 struct _ACTIVATION_CONTEXT_STACK *ActivationContextStackPointer; /* 1A8h */
309 UCHAR SpareBytes1[0x28]; /* 1ACh */
310 GDI_TEB_BATCH GdiTebBatch; /* 1D4h */
311 CLIENT_ID RealClientId; /* 6B4h */
312 PVOID GdiCachedProcessHandle; /* 6BCh */
313 ULONG GdiClientPID; /* 6C0h */
314 ULONG GdiClientTID; /* 6C4h */
315 PVOID GdiThreadLocalInfo; /* 6C8h */
316 ULONG Win32ClientInfo[62]; /* 6CCh */
317 PVOID glDispatchTable[0xE9]; /* 7C4h */
318 ULONG glReserved1[0x1D]; /* B68h */
319 PVOID glReserved2; /* BDCh */
320 PVOID glSectionInfo; /* BE0h */
321 PVOID glSection; /* BE4h */
322 PVOID glTable; /* BE8h */
323 PVOID glCurrentRC; /* BECh */
324 PVOID glContext; /* BF0h */
325 NTSTATUS LastStatusValue; /* BF4h */
326 UNICODE_STRING StaticUnicodeString; /* BF8h */
327 WCHAR StaticUnicodeBuffer[0x105]; /* C00h */
328 PVOID DeallocationStack; /* E0Ch */
329 PVOID TlsSlots[0x40]; /* E10h */
330 LIST_ENTRY TlsLinks; /* F10h */
331 PVOID Vdm; /* F18h */
332 PVOID ReservedForNtRpc; /* F1Ch */
333 PVOID DbgSsReserved[0x2]; /* F20h */
334 ULONG HardErrorDisabled; /* F28h */
335 PVOID Instrumentation[14]; /* F2Ch */
336 PVOID SubProcessTag; /* F64h */
337 PVOID EtwTraceData; /* F68h */
338 PVOID WinSockData; /* F6Ch */
339 ULONG GdiBatchCount; /* F70h */
340 BOOLEAN InDbgPrint; /* F74h */
341 BOOLEAN FreeStackOnTermination; /* F75h */
342 BOOLEAN HasFiberData; /* F76h */
343 UCHAR IdealProcessor; /* F77h */
344 ULONG GuaranteedStackBytes; /* F78h */
345 PVOID ReservedForPerf; /* F7Ch */
346 PVOID ReservedForOle; /* F80h */
347 ULONG WaitingOnLoaderLock; /* F84h */
348 ULONG SparePointer1; /* F88h */
349 ULONG SoftPatchPtr1; /* F8Ch */
350 ULONG SoftPatchPtr2; /* F90h */
351 PVOID *TlsExpansionSlots; /* F94h */
352 ULONG ImpersionationLocale; /* F98h */
353 ULONG IsImpersonating; /* F9Ch */
354 PVOID NlsCache; /* FA0h */
355 PVOID pShimData; /* FA4h */
356 ULONG HeapVirualAffinity; /* FA8h */
357 PVOID CurrentTransactionHandle; /* FACh */
358 PTEB_ACTIVE_FRAME ActiveFrame; /* FB0h */
359 PVOID FlsData; /* FB4h */
360 UCHAR SafeThunkCall; /* FB8h */
361 UCHAR BooleanSpare[3]; /* FB9h */
362 } TEB, *PTEB;
363
364 #ifndef NTOS_MODE_USER
365 /* FIXME: see note in mmtypes.h */
366 #ifdef _NTOSKRNL_
367 #include <internal/mm.h>
368 #endif
369
370 typedef struct _EPROCESS_QUOTA_ENTRY
371 {
372 SIZE_T Usage;
373 SIZE_T Limit;
374 SIZE_T Peak;
375 SIZE_T Return;
376 } EPROCESS_QUOTA_ENTRY, *PEPROCESS_QUOTA_ENTRY;
377
378 typedef struct _EPROCESS_QUOTA_BLOCK
379 {
380 EPROCESS_QUOTA_ENTRY QuotaEntry[3];
381 LIST_ENTRY QuotaList;
382 ULONG ReferenceCount;
383 ULONG ProcessCount;
384 } EPROCESS_QUOTA_BLOCK, *PEPROCESS_QUOTA_BLOCK;
385
386 typedef struct _PAGEFAULT_HISTORY
387 {
388 ULONG CurrentIndex;
389 ULONG MapIndex;
390 KSPIN_LOCK SpinLock;
391 PVOID Reserved;
392 PROCESS_WS_WATCH_INFORMATION WatchInfo[1];
393 } PAGEFAULT_HISTORY, *PPAGEFAULT_HISTORY;
394
395 typedef struct _PS_IMPERSONATION_INFORMATION
396 {
397 PACCESS_TOKEN Token;
398 BOOLEAN CopyOnOpen;
399 BOOLEAN EffectiveOnly;
400 SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
401 } PS_IMPERSONATION_INFORMATION, *PPS_IMPERSONATION_INFORMATION;
402
403 #include <pshpack4.h>
404 typedef struct _ETHREAD
405 {
406 KTHREAD Tcb; /* 1C0 */
407 LARGE_INTEGER CreateTime; /* 1C0 */
408 LARGE_INTEGER ExitTime; /* 1C0 */
409 union
410 {
411 LIST_ENTRY LpcReplyChain; /* 1C0 */
412 LIST_ENTRY KeyedWaitChain; /* 1C0 */
413 };
414 union
415 {
416 NTSTATUS ExitStatus; /* 1C8 */
417 PVOID OfsChain; /* 1C8 */
418 };
419 LIST_ENTRY PostBlockList; /* 1CC */
420 union
421 {
422 struct _TERMINATION_PORT *TerminationPort; /* 1D4 */
423 struct _ETHREAD *ReaperLink; /* 1D4 */
424 PVOID KeyedWaitValue; /* 1D4 */
425 };
426 KSPIN_LOCK ActiveTimerListLock; /* 1D8 */
427 LIST_ENTRY ActiveTimerListHead; /* 1D8 */
428 CLIENT_ID Cid; /* 1E0 */
429 union
430 {
431 KSEMAPHORE LpcReplySemaphore; /* 1E4 */
432 KSEMAPHORE KeyedReplySemaphore; /* 1E4 */
433 };
434 union
435 {
436 PVOID LpcReplyMessage; /* 200 */
437 PVOID LpcWaitingOnPort; /* 200 */
438 };
439 PPS_IMPERSONATION_INFORMATION ImpersonationInfo; /* 204 */
440 LIST_ENTRY IrpList; /* 208 */
441 ULONG TopLevelIrp; /* 210 */
442 PDEVICE_OBJECT DeviceToVerify; /* 214 */
443 struct _EPROCESS *ThreadsProcess; /* 218 */
444 PKSTART_ROUTINE StartAddress; /* 21C */
445 union
446 {
447 PVOID Win32StartAddress; /* 220 */
448 ULONG LpcReceivedMessageId; /* 220 */
449 };
450 LIST_ENTRY ThreadListEntry; /* 224 */
451 EX_RUNDOWN_REF RundownProtect; /* 22C */
452 EX_PUSH_LOCK ThreadLock; /* 230 */
453 ULONG LpcReplyMessageId; /* 234 */
454 ULONG ReadClusterSize; /* 238 */
455 ACCESS_MASK GrantedAccess; /* 23C */
456 union
457 {
458 struct
459 {
460 ULONG Terminated:1;
461 ULONG DeadThread:1;
462 ULONG HideFromDebugger:1;
463 ULONG ActiveImpersonationInfo:1;
464 ULONG SystemThread:1;
465 ULONG HardErrorsAreDisabled:1;
466 ULONG BreakOnTermination:1;
467 ULONG SkipCreationMsg:1;
468 ULONG SkipTerminationMsg:1;
469 };
470 ULONG CrossThreadFlags; /* 240 */
471 };
472 union
473 {
474 struct
475 {
476 ULONG ActiveExWorker:1;
477 ULONG ExWorkerCanWaitUser:1;
478 ULONG MemoryMaker:1;
479 ULONG KeyedEventInUse:1;
480 };
481 ULONG SameThreadPassiveFlags; /* 244 */
482 };
483 union
484 {
485 struct
486 {
487 ULONG LpcReceivedMsgIdValid:1;
488 ULONG LpcExitThreadCalled:1;
489 ULONG AddressSpaceOwner:1;
490 ULONG OwnsProcessWorkingSetExclusive:1;
491 ULONG OwnsProcessWorkingSetShared:1;
492 ULONG OwnsSystemWorkingSetExclusive:1;
493 ULONG OwnsSystemWorkingSetShared:1;
494 ULONG OwnsSessionWorkingSetExclusive:1;
495 ULONG OwnsSessionWorkingSetShared:1;
496 ULONG ApcNeeded:1;
497 };
498 ULONG SameThreadApcFlags; /* 248 */
499 };
500 UCHAR ForwardClusterOnly; /* 24C */
501 UCHAR DisablePageFaultClustering; /* 24D */
502 UCHAR ActiveFaultCount; /* 24E */
503 } ETHREAD;
504
505 typedef struct _EPROCESS
506 {
507 KPROCESS Pcb; /* 000 */
508 EX_PUSH_LOCK ProcessLock; /* 078 */
509 LARGE_INTEGER CreateTime; /* 080 */
510 LARGE_INTEGER ExitTime; /* 088 */
511 EX_RUNDOWN_REF RundownProtect; /* 090 */
512 HANDLE UniqueProcessId; /* 094 */
513 LIST_ENTRY ActiveProcessLinks; /* 098 */
514 ULONG QuotaUsage[3]; /* 0A0 */
515 ULONG QuotaPeak[3]; /* 0AC */
516 ULONG CommitCharge; /* 0B8 */
517 ULONG PeakVirtualSize; /* 0BC */
518 ULONG VirtualSize; /* 0C0 */
519 LIST_ENTRY SessionProcessLinks; /* 0C4 */
520 PVOID DebugPort; /* 0CC */
521 PVOID ExceptionPort; /* 0D0 */
522 PHANDLE_TABLE ObjectTable; /* 0D4 */
523 EX_FAST_REF Token; /* 0D8 */
524 ULONG WorkingSetPage; /* 0DC */
525 KGUARDED_MUTEX AddressCreationLock; /* 0E0 */
526 KSPIN_LOCK HyperSpaceLock; /* 100 */
527 PETHREAD ForkInProgress; /* 104 */
528 ULONG HardwareTrigger; /* 108 */
529 MM_AVL_TABLE PhysicalVadroot; /* 10C */
530 PVOID CloneRoot; /* 110 */
531 ULONG NumberOfPrivatePages; /* 114 */
532 ULONG NumberOfLockedPages; /* 118 */
533 PVOID *Win32Process; /* 11C */
534 struct _EJOB *Job; /* 120 */
535 PVOID SectionObject; /* 124 */
536 PVOID SectionBaseAddress; /* 128 */
537 PEPROCESS_QUOTA_BLOCK QuotaBlock; /* 12C */
538 PPAGEFAULT_HISTORY WorkingSetWatch; /* 130 */
539 PVOID Win32WindowStation; /* 134 */
540 HANDLE InheritedFromUniqueProcessId; /* 138 */
541 PVOID LdtInformation; /* 13C */
542 PVOID VadFreeHint; /* 140 */
543 PVOID VdmObjects; /* 144 */
544 PVOID DeviceMap; /* 148 */
545 PVOID Spare0[3]; /* 14C */
546 union
547 {
548 HARDWARE_PTE_X86 PagedirectoryPte; /* 158 */
549 ULONGLONG Filler; /* 158 */
550 };
551 ULONG Session; /* 160 */
552 CHAR ImageFileName[16]; /* 164 */
553 LIST_ENTRY JobLinks; /* 174 */
554 PVOID LockedPagesList; /* 17C */
555 LIST_ENTRY ThreadListHead; /* 184 */
556 PVOID SecurityPort; /* 188 */
557 PVOID PaeTop; /* 18C */
558 ULONG ActiveThreds; /* 190 */
559 ACCESS_MASK GrantedAccess; /* 194 */
560 ULONG DefaultHardErrorProcessing; /* 198 */
561 NTSTATUS LastThreadExitStatus; /* 19C */
562 struct _PEB* Peb; /* 1A0 */
563 EX_FAST_REF PrefetchTrace; /* 1A4 */
564 LARGE_INTEGER ReadOperationCount; /* 1A8 */
565 LARGE_INTEGER WriteOperationCount; /* 1B0 */
566 LARGE_INTEGER OtherOperationCount; /* 1B8 */
567 LARGE_INTEGER ReadTransferCount; /* 1C0 */
568 LARGE_INTEGER WriteTransferCount; /* 1C8 */
569 LARGE_INTEGER OtherTransferCount; /* 1D0 */
570 ULONG CommitChargeLimit; /* 1D8 */
571 ULONG CommitChargePeak; /* 1DC */
572 PVOID AweInfo; /* 1E0 */
573 SE_AUDIT_PROCESS_CREATION_INFO SeAuditProcessCreationInfo; /* 1E4 */
574 MMSUPPORT Vm; /* 1E8 */
575 LIST_ENTRY MmProcessLinks; /* 230 */
576 ULONG ModifiedPageCount; /* 238 */
577 ULONG JobStatus; /* 23C */
578 union
579 {
580 struct
581 {
582 ULONG CreateReported:1;
583 ULONG NoDebugInherit:1;
584 ULONG ProcessExiting:1;
585 ULONG ProcessDelete:1;
586 ULONG Wow64SplitPages:1;
587 ULONG VmDeleted:1;
588 ULONG OutswapEnabled:1;
589 ULONG Outswapped:1;
590 ULONG ForkFailed:1;
591 ULONG Wow64VaSpace4Gb:1;
592 ULONG AddressSpaceInitialized:2;
593 ULONG SetTimerResolution:1;
594 ULONG BreakOnTermination:1;
595 ULONG SessionCreationUnderway:1;
596 ULONG WriteWatch:1;
597 ULONG ProcessInSession:1;
598 ULONG OverrideAddressSpace:1;
599 ULONG HasAddressSpace:1;
600 ULONG LaunchPrefetched:1;
601 ULONG InjectInpageErrors:1;
602 ULONG VmTopDown:1;
603 ULONG ImageNotifyDone:1;
604 ULONG PdeUpdateNeeded:1;
605 ULONG VdmAllowed:1;
606 ULONG SmapAllowed:1;
607 ULONG CreateFailed:1;
608 ULONG DefaultIoPriority:3;
609 ULONG Spare1:1;
610 ULONG Spare2:1;
611 };
612 ULONG Flags; /* 240 */
613 };
614
615 NTSTATUS ExitStatus; /* 244 */
616 USHORT NextPageColor; /* 248 */
617 union
618 {
619 struct
620 {
621 UCHAR SubSystemMinorVersion; /* 24A */
622 UCHAR SubSystemMajorVersion; /* 24B */
623 };
624 USHORT SubSystemVersion; /* 24A */
625 };
626 UCHAR PriorityClass; /* 24C */
627 MM_AVL_TABLE VadRoot; /* 250 */
628 ULONG Cookie; /* 270 */
629
630 /***************************************************************
631 * REACTOS SPECIFIC START
632 ***************************************************************/
633 /* FIXME WILL BE DEPRECATED WITH PUSHLOCK SUPPORT IN 0.3.0 */
634 KEVENT LockEvent; /* 274 */
635 ULONG LockCount; /* 284 */
636 struct _KTHREAD *LockOwner; /* 288 */
637
638 /* FIXME MOVE TO AVL TREES */
639 MADDRESS_SPACE AddressSpace; /* 28C */
640 } EPROCESS;
641 #include <poppack.h>
642
643 #include <pshpack1.h>
644 typedef struct _PS_JOB_TOKEN_FILTER
645 {
646 UINT CapturedSidCount;
647 PSID_AND_ATTRIBUTES CapturedSids;
648 UINT CapturedSidsLength;
649 UINT CapturedGroupCount;
650 PSID_AND_ATTRIBUTES CapturedGroups;
651 UINT CapturedGroupsLength;
652 UINT CapturedPrivilegeCount;
653 PLUID_AND_ATTRIBUTES CapturedPrivileges;
654 UINT CapturedPrivilegesLength;
655 } PS_JOB_TOKEN_FILTER, *PPS_JOB_TOKEN_FILTER;
656
657 typedef struct _EJOB
658 {
659 KEVENT Event;
660 LIST_ENTRY JobLinks;
661 LIST_ENTRY ProcessListHead;
662 ERESOURCE JobLock;
663 LARGE_INTEGER TotalUserTime;
664 LARGE_INTEGER TotalKernelTime;
665 LARGE_INTEGER ThisPeriodTotalUserTime;
666 LARGE_INTEGER ThisPeriodTotalKernelTime;
667 UINT TotalPageFaultCount;
668 UINT TotalProcesses;
669 UINT ActiveProcesses;
670 UINT TotalTerminatedProcesses;
671 LARGE_INTEGER PerProcessUserTimeLimit;
672 LARGE_INTEGER PerJobUserTimeLimit;
673 UINT LimitFlags;
674 UINT MinimumWorkingSetSize;
675 UINT MaximumWorkingSetSize;
676 UINT ActiveProcessLimit;
677 UINT Affinity;
678 BYTE PriorityClass;
679 UINT UIRestrictionsClass;
680 UINT SecurityLimitFlags;
681 PVOID Token;
682 PPS_JOB_TOKEN_FILTER Filter;
683 UINT EndOfJobTimeAction;
684 PVOID CompletionPort;
685 PVOID CompletionKey;
686 UINT SessionId;
687 UINT SchedulingClass;
688 ULONGLONG ReadOperationCount;
689 ULONGLONG WriteOperationCount;
690 ULONGLONG OtherOperationCount;
691 ULONGLONG ReadTransferCount;
692 ULONGLONG WriteTransferCount;
693 ULONGLONG OtherTransferCount;
694 IO_COUNTERS IoInfo;
695 UINT ProcessMemoryLimit;
696 UINT JobMemoryLimit;
697 UINT PeakProcessMemoryUsed;
698 UINT PeakJobMemoryUsed;
699 UINT CurrentJobMemoryUsed;
700 KGUARDED_MUTEX MemoryLimitsLock;
701 ULONG MemberLevel;
702 ULONG JobFlags;
703 } EJOB, *PEJOB;
704 #include <poppack.h>
705
706 typedef struct _W32_CALLOUT_DATA
707 {
708 PW32_PROCESS_CALLBACK W32ProcessCallout;
709 PW32_THREAD_CALLBACK W32ThreadCallout;
710 PVOID UserGlobalAtomTableCallout;
711 PVOID UserPowerEventCallout;
712 PVOID UserPowerStateCallout;
713 PVOID UserJobCallout;
714 PVOID NtGdiUserFlushUserBatch;
715 OB_OPEN_METHOD DesktopOpen;
716 PVOID DesktopUnmap;
717 OB_DELETE_METHOD DesktopDelete;
718 OB_OKAYTOCLOSE_METHOD WinstaOkayToClose;
719 OB_DELETE_METHOD WinStaDelete;
720 OB_PARSE_METHOD WinStaParse;
721 OB_OPEN_METHOD WinStaOpen;
722
723 /* FIXME: These are ROS-ONLY and are fixed in a future local patch */
724 OB_FIND_METHOD WinStaFind;
725 OB_OPEN_METHOD WinStaCreate;
726 OB_CREATE_METHOD DesktopCreate;
727 } W32_CALLOUT_DATA, *PW32_CALLOUT_DATA;
728
729 #endif
730
731 #endif