3 Copyright (c) Alex Ionescu. All rights reserved.
11 NDK Support for usage without the IFS. Will be deprecated at WDK Release.
15 Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
19 #ifndef NTOS_MODE_USER
22 #define TOKEN_SOURCE_LENGTH 8
25 typedef enum _TOKEN_TYPE
29 } TOKEN_TYPE
, *PTOKEN_TYPE
;
32 (NTAPI
* PRTL_HEAP_COMMIT_ROUTINE
)(
34 IN OUT PVOID
*CommitAddress
,
35 IN OUT PSIZE_T CommitSize
38 typedef struct _RTL_HEAP_PARAMETERS
41 SIZE_T SegmentReserve
;
43 SIZE_T DeCommitFreeBlockThreshold
;
44 SIZE_T DeCommitTotalFreeThreshold
;
45 SIZE_T MaximumAllocationSize
;
46 SIZE_T VirtualMemoryThreshold
;
48 SIZE_T InitialReserve
;
49 PRTL_HEAP_COMMIT_ROUTINE CommitRoutine
;
51 } RTL_HEAP_PARAMETERS
, *PRTL_HEAP_PARAMETERS
;
53 typedef PVOID PFS_FILTER_CALLBACKS
;
54 typedef USHORT SECURITY_DESCRIPTOR_CONTROL
, *PSECURITY_DESCRIPTOR_CONTROL
;
56 typedef struct _RTL_SPLAY_LINKS
58 struct _RTL_SPLAY_LINKS
*Parent
;
59 struct _RTL_SPLAY_LINKS
*LeftChild
;
60 struct _RTL_SPLAY_LINKS
*RightChild
;
61 } RTL_SPLAY_LINKS
, *PRTL_SPLAY_LINKS
;
63 typedef struct _RTL_GENERIC_TABLE RTL_GENERIC_TABLE
, *PRTL_GENERIC_TABLE
;
64 typedef ULONG TABLE_SEARCH_RESULT
;
66 #if defined(USE_LPC6432)
67 #define LPC_CLIENT_ID CLIENT_ID64
68 #define LPC_SIZE_T ULONGLONG
69 #define LPC_PVOID ULONGLONG
70 #define LPC_HANDLE ULONGLONG
72 #define LPC_CLIENT_ID CLIENT_ID
73 #define LPC_SIZE_T SIZE_T
74 #define LPC_PVOID PVOID
75 #define LPC_HANDLE HANDLE
78 typedef struct _PORT_MESSAGE
94 CSHORT DataInfoOffset
;
100 LPC_CLIENT_ID ClientId
;
101 double DoNotUseThisField
;
106 LPC_SIZE_T ClientViewSize
;
109 } PORT_MESSAGE
, *PPORT_MESSAGE
;
111 typedef struct _PORT_VIEW
114 LPC_HANDLE SectionHandle
;
118 LPC_PVOID ViewRemoteBase
;
119 } PORT_VIEW
, *PPORT_VIEW
;
121 typedef struct _REMOTE_PORT_VIEW
126 } REMOTE_PORT_VIEW
, *PREMOTE_PORT_VIEW
;
128 typedef struct _KAPC_STATE
130 LIST_ENTRY ApcListHead
[2];
131 struct _KPROCESS
*Process
;
132 BOOLEAN KernelApcInProgress
;
133 BOOLEAN KernelApcPending
;
134 BOOLEAN UserApcPending
;
135 } KAPC_STATE
, *PKAPC_STATE
, *RESTRICTED_POINTER PRKAPC_STATE
;
137 typedef struct _KQUEUE
139 DISPATCHER_HEADER Header
;
140 LIST_ENTRY EntryListHead
;
143 LIST_ENTRY ThreadListHead
;
144 } KQUEUE
, *PKQUEUE
, *RESTRICTED_POINTER PRKQUEUE
;
146 typedef struct _ACE_HEADER
151 } ACE_HEADER
, *PACE_HEADER
;
153 typedef enum _RTL_GENERIC_COMPARE_RESULTS
158 } RTL_GENERIC_COMPARE_RESULTS
;
160 typedef struct _SID_IDENTIFIER_AUTHORITY
163 } SID_IDENTIFIER_AUTHORITY
, *PSID_IDENTIFIER_AUTHORITY
;
165 typedef struct _SID_AND_ATTRIBUTES
169 } SID_AND_ATTRIBUTES
, * PSID_AND_ATTRIBUTES
;
171 typedef struct _TOKEN_SOURCE
173 CHAR SourceName
[TOKEN_SOURCE_LENGTH
];
174 LUID SourceIdentifier
;
175 } TOKEN_SOURCE
, *PTOKEN_SOURCE
;
177 typedef struct _TOKEN_CONTROL
180 LUID AuthenticationId
;
182 TOKEN_SOURCE TokenSource
;
183 } TOKEN_CONTROL
, *PTOKEN_CONTROL
;
185 typedef struct _SECURITY_CLIENT_CONTEXT
187 SECURITY_QUALITY_OF_SERVICE SecurityQos
;
188 PACCESS_TOKEN ClientToken
;
189 BOOLEAN DirectlyAccessClientToken
;
190 BOOLEAN DirectAccessEffectiveOnly
;
191 BOOLEAN ServerIsRemote
;
192 TOKEN_CONTROL ClientTokenControl
;
193 } SECURITY_CLIENT_CONTEXT
, *PSECURITY_CLIENT_CONTEXT
;
195 typedef struct _SECURITY_DESCRIPTOR_RELATIVE
199 SECURITY_DESCRIPTOR_CONTROL Control
;
204 } SECURITY_DESCRIPTOR_RELATIVE
, *PISECURITY_DESCRIPTOR_RELATIVE
;
206 typedef struct _TOKEN_GROUPS
209 SID_AND_ATTRIBUTES Groups
[ANYSIZE_ARRAY
];
210 } TOKEN_GROUPS
, *PTOKEN_GROUPS
;
212 typedef struct _TOKEN_PRIVILEGES
214 ULONG PrivilegeCount
;
215 LUID_AND_ATTRIBUTES Privileges
[ANYSIZE_ARRAY
];
216 } TOKEN_PRIVILEGES
, *PTOKEN_PRIVILEGES
;
218 typedef struct _TOKEN_USER
220 SID_AND_ATTRIBUTES User
;
221 } TOKEN_USER
, *PTOKEN_USER
;
223 typedef enum _TOKEN_INFORMATION_CLASS
233 TokenImpersonationLevel
,
237 TokenGroupsAndPrivileges
,
238 TokenSessionReference
,
246 TokenAccessInformation
,
249 TokenIntegrityLevelDesktop
,
250 TokenMandatoryPolicy
,
252 } TOKEN_INFORMATION_CLASS
, *PTOKEN_INFORMATION_CLASS
;
254 typedef struct _TOKEN_OWNER
257 } TOKEN_OWNER
, *PTOKEN_OWNER
;
259 typedef struct _TOKEN_PRIMARY_GROUP
262 } TOKEN_PRIMARY_GROUP
, *PTOKEN_PRIMARY_GROUP
;
264 typedef struct _TOKEN_DEFAULT_DACL
267 } TOKEN_DEFAULT_DACL
, *PTOKEN_DEFAULT_DACL
;
272 #define HEAP_NO_SERIALIZE 0x00000001
273 #define HEAP_GROWABLE 0x00000002
274 #define HEAP_GENERATE_EXCEPTIONS 0x00000004
275 #define HEAP_ZERO_MEMORY 0x00000008
276 #define HEAP_REALLOC_IN_PLACE_ONLY 0x00000010
277 #define HEAP_TAIL_CHECKING_ENABLED 0x00000020
278 #define HEAP_FREE_CHECKING_ENABLED 0x00000040
279 #define HEAP_DISABLE_COALESCE_ON_FREE 0x00000080
281 #define HEAP_CREATE_ALIGN_16 0x00010000
282 #define HEAP_CREATE_ENABLE_TRACING 0x00020000
283 #define HEAP_CREATE_ENABLE_EXECUTE 0x00040000
287 #endif // !NTOS_MODE_USER