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 /* ENUMERATIONS **************************************************************/
43 /* FUNCTION TYPES **********************************************/
44 typedef DWORD (*STDCALL PTHREAD_START_ROUTINE
) (LPVOID
);
46 /* TYPES *********************************************************************/
50 typedef struct _CURDIR
52 UNICODE_STRING DosPath
;
56 typedef struct _PEB_FREE_BLOCK
58 struct _PEB_FREE_BLOCK
* Next
;
60 } PEB_FREE_BLOCK
, *PPEB_FREE_BLOCK
;
64 UCHAR InheritedAddressSpace
; /* 00h */
65 UCHAR ReadImageFileExecOptions
; /* 01h */
66 UCHAR BeingDebugged
; /* 02h */
67 UCHAR Spare
; /* 03h */
68 PVOID Mutant
; /* 04h */
69 PVOID ImageBaseAddress
; /* 08h */
70 PPEB_LDR_DATA Ldr
; /* 0Ch */
71 PRTL_USER_PROCESS_PARAMETERS ProcessParameters
; /* 10h */
72 PVOID SubSystemData
; /* 14h */
73 PVOID ProcessHeap
; /* 18h */
74 PVOID FastPebLock
; /* 1Ch */
75 PPEBLOCKROUTINE FastPebLockRoutine
; /* 20h */
76 PPEBLOCKROUTINE FastPebUnlockRoutine
; /* 24h */
77 ULONG EnvironmentUpdateCount
; /* 28h */
78 PVOID
* KernelCallbackTable
; /* 2Ch */
79 PVOID EventLogSection
; /* 30h */
80 PVOID EventLog
; /* 34h */
81 PPEB_FREE_BLOCK FreeList
; /* 38h */
82 ULONG TlsExpansionCounter
; /* 3Ch */
83 PVOID TlsBitmap
; /* 40h */
84 ULONG TlsBitmapBits
[0x2]; /* 44h */
85 PVOID ReadOnlySharedMemoryBase
; /* 4Ch */
86 PVOID ReadOnlySharedMemoryHeap
; /* 50h */
87 PVOID
* ReadOnlyStaticServerData
; /* 54h */
88 PVOID AnsiCodePageData
; /* 58h */
89 PVOID OemCodePageData
; /* 5Ch */
90 PVOID UnicodeCaseTableData
; /* 60h */
91 ULONG NumberOfProcessors
; /* 64h */
92 ULONG NtGlobalFlag
; /* 68h */
93 UCHAR Spare2
[0x4]; /* 6Ch */
94 LARGE_INTEGER CriticalSectionTimeout
; /* 70h */
95 ULONG HeapSegmentReserve
; /* 78h */
96 ULONG HeapSegmentCommit
; /* 7Ch */
97 ULONG HeapDeCommitTotalFreeThreshold
; /* 80h */
98 ULONG HeapDeCommitFreeBlockThreshold
; /* 84h */
99 ULONG NumberOfHeaps
; /* 88h */
100 ULONG MaximumNumberOfHeaps
; /* 8Ch */
101 PVOID
** ProcessHeaps
; /* 90h */
102 PVOID GdiSharedHandleTable
; /* 94h */
103 PVOID ProcessStarterHelper
; /* 98h */
104 PVOID GdiDCAttributeList
; /* 9Ch */
105 PVOID LoaderLock
; /* A0h */
106 ULONG OSMajorVersion
; /* A4h */
107 ULONG OSMinorVersion
; /* A8h */
108 USHORT OSBuildNumber
; /* ACh */
109 UCHAR SPMajorVersion
; /* AEh */
110 UCHAR SPMinorVersion
; /* AFh */
111 ULONG OSPlatformId
; /* B0h */
112 ULONG ImageSubSystem
; /* B4h */
113 ULONG ImageSubSystemMajorVersion
; /* B8h */
114 ULONG ImageSubSystemMinorVersion
; /* C0h */
115 ULONG GdiHandleBuffer
[0x22]; /* C4h */
118 typedef struct _GDI_TEB_BATCH
123 } GDI_TEB_BATCH
, *PGDI_TEB_BATCH
;
125 typedef struct _INITIAL_TEB
130 PVOID StackCommitMax
;
132 } INITIAL_TEB
, *PINITIAL_TEB
;
136 NT_TIB Tib
; /* 00h */
137 PVOID EnvironmentPointer
; /* 1Ch */
138 CLIENT_ID Cid
; /* 20h */
139 PVOID ActiveRpcInfo
; /* 28h */
140 PVOID ThreadLocalStoragePointer
; /* 2Ch */
141 struct _PEB
*Peb
; /* 30h */
142 ULONG LastErrorValue
; /* 34h */
143 ULONG CountOfOwnedCriticalSections
; /* 38h */
144 PVOID CsrClientThread
; /* 3Ch */
145 struct _W32THREAD
* Win32ThreadInfo
; /* 40h */
146 ULONG Win32ClientInfo
[0x1F]; /* 44h */
147 PVOID WOW32Reserved
; /* C0h */
148 LCID CurrentLocale
; /* C4h */
149 ULONG FpSoftwareStatusRegister
; /* C8h */
150 PVOID SystemReserved1
[0x36]; /* CCh */
151 PVOID Spare1
; /* 1A4h */
152 LONG ExceptionCode
; /* 1A8h */
153 UCHAR SpareBytes1
[0x28]; /* 1ACh */
154 PVOID SystemReserved2
[0xA]; /* 1D4h */
155 GDI_TEB_BATCH GdiTebBatch
; /* 1FCh */
156 ULONG gdiRgn
; /* 6DCh */
157 ULONG gdiPen
; /* 6E0h */
158 ULONG gdiBrush
; /* 6E4h */
159 CLIENT_ID RealClientId
; /* 6E8h */
160 PVOID GdiCachedProcessHandle
; /* 6F0h */
161 ULONG GdiClientPID
; /* 6F4h */
162 ULONG GdiClientTID
; /* 6F8h */
163 PVOID GdiThreadLocaleInfo
; /* 6FCh */
164 PVOID UserReserved
[5]; /* 700h */
165 PVOID glDispatchTable
[0x118]; /* 714h */
166 ULONG glReserved1
[0x1A]; /* B74h */
167 PVOID glReserved2
; /* BDCh */
168 PVOID glSectionInfo
; /* BE0h */
169 PVOID glSection
; /* BE4h */
170 PVOID glTable
; /* BE8h */
171 PVOID glCurrentRC
; /* BECh */
172 PVOID glContext
; /* BF0h */
173 NTSTATUS LastStatusValue
; /* BF4h */
174 UNICODE_STRING StaticUnicodeString
; /* BF8h */
175 WCHAR StaticUnicodeBuffer
[0x105]; /* C00h */
176 PVOID DeallocationStack
; /* E0Ch */
177 PVOID TlsSlots
[0x40]; /* E10h */
178 LIST_ENTRY TlsLinks
; /* F10h */
179 PVOID Vdm
; /* F18h */
180 PVOID ReservedForNtRpc
; /* F1Ch */
181 PVOID DbgSsReserved
[0x2]; /* F20h */
182 ULONG HardErrorDisabled
; /* F28h */
183 PVOID Instrumentation
[0x10]; /* F2Ch */
184 PVOID WinSockData
; /* F6Ch */
185 ULONG GdiBatchCount
; /* F70h */
186 USHORT _Spare2
; /* F74h */
187 BOOLEAN IsFiber
; /* F76h */
188 UCHAR Spare3
; /* F77h */
189 ULONG _Spare4
; /* F78h */
190 ULONG _Spare5
; /* F7Ch */
191 PVOID ReservedForOle
; /* F80h */
192 ULONG WaitingOnLoaderLock
; /* F84h */
193 ULONG _Unknown
[11]; /* F88h */
194 PVOID FlsSlots
; /* FB4h */
195 PVOID WineDebugInfo
; /* Needed for WINE DLL's */