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)
12 /* DEPENDENCIES **************************************************************/
16 /* EXPORTED DATA *************************************************************/
18 extern NTOSAPI
struct _EPROCESS
* PsInitialSystemProcess
;
19 extern NTOSAPI POBJECT_TYPE PsProcessType
;
20 extern NTOSAPI POBJECT_TYPE PsThreadType
;
22 /* CONSTANTS *****************************************************************/
24 /* These are not exposed to drivers normally */
25 #ifndef _NTOS_MODE_USER
26 #define JOB_OBJECT_ASSIGN_PROCESS (1)
27 #define JOB_OBJECT_SET_ATTRIBUTES (2)
28 #define JOB_OBJECT_QUERY (4)
29 #define JOB_OBJECT_TERMINATE (8)
30 #define JOB_OBJECT_SET_SECURITY_ATTRIBUTES (16)
31 #define JOB_OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|31)
34 /* FIXME: This was changed in XP... Ask ThomasW about it */
35 #define PROCESS_SET_PORT 0x800
37 #define THREAD_ALERT 0x4
39 #define USER_SHARED_DATA (0x7FFE0000)
41 #define PROCESS_PRIORITY_CLASS_NORMAL (2) /* FIXME */
44 #define FLG_STOP_ON_EXCEPTION 0x00000001
45 #define FLG_SHOW_LDR_SNAPS 0x00000002
46 #define FLG_DEBUG_INITIAL_COMMAND 0x00000004
47 #define FLG_STOP_ON_HUNG_GUI 0x00000008
48 #define FLG_HEAP_ENABLE_TAIL_CHECK 0x00000010
49 #define FLG_HEAP_ENABLE_FREE_CHECK 0x00000020
50 #define FLG_HEAP_VALIDATE_PARAMETERS 0x00000040
51 #define FLG_HEAP_VALIDATE_ALL 0x00000080
52 #define FLG_POOL_ENABLE_TAIL_CHECK 0x00000100
53 #define FLG_POOL_ENABLE_FREE_CHECK 0x00000200
54 #define FLG_POOL_ENABLE_TAGGING 0x00000400
55 #define FLG_HEAP_ENABLE_TAGGING 0x00000800
56 #define FLG_USER_STACK_TRACE_DB 0x00001000
57 #define FLG_KERNEL_STACK_TRACE_DB 0x00002000
58 #define FLG_MAINTAIN_OBJECT_TYPELIST 0x00004000
59 #define FLG_HEAP_ENABLE_TAG_BY_DLL 0x00008000
60 #define FLG_IGNORE_DEBUG_PRIV 0x00010000
61 #define FLG_ENABLE_CSRDEBUG 0x00020000
62 #define FLG_ENABLE_KDEBUG_SYMBOL_LOAD 0x00040000
63 #define FLG_DISABLE_PAGE_KERNEL_STACKS 0x00080000
64 #define FLG_HEAP_ENABLE_CALL_TRACING 0x00100000
65 #define FLG_HEAP_DISABLE_COALESCING 0x00200000
66 #define FLG_ENABLE_CLOSE_EXCEPTIONS 0x00400000
67 #define FLG_ENABLE_EXCEPTION_LOGGING 0x00800000
68 #define FLG_ENABLE_HANDLE_TYPE_TAGGING 0x01000000
69 #define FLG_HEAP_PAGE_ALLOCS 0x02000000
70 #define FLG_DEBUG_INITIAL_COMMAND_EX 0x04000000
72 /* ENUMERATIONS **************************************************************/
74 /* FUNCTION TYPES ************************************************************/
75 typedef VOID (STDCALL
*PPEBLOCKROUTINE
)(PVOID
);
78 (STDCALL
*PW32_PROCESS_CALLBACK
)(
79 struct _EPROCESS
*Process
,
84 (STDCALL
*PW32_THREAD_CALLBACK
)(
85 struct _ETHREAD
*Thread
,
89 /* TYPES *********************************************************************/
93 typedef struct _CURDIR
95 UNICODE_STRING DosPath
;
99 typedef struct _PEB_FREE_BLOCK
101 struct _PEB_FREE_BLOCK
* Next
;
103 } PEB_FREE_BLOCK
, *PPEB_FREE_BLOCK
;
107 UCHAR InheritedAddressSpace
; /* 00h */
108 UCHAR ReadImageFileExecOptions
; /* 01h */
109 UCHAR BeingDebugged
; /* 02h */
110 BOOLEAN SpareBool
; /* 03h */
111 HANDLE Mutant
; /* 04h */
112 PVOID ImageBaseAddress
; /* 08h */
113 PPEB_LDR_DATA Ldr
; /* 0Ch */
114 PRTL_USER_PROCESS_PARAMETERS ProcessParameters
; /* 10h */
115 PVOID SubSystemData
; /* 14h */
116 PVOID ProcessHeap
; /* 18h */
117 PVOID FastPebLock
; /* 1Ch */
118 PPEBLOCKROUTINE FastPebLockRoutine
; /* 20h */
119 PPEBLOCKROUTINE FastPebUnlockRoutine
; /* 24h */
120 ULONG EnvironmentUpdateCount
; /* 28h */
121 PVOID
* KernelCallbackTable
; /* 2Ch */
122 PVOID EventLogSection
; /* 30h */
123 PVOID EventLog
; /* 34h */
124 PPEB_FREE_BLOCK FreeList
; /* 38h */
125 ULONG TlsExpansionCounter
; /* 3Ch */
126 PVOID TlsBitmap
; /* 40h */
127 ULONG TlsBitmapBits
[0x2]; /* 44h */
128 PVOID ReadOnlySharedMemoryBase
; /* 4Ch */
129 PVOID ReadOnlySharedMemoryHeap
; /* 50h */
130 PVOID
* ReadOnlyStaticServerData
; /* 54h */
131 PVOID AnsiCodePageData
; /* 58h */
132 PVOID OemCodePageData
; /* 5Ch */
133 PVOID UnicodeCaseTableData
; /* 60h */
134 ULONG NumberOfProcessors
; /* 64h */
135 ULONG NtGlobalFlag
; /* 68h */
136 LARGE_INTEGER CriticalSectionTimeout
; /* 70h */
137 ULONG HeapSegmentReserve
; /* 78h */
138 ULONG HeapSegmentCommit
; /* 7Ch */
139 ULONG HeapDeCommitTotalFreeThreshold
; /* 80h */
140 ULONG HeapDeCommitFreeBlockThreshold
; /* 84h */
141 ULONG NumberOfHeaps
; /* 88h */
142 ULONG MaximumNumberOfHeaps
; /* 8Ch */
143 PVOID
* ProcessHeaps
; /* 90h */
144 PVOID GdiSharedHandleTable
; /* 94h */
145 PVOID ProcessStarterHelper
; /* 98h */
146 PVOID GdiDCAttributeList
; /* 9Ch */
147 PVOID LoaderLock
; /* A0h */
148 ULONG OSMajorVersion
; /* A4h */
149 ULONG OSMinorVersion
; /* A8h */
150 USHORT OSBuildNumber
; /* ACh */
151 USHORT OSCSDVersion
; /* AEh */
152 ULONG OSPlatformId
; /* B0h */
153 ULONG ImageSubSystem
; /* B4h */
154 ULONG ImageSubSystemMajorVersion
; /* B8h */
155 ULONG ImageSubSystemMinorVersion
; /* BCh */
156 ULONG ImageProcessAffinityMask
; /* C0h */
157 ULONG GdiHandleBuffer
[0x22]; /* C4h */
158 PVOID PostProcessInitRoutine
; /* 14Ch */
159 PVOID
*TlsExpansionBitmap
; /* 150h */
160 ULONG TlsExpansionBitmapBits
[0x20]; /* 154h */
161 ULONG SessionId
; /* 1D4h */
162 PVOID AppCompatInfo
; /* 1D8h */
163 UNICODE_STRING CSDVersion
; /* 1DCh */
166 typedef struct _GDI_TEB_BATCH
171 } GDI_TEB_BATCH
, *PGDI_TEB_BATCH
;
173 typedef struct _INITIAL_TEB
178 PVOID StackCommitMax
;
180 } INITIAL_TEB
, *PINITIAL_TEB
;
184 NT_TIB Tib
; /* 00h */
185 PVOID EnvironmentPointer
; /* 1Ch */
186 CLIENT_ID Cid
; /* 20h */
187 PVOID ActiveRpcInfo
; /* 28h */
188 PVOID ThreadLocalStoragePointer
; /* 2Ch */
189 struct _PEB
*Peb
; /* 30h */
190 ULONG LastErrorValue
; /* 34h */
191 ULONG CountOfOwnedCriticalSections
; /* 38h */
192 PVOID CsrClientThread
; /* 3Ch */
193 struct _W32THREAD
* Win32ThreadInfo
; /* 40h */
194 ULONG Win32ClientInfo
[0x1F]; /* 44h */
195 PVOID WOW32Reserved
; /* C0h */
196 LCID CurrentLocale
; /* C4h */
197 ULONG FpSoftwareStatusRegister
; /* C8h */
198 PVOID SystemReserved1
[0x36]; /* CCh */
199 PVOID Spare1
; /* 1A4h */
200 LONG ExceptionCode
; /* 1A8h */
201 UCHAR SpareBytes1
[0x28]; /* 1ACh */
202 PVOID SystemReserved2
[0xA]; /* 1D4h */
203 GDI_TEB_BATCH GdiTebBatch
; /* 1FCh */
204 ULONG gdiRgn
; /* 6DCh */
205 ULONG gdiPen
; /* 6E0h */
206 ULONG gdiBrush
; /* 6E4h */
207 CLIENT_ID RealClientId
; /* 6E8h */
208 PVOID GdiCachedProcessHandle
; /* 6F0h */
209 ULONG GdiClientPID
; /* 6F4h */
210 ULONG GdiClientTID
; /* 6F8h */
211 PVOID GdiThreadLocaleInfo
; /* 6FCh */
212 PVOID UserReserved
[5]; /* 700h */
213 PVOID glDispatchTable
[0x118]; /* 714h */
214 ULONG glReserved1
[0x1A]; /* B74h */
215 PVOID glReserved2
; /* BDCh */
216 PVOID glSectionInfo
; /* BE0h */
217 PVOID glSection
; /* BE4h */
218 PVOID glTable
; /* BE8h */
219 PVOID glCurrentRC
; /* BECh */
220 PVOID glContext
; /* BF0h */
221 NTSTATUS LastStatusValue
; /* BF4h */
222 UNICODE_STRING StaticUnicodeString
; /* BF8h */
223 WCHAR StaticUnicodeBuffer
[0x105]; /* C00h */
224 PVOID DeallocationStack
; /* E0Ch */
225 PVOID TlsSlots
[0x40]; /* E10h */
226 LIST_ENTRY TlsLinks
; /* F10h */
227 PVOID Vdm
; /* F18h */
228 PVOID ReservedForNtRpc
; /* F1Ch */
229 PVOID DbgSsReserved
[0x2]; /* F20h */
230 ULONG HardErrorDisabled
; /* F28h */
231 PVOID Instrumentation
[0x10]; /* F2Ch */
232 PVOID WinSockData
; /* F6Ch */
233 ULONG GdiBatchCount
; /* F70h */
234 USHORT _Spare2
; /* F74h */
235 BOOLEAN IsFiber
; /* F76h */
236 UCHAR Spare3
; /* F77h */
237 ULONG _Spare4
; /* F78h */
238 ULONG _Spare5
; /* F7Ch */
239 PVOID ReservedForOle
; /* F80h */
240 ULONG WaitingOnLoaderLock
; /* F84h */
241 ULONG _Unknown
[11]; /* F88h */
242 PVOID FlsSlots
; /* FB4h */
243 PVOID WineDebugInfo
; /* Needed for WINE DLL's */