Work around MinGW mangling of "host:/path"
[msysgit/historical-msysgit.git] / mingw / include / ddk / ntifs.h
blobc78b7a807a1383334157448bb7b7541409c6f93c
1 /*
2 * ntifs.h
4 * Windows NT Filesystem Driver Developer Kit
6 * This file is part of the w32api package.
8 * Contributors:
9 * Created by Bo Brantén <bosse@acc.umu.se>
11 * THIS SOFTWARE IS NOT COPYRIGHTED
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23 #ifndef _NTIFS_
24 #define _NTIFS_
25 #define _GNU_NTIFS_
27 #if __GNUC__ >= 3
28 #pragma GCC system_header
29 #endif
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
35 #include "ntddk.h"
36 #include "ntapi.h"
38 #define VER_PRODUCTBUILD 10000
40 #ifndef NTSYSAPI
41 #define NTSYSAPI
42 #endif
44 #ifndef NTKERNELAPI
45 #define NTKERNELAPI STDCALL
46 #endif
48 typedef struct _SE_EXPORTS *PSE_EXPORTS;
50 extern PUCHAR *FsRtlLegalAnsiCharacterArray;
51 extern PSE_EXPORTS SeExports;
52 extern PACL SePublicDefaultDacl;
53 extern PACL SeSystemDefaultDacl;
55 #define ANSI_DOS_STAR ('<')
56 #define ANSI_DOS_QM ('>')
57 #define ANSI_DOS_DOT ('"')
59 #define DOS_STAR (L'<')
60 #define DOS_QM (L'>')
61 #define DOS_DOT (L'"')
63 /* also in winnt.h */
64 #define ACCESS_ALLOWED_ACE_TYPE (0x0)
65 #define ACCESS_DENIED_ACE_TYPE (0x1)
66 #define SYSTEM_AUDIT_ACE_TYPE (0x2)
67 #define SYSTEM_ALARM_ACE_TYPE (0x3)
69 #define COMPRESSION_FORMAT_NONE (0x0000)
70 #define COMPRESSION_FORMAT_DEFAULT (0x0001)
71 #define COMPRESSION_FORMAT_LZNT1 (0x0002)
72 #define COMPRESSION_ENGINE_STANDARD (0x0000)
73 #define COMPRESSION_ENGINE_MAXIMUM (0x0100)
74 #define COMPRESSION_ENGINE_HIBER (0x0200)
76 #define FILE_ACTION_ADDED 0x00000001
77 #define FILE_ACTION_REMOVED 0x00000002
78 #define FILE_ACTION_MODIFIED 0x00000003
79 #define FILE_ACTION_RENAMED_OLD_NAME 0x00000004
80 #define FILE_ACTION_RENAMED_NEW_NAME 0x00000005
81 #define FILE_ACTION_ADDED_STREAM 0x00000006
82 #define FILE_ACTION_REMOVED_STREAM 0x00000007
83 #define FILE_ACTION_MODIFIED_STREAM 0x00000008
84 #define FILE_ACTION_REMOVED_BY_DELETE 0x00000009
85 #define FILE_ACTION_ID_NOT_TUNNELLED 0x0000000A
86 #define FILE_ACTION_TUNNELLED_ID_COLLISION 0x0000000B
87 /* end winnt.h */
89 #define FILE_EA_TYPE_BINARY 0xfffe
90 #define FILE_EA_TYPE_ASCII 0xfffd
91 #define FILE_EA_TYPE_BITMAP 0xfffb
92 #define FILE_EA_TYPE_METAFILE 0xfffa
93 #define FILE_EA_TYPE_ICON 0xfff9
94 #define FILE_EA_TYPE_EA 0xffee
95 #define FILE_EA_TYPE_MVMT 0xffdf
96 #define FILE_EA_TYPE_MVST 0xffde
97 #define FILE_EA_TYPE_ASN1 0xffdd
98 #define FILE_EA_TYPE_FAMILY_IDS 0xff01
100 #define FILE_NEED_EA 0x00000080
102 /* also in winnt.h */
103 #define FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
104 #define FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002
105 #define FILE_NOTIFY_CHANGE_NAME 0x00000003
106 #define FILE_NOTIFY_CHANGE_ATTRIBUTES 0x00000004
107 #define FILE_NOTIFY_CHANGE_SIZE 0x00000008
108 #define FILE_NOTIFY_CHANGE_LAST_WRITE 0x00000010
109 #define FILE_NOTIFY_CHANGE_LAST_ACCESS 0x00000020
110 #define FILE_NOTIFY_CHANGE_CREATION 0x00000040
111 #define FILE_NOTIFY_CHANGE_EA 0x00000080
112 #define FILE_NOTIFY_CHANGE_SECURITY 0x00000100
113 #define FILE_NOTIFY_CHANGE_STREAM_NAME 0x00000200
114 #define FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000400
115 #define FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800
116 #define FILE_NOTIFY_VALID_MASK 0x00000fff
117 /* end winnt.h */
119 #define FILE_OPLOCK_BROKEN_TO_LEVEL_2 0x00000007
120 #define FILE_OPLOCK_BROKEN_TO_NONE 0x00000008
122 #define FILE_OPBATCH_BREAK_UNDERWAY 0x00000009
124 #define FILE_CASE_SENSITIVE_SEARCH 0x00000001
125 #define FILE_CASE_PRESERVED_NAMES 0x00000002
126 #define FILE_UNICODE_ON_DISK 0x00000004
127 #define FILE_PERSISTENT_ACLS 0x00000008
128 #define FILE_FILE_COMPRESSION 0x00000010
129 #define FILE_VOLUME_QUOTAS 0x00000020
130 #define FILE_SUPPORTS_SPARSE_FILES 0x00000040
131 #define FILE_SUPPORTS_REPARSE_POINTS 0x00000080
132 #define FILE_SUPPORTS_REMOTE_STORAGE 0x00000100
133 #define FS_LFN_APIS 0x00004000
134 #define FILE_VOLUME_IS_COMPRESSED 0x00008000
135 #define FILE_SUPPORTS_OBJECT_IDS 0x00010000
136 #define FILE_SUPPORTS_ENCRYPTION 0x00020000
137 #define FILE_NAMED_STREAMS 0x00040000
139 #define FILE_PIPE_BYTE_STREAM_TYPE 0x00000000
140 #define FILE_PIPE_MESSAGE_TYPE 0x00000001
142 #define FILE_PIPE_BYTE_STREAM_MODE 0x00000000
143 #define FILE_PIPE_MESSAGE_MODE 0x00000001
145 #define FILE_PIPE_QUEUE_OPERATION 0x00000000
146 #define FILE_PIPE_COMPLETE_OPERATION 0x00000001
148 #define FILE_PIPE_INBOUND 0x00000000
149 #define FILE_PIPE_OUTBOUND 0x00000001
150 #define FILE_PIPE_FULL_DUPLEX 0x00000002
152 #define FILE_PIPE_DISCONNECTED_STATE 0x00000001
153 #define FILE_PIPE_LISTENING_STATE 0x00000002
154 #define FILE_PIPE_CONNECTED_STATE 0x00000003
155 #define FILE_PIPE_CLOSING_STATE 0x00000004
157 #define FILE_PIPE_CLIENT_END 0x00000000
158 #define FILE_PIPE_SERVER_END 0x00000001
160 #define FILE_PIPE_READ_DATA 0x00000000
161 #define FILE_PIPE_WRITE_SPACE 0x00000001
163 #define FILE_STORAGE_TYPE_SPECIFIED 0x00000041 /* FILE_DIRECTORY_FILE | FILE_NON_DIRECTORY_FILE */
164 #define FILE_STORAGE_TYPE_DEFAULT (StorageTypeDefault << FILE_STORAGE_TYPE_SHIFT)
165 #define FILE_STORAGE_TYPE_DIRECTORY (StorageTypeDirectory << FILE_STORAGE_TYPE_SHIFT)
166 #define FILE_STORAGE_TYPE_FILE (StorageTypeFile << FILE_STORAGE_TYPE_SHIFT)
167 #define FILE_STORAGE_TYPE_DOCFILE (StorageTypeDocfile << FILE_STORAGE_TYPE_SHIFT)
168 #define FILE_STORAGE_TYPE_JUNCTION_POINT (StorageTypeJunctionPoint << FILE_STORAGE_TYPE_SHIFT)
169 #define FILE_STORAGE_TYPE_CATALOG (StorageTypeCatalog << FILE_STORAGE_TYPE_SHIFT)
170 #define FILE_STORAGE_TYPE_STRUCTURED_STORAGE (StorageTypeStructuredStorage << FILE_STORAGE_TYPE_SHIFT)
171 #define FILE_STORAGE_TYPE_EMBEDDING (StorageTypeEmbedding << FILE_STORAGE_TYPE_SHIFT)
172 #define FILE_STORAGE_TYPE_STREAM (StorageTypeStream << FILE_STORAGE_TYPE_SHIFT)
173 #define FILE_MINIMUM_STORAGE_TYPE FILE_STORAGE_TYPE_DEFAULT
174 #define FILE_MAXIMUM_STORAGE_TYPE FILE_STORAGE_TYPE_STREAM
175 #define FILE_STORAGE_TYPE_MASK 0x000f0000
176 #define FILE_STORAGE_TYPE_SHIFT 16
178 #define FILE_VC_QUOTA_NONE 0x00000000
179 #define FILE_VC_QUOTA_TRACK 0x00000001
180 #define FILE_VC_QUOTA_ENFORCE 0x00000002
181 #define FILE_VC_QUOTA_MASK 0x00000003
183 #define FILE_VC_QUOTAS_LOG_VIOLATIONS 0x00000004
184 #define FILE_VC_CONTENT_INDEX_DISABLED 0x00000008
186 #define FILE_VC_LOG_QUOTA_THRESHOLD 0x00000010
187 #define FILE_VC_LOG_QUOTA_LIMIT 0x00000020
188 #define FILE_VC_LOG_VOLUME_THRESHOLD 0x00000040
189 #define FILE_VC_LOG_VOLUME_LIMIT 0x00000080
191 #define FILE_VC_QUOTAS_INCOMPLETE 0x00000100
192 #define FILE_VC_QUOTAS_REBUILDING 0x00000200
194 #define FILE_VC_VALID_MASK 0x000003ff
196 #define FSRTL_FLAG_FILE_MODIFIED (0x01)
197 #define FSRTL_FLAG_FILE_LENGTH_CHANGED (0x02)
198 #define FSRTL_FLAG_LIMIT_MODIFIED_PAGES (0x04)
199 #define FSRTL_FLAG_ACQUIRE_MAIN_RSRC_EX (0x08)
200 #define FSRTL_FLAG_ACQUIRE_MAIN_RSRC_SH (0x10)
201 #define FSRTL_FLAG_USER_MAPPED_FILE (0x20)
202 #define FSRTL_FLAG_EOF_ADVANCE_ACTIVE (0x80)
204 #define FSRTL_FLAG2_DO_MODIFIED_WRITE (0x01)
206 #define FSRTL_FSP_TOP_LEVEL_IRP (0x01)
207 #define FSRTL_CACHE_TOP_LEVEL_IRP (0x02)
208 #define FSRTL_MOD_WRITE_TOP_LEVEL_IRP (0x03)
209 #define FSRTL_FAST_IO_TOP_LEVEL_IRP (0x04)
210 #define FSRTL_MAX_TOP_LEVEL_IRP_FLAG (0x04)
212 #define FSRTL_VOLUME_DISMOUNT 1
213 #define FSRTL_VOLUME_DISMOUNT_FAILED 2
214 #define FSRTL_VOLUME_LOCK 3
215 #define FSRTL_VOLUME_LOCK_FAILED 4
216 #define FSRTL_VOLUME_UNLOCK 5
217 #define FSRTL_VOLUME_MOUNT 6
219 #define FSRTL_WILD_CHARACTER 0x08
221 #ifdef _X86_
222 #define HARDWARE_PTE HARDWARE_PTE_X86
223 #define PHARDWARE_PTE PHARDWARE_PTE_X86
224 #else
225 #define HARDWARE_PTE ULONG
226 #define PHARDWARE_PTE PULONG
227 #endif
229 #define IO_CHECK_CREATE_PARAMETERS 0x0200
230 #define IO_ATTACH_DEVICE 0x0400
232 #define IO_ATTACH_DEVICE_API 0x80000000
233 /* also in winnt.h */
234 #define IO_COMPLETION_QUERY_STATE 0x0001
235 #define IO_COMPLETION_MODIFY_STATE 0x0002
236 #define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
237 /* end winnt.h */
238 #define IO_FILE_OBJECT_NON_PAGED_POOL_CHARGE 64
239 #define IO_FILE_OBJECT_PAGED_POOL_CHARGE 1024
241 #define IO_TYPE_APC 18
242 #define IO_TYPE_DPC 19
243 #define IO_TYPE_DEVICE_QUEUE 20
244 #define IO_TYPE_EVENT_PAIR 21
245 #define IO_TYPE_INTERRUPT 22
246 #define IO_TYPE_PROFILE 23
248 #define IRP_BEING_VERIFIED 0x10
250 #define MAILSLOT_CLASS_FIRSTCLASS 1
251 #define MAILSLOT_CLASS_SECONDCLASS 2
253 #define MAILSLOT_SIZE_AUTO 0
255 #define MAP_PROCESS 1L
256 #define MAP_SYSTEM 2L
257 #define MEM_DOS_LIM 0x40000000
258 /* also in winnt.h */
259 #define MEM_IMAGE SEC_IMAGE
260 /* end winnt.h */
261 #define OB_TYPE_TYPE 1
262 #define OB_TYPE_DIRECTORY 2
263 #define OB_TYPE_SYMBOLIC_LINK 3
264 #define OB_TYPE_TOKEN 4
265 #define OB_TYPE_PROCESS 5
266 #define OB_TYPE_THREAD 6
267 #define OB_TYPE_EVENT 7
268 #define OB_TYPE_EVENT_PAIR 8
269 #define OB_TYPE_MUTANT 9
270 #define OB_TYPE_SEMAPHORE 10
271 #define OB_TYPE_TIMER 11
272 #define OB_TYPE_PROFILE 12
273 #define OB_TYPE_WINDOW_STATION 13
274 #define OB_TYPE_DESKTOP 14
275 #define OB_TYPE_SECTION 15
276 #define OB_TYPE_KEY 16
277 #define OB_TYPE_PORT 17
278 #define OB_TYPE_ADAPTER 18
279 #define OB_TYPE_CONTROLLER 19
280 #define OB_TYPE_DEVICE 20
281 #define OB_TYPE_DRIVER 21
282 #define OB_TYPE_IO_COMPLETION 22
283 #define OB_TYPE_FILE 23
285 #define PIN_WAIT (1)
286 #define PIN_EXCLUSIVE (2)
287 #define PIN_NO_READ (4)
288 #define PIN_IF_BCB (8)
290 #define PORT_CONNECT 0x0001
291 #define PORT_ALL_ACCESS (STANDARD_RIGHTS_ALL |\
292 PORT_CONNECT)
293 /* also in winnt.h */
294 #define SEC_BASED 0x00200000
295 #define SEC_NO_CHANGE 0x00400000
296 #define SEC_FILE 0x00800000
297 #define SEC_IMAGE 0x01000000
298 #define SEC_VLM 0x02000000
299 #define SEC_RESERVE 0x04000000
300 #define SEC_COMMIT 0x08000000
301 #define SEC_NOCACHE 0x10000000
303 #define SECURITY_WORLD_SID_AUTHORITY {0,0,0,0,0,1}
304 #define SECURITY_WORLD_RID (0x00000000L)
306 #define SID_REVISION 1
308 #define TOKEN_ASSIGN_PRIMARY (0x0001)
309 #define TOKEN_DUPLICATE (0x0002)
310 #define TOKEN_IMPERSONATE (0x0004)
311 #define TOKEN_QUERY (0x0008)
312 #define TOKEN_QUERY_SOURCE (0x0010)
313 #define TOKEN_ADJUST_PRIVILEGES (0x0020)
314 #define TOKEN_ADJUST_GROUPS (0x0040)
315 #define TOKEN_ADJUST_DEFAULT (0x0080)
317 #define TOKEN_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\
318 TOKEN_ASSIGN_PRIMARY |\
319 TOKEN_DUPLICATE |\
320 TOKEN_IMPERSONATE |\
321 TOKEN_QUERY |\
322 TOKEN_QUERY_SOURCE |\
323 TOKEN_ADJUST_PRIVILEGES |\
324 TOKEN_ADJUST_GROUPS |\
325 TOKEN_ADJUST_DEFAULT)
327 #define TOKEN_READ (STANDARD_RIGHTS_READ |\
328 TOKEN_QUERY)
330 #define TOKEN_WRITE (STANDARD_RIGHTS_WRITE |\
331 TOKEN_ADJUST_PRIVILEGES |\
332 TOKEN_ADJUST_GROUPS |\
333 TOKEN_ADJUST_DEFAULT)
335 #define TOKEN_EXECUTE (STANDARD_RIGHTS_EXECUTE)
337 #define TOKEN_SOURCE_LENGTH 8
338 /* end winnt.h */
340 #define TOKEN_HAS_TRAVERSE_PRIVILEGE 0x01
341 #define TOKEN_HAS_BACKUP_PRIVILEGE 0x02
342 #define TOKEN_HAS_RESTORE_PRIVILEGE 0x04
343 #define TOKEN_HAS_ADMIN_GROUP 0x08
344 #define TOKEN_IS_RESTRICTED 0x10
346 #define VACB_MAPPING_GRANULARITY (0x40000)
347 #define VACB_OFFSET_SHIFT (18)
349 #define FSCTL_REQUEST_OPLOCK_LEVEL_1 CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
350 #define FSCTL_REQUEST_OPLOCK_LEVEL_2 CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
351 #define FSCTL_REQUEST_BATCH_OPLOCK CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
352 #define FSCTL_OPLOCK_BREAK_ACKNOWLEDGE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 3, METHOD_BUFFERED, FILE_ANY_ACCESS)
353 #define FSCTL_OPBATCH_ACK_CLOSE_PENDING CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
354 #define FSCTL_OPLOCK_BREAK_NOTIFY CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
355 #define FSCTL_LOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
356 #define FSCTL_UNLOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
357 #define FSCTL_DISMOUNT_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
359 #define FSCTL_IS_VOLUME_MOUNTED CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 10, METHOD_BUFFERED, FILE_ANY_ACCESS)
360 #define FSCTL_IS_PATHNAME_VALID CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 11, METHOD_BUFFERED, FILE_ANY_ACCESS)
361 #define FSCTL_MARK_VOLUME_DIRTY CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
363 #define FSCTL_QUERY_RETRIEVAL_POINTERS CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 14, METHOD_NEITHER, FILE_ANY_ACCESS)
364 #define FSCTL_GET_COMPRESSION CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 15, METHOD_BUFFERED, FILE_ANY_ACCESS)
365 #define FSCTL_SET_COMPRESSION CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 16, METHOD_BUFFERED, FILE_READ_DATA | FILE_WRITE_DATA)
368 #define FSCTL_MARK_AS_SYSTEM_HIVE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 19, METHOD_NEITHER, FILE_ANY_ACCESS)
369 #define FSCTL_OPLOCK_BREAK_ACK_NO_2 CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 20, METHOD_BUFFERED, FILE_ANY_ACCESS)
370 #define FSCTL_INVALIDATE_VOLUMES CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 21, METHOD_BUFFERED, FILE_ANY_ACCESS)
371 #define FSCTL_QUERY_FAT_BPB CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 22, METHOD_BUFFERED, FILE_ANY_ACCESS)
372 #define FSCTL_REQUEST_FILTER_OPLOCK CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 23, METHOD_BUFFERED, FILE_ANY_ACCESS)
373 #define FSCTL_FILESYSTEM_GET_STATISTICS CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 24, METHOD_BUFFERED, FILE_ANY_ACCESS)
375 #if (VER_PRODUCTBUILD >= 1381)
377 #define FSCTL_GET_NTFS_VOLUME_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 25, METHOD_BUFFERED, FILE_ANY_ACCESS)
378 #define FSCTL_GET_NTFS_FILE_RECORD CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 26, METHOD_BUFFERED, FILE_ANY_ACCESS)
379 #define FSCTL_GET_VOLUME_BITMAP CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 27, METHOD_NEITHER, FILE_ANY_ACCESS)
380 #define FSCTL_GET_RETRIEVAL_POINTERS CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 28, METHOD_NEITHER, FILE_ANY_ACCESS)
381 #define FSCTL_MOVE_FILE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 29, METHOD_BUFFERED, FILE_ANY_ACCESS)
382 #define FSCTL_IS_VOLUME_DIRTY CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 30, METHOD_BUFFERED, FILE_ANY_ACCESS)
383 #define FSCTL_GET_HFS_INFORMATION CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 31, METHOD_BUFFERED, FILE_ANY_ACCESS)
384 #define FSCTL_ALLOW_EXTENDED_DASD_IO CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 32, METHOD_NEITHER, FILE_ANY_ACCESS)
386 #endif /* (VER_PRODUCTBUILD >= 1381) */
388 #if (VER_PRODUCTBUILD >= 2195)
390 #define FSCTL_READ_PROPERTY_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 33, METHOD_NEITHER, FILE_ANY_ACCESS)
391 #define FSCTL_WRITE_PROPERTY_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 34, METHOD_NEITHER, FILE_ANY_ACCESS)
392 #define FSCTL_FIND_FILES_BY_SID CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 35, METHOD_NEITHER, FILE_ANY_ACCESS)
394 #define FSCTL_DUMP_PROPERTY_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 37, METHOD_NEITHER, FILE_ANY_ACCESS)
395 #define FSCTL_SET_OBJECT_ID CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 38, METHOD_BUFFERED, FILE_WRITE_DATA)
396 #define FSCTL_GET_OBJECT_ID CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 39, METHOD_BUFFERED, FILE_ANY_ACCESS)
397 #define FSCTL_DELETE_OBJECT_ID CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 40, METHOD_BUFFERED, FILE_WRITE_DATA)
398 #define FSCTL_SET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 41, METHOD_BUFFERED, FILE_WRITE_DATA)
399 #define FSCTL_GET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 42, METHOD_BUFFERED, FILE_ANY_ACCESS)
400 #define FSCTL_DELETE_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 43, METHOD_BUFFERED, FILE_WRITE_DATA)
401 #define FSCTL_ENUM_USN_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 44, METHOD_NEITHER, FILE_READ_DATA)
402 #define FSCTL_SECURITY_ID_CHECK CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 45, METHOD_NEITHER, FILE_READ_DATA)
403 #define FSCTL_READ_USN_JOURNAL CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 46, METHOD_NEITHER, FILE_READ_DATA)
404 #define FSCTL_SET_OBJECT_ID_EXTENDED CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 47, METHOD_BUFFERED, FILE_WRITE_DATA)
405 #define FSCTL_CREATE_OR_GET_OBJECT_ID CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 48, METHOD_BUFFERED, FILE_ANY_ACCESS)
406 #define FSCTL_SET_SPARSE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 49, METHOD_BUFFERED, FILE_WRITE_DATA)
407 #define FSCTL_SET_ZERO_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 50, METHOD_BUFFERED, FILE_WRITE_DATA)
408 #define FSCTL_QUERY_ALLOCATED_RANGES CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 51, METHOD_NEITHER, FILE_READ_DATA)
409 #define FSCTL_ENABLE_UPGRADE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 52, METHOD_BUFFERED, FILE_WRITE_DATA)
410 #define FSCTL_SET_ENCRYPTION CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 53, METHOD_BUFFERED, FILE_ANY_ACCESS)
411 #define FSCTL_ENCRYPTION_FSCTL_IO CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 54, METHOD_NEITHER, FILE_ANY_ACCESS)
412 #define FSCTL_WRITE_RAW_ENCRYPTED CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 55, METHOD_NEITHER, FILE_ANY_ACCESS)
413 #define FSCTL_READ_RAW_ENCRYPTED CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 56, METHOD_NEITHER, FILE_ANY_ACCESS)
414 #define FSCTL_CREATE_USN_JOURNAL CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 57, METHOD_NEITHER, FILE_READ_DATA)
415 #define FSCTL_READ_FILE_USN_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 58, METHOD_NEITHER, FILE_READ_DATA)
416 #define FSCTL_WRITE_USN_CLOSE_RECORD CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 59, METHOD_NEITHER, FILE_READ_DATA)
417 #define FSCTL_EXTEND_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 60, METHOD_BUFFERED, FILE_ANY_ACCESS)
418 #define FSCTL_QUERY_USN_JOURNAL CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 61, METHOD_BUFFERED, FILE_ANY_ACCESS)
419 #define FSCTL_DELETE_USN_JOURNAL CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 62, METHOD_BUFFERED, FILE_ANY_ACCESS)
420 #define FSCTL_MARK_HANDLE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 63, METHOD_BUFFERED, FILE_ANY_ACCESS)
421 #define FSCTL_SIS_COPYFILE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 64, METHOD_BUFFERED, FILE_ANY_ACCESS)
422 #define FSCTL_SIS_LINK_FILES CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 65, METHOD_BUFFERED, FILE_READ_DATA | FILE_WRITE_DATA)
423 #define FSCTL_HSM_MSG CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 66, METHOD_BUFFERED, FILE_READ_DATA | FILE_WRITE_DATA)
424 #define FSCTL_NSS_CONTROL CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 67, METHOD_BUFFERED, FILE_WRITE_DATA)
425 #define FSCTL_HSM_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 68, METHOD_NEITHER, FILE_READ_DATA | FILE_WRITE_DATA)
426 #define FSCTL_RECALL_FILE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 69, METHOD_NEITHER, FILE_ANY_ACCESS)
427 #define FSCTL_NSS_RCONTROL CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 70, METHOD_BUFFERED, FILE_READ_DATA)
428 #define FSCTL_READ_FROM_PLEX CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 71, METHOD_OUT_DIRECT, FILE_READ_DATA)
429 #define FSCTL_FILE_PREFETCH CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 72, METHOD_BUFFERED, FILE_SPECIAL_ACCESS)
431 #endif /* (VER_PRODUCTBUILD >= 2195) */
433 #define FSCTL_MAILSLOT_PEEK CTL_CODE(FILE_DEVICE_MAILSLOT, 0, METHOD_NEITHER, FILE_READ_DATA)
435 #define FSCTL_NETWORK_SET_CONFIGURATION_INFO CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 102, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
436 #define FSCTL_NETWORK_GET_CONFIGURATION_INFO CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 103, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
437 #define FSCTL_NETWORK_GET_CONNECTION_INFO CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 104, METHOD_NEITHER, FILE_ANY_ACCESS)
438 #define FSCTL_NETWORK_ENUMERATE_CONNECTIONS CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 105, METHOD_NEITHER, FILE_ANY_ACCESS)
439 #define FSCTL_NETWORK_DELETE_CONNECTION CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 107, METHOD_BUFFERED, FILE_ANY_ACCESS)
440 #define FSCTL_NETWORK_GET_STATISTICS CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 116, METHOD_BUFFERED, FILE_ANY_ACCESS)
441 #define FSCTL_NETWORK_SET_DOMAIN_NAME CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 120, METHOD_BUFFERED, FILE_ANY_ACCESS)
442 #define FSCTL_NETWORK_REMOTE_BOOT_INIT_SCRT CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 250, METHOD_BUFFERED, FILE_ANY_ACCESS)
444 #define FSCTL_PIPE_ASSIGN_EVENT CTL_CODE(FILE_DEVICE_NAMED_PIPE, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
445 #define FSCTL_PIPE_DISCONNECT CTL_CODE(FILE_DEVICE_NAMED_PIPE, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
446 #define FSCTL_PIPE_LISTEN CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
447 #define FSCTL_PIPE_PEEK CTL_CODE(FILE_DEVICE_NAMED_PIPE, 3, METHOD_BUFFERED, FILE_READ_DATA)
448 #define FSCTL_PIPE_QUERY_EVENT CTL_CODE(FILE_DEVICE_NAMED_PIPE, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
449 #define FSCTL_PIPE_TRANSCEIVE CTL_CODE(FILE_DEVICE_NAMED_PIPE, 5, METHOD_NEITHER, FILE_READ_DATA | FILE_WRITE_DATA)
450 #define FSCTL_PIPE_WAIT CTL_CODE(FILE_DEVICE_NAMED_PIPE, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
451 #define FSCTL_PIPE_IMPERSONATE CTL_CODE(FILE_DEVICE_NAMED_PIPE, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
452 #define FSCTL_PIPE_SET_CLIENT_PROCESS CTL_CODE(FILE_DEVICE_NAMED_PIPE, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
453 #define FSCTL_PIPE_QUERY_CLIENT_PROCESS CTL_CODE(FILE_DEVICE_NAMED_PIPE, 9, METHOD_BUFFERED, FILE_ANY_ACCESS)
454 #define FSCTL_PIPE_INTERNAL_READ CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2045, METHOD_BUFFERED, FILE_READ_DATA)
455 #define FSCTL_PIPE_INTERNAL_WRITE CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2046, METHOD_BUFFERED, FILE_WRITE_DATA)
456 #define FSCTL_PIPE_INTERNAL_TRANSCEIVE CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2047, METHOD_NEITHER, FILE_READ_DATA | FILE_WRITE_DATA)
457 #define FSCTL_PIPE_INTERNAL_READ_OVFLOW CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2048, METHOD_BUFFERED, FILE_READ_DATA)
459 #define IOCTL_REDIR_QUERY_PATH CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 99, METHOD_NEITHER, FILE_ANY_ACCESS)
461 typedef PVOID PEJOB;
462 typedef PVOID OPLOCK, *POPLOCK;
463 typedef PVOID PWOW64_PROCESS;
465 typedef struct _CACHE_MANAGER_CALLBACKS *PCACHE_MANAGER_CALLBACKS;
466 typedef struct _EPROCESS_QUOTA_BLOCK *PEPROCESS_QUOTA_BLOCK;
467 typedef struct _FILE_GET_QUOTA_INFORMATION *PFILE_GET_QUOTA_INFORMATION;
468 typedef struct _HANDLE_TABLE *PHANDLE_TABLE;
469 typedef struct _KEVENT_PAIR *PKEVENT_PAIR;
470 typedef struct _KPROCESS *PKPROCESS;
471 typedef struct _KQUEUE *PKQUEUE;
472 typedef struct _KTRAP_FRAME *PKTRAP_FRAME;
473 typedef struct _MAILSLOT_CREATE_PARAMETERS *PMAILSLOT_CREATE_PARAMETERS;
474 typedef struct _MMWSL *PMMWSL;
475 typedef struct _NAMED_PIPE_CREATE_PARAMETERS *PNAMED_PIPE_CREATE_PARAMETERS;
476 typedef struct _OBJECT_DIRECTORY *POBJECT_DIRECTORY;
477 typedef struct _PAGEFAULT_HISTORY *PPAGEFAULT_HISTORY;
478 typedef struct _PS_IMPERSONATION_INFORMATION *PPS_IMPERSONATION_INFORMATION;
479 typedef struct _SECTION_OBJECT *PSECTION_OBJECT;
480 typedef struct _SHARED_CACHE_MAP *PSHARED_CACHE_MAP;
481 typedef struct _TERMINATION_PORT *PTERMINATION_PORT;
482 typedef struct _VACB *PVACB;
483 typedef struct _VAD_HEADER *PVAD_HEADER;
485 typedef struct _NOTIFY_SYNC
487 ULONG Unknown0;
488 ULONG Unknown1;
489 ULONG Unknown2;
490 USHORT Unknown3;
491 USHORT Unknown4;
492 ULONG Unknown5;
493 ULONG Unknown6;
494 ULONG Unknown7;
495 ULONG Unknown8;
496 ULONG Unknown9;
497 ULONG Unknown10;
498 } NOTIFY_SYNC, * PNOTIFY_SYNC;
500 typedef enum _FAST_IO_POSSIBLE {
501 FastIoIsNotPossible,
502 FastIoIsPossible,
503 FastIoIsQuestionable
504 } FAST_IO_POSSIBLE;
506 typedef enum _FILE_STORAGE_TYPE {
507 StorageTypeDefault = 1,
508 StorageTypeDirectory,
509 StorageTypeFile,
510 StorageTypeJunctionPoint,
511 StorageTypeCatalog,
512 StorageTypeStructuredStorage,
513 StorageTypeEmbedding,
514 StorageTypeStream
515 } FILE_STORAGE_TYPE;
517 typedef enum _IO_COMPLETION_INFORMATION_CLASS {
518 IoCompletionBasicInformation
519 } IO_COMPLETION_INFORMATION_CLASS;
521 typedef enum _OBJECT_INFO_CLASS {
522 ObjectBasicInfo,
523 ObjectNameInfo,
524 ObjectTypeInfo,
525 ObjectAllTypesInfo,
526 ObjectProtectionInfo
527 } OBJECT_INFO_CLASS;
529 typedef struct _HARDWARE_PTE_X86 {
530 ULONG Valid : 1;
531 ULONG Write : 1;
532 ULONG Owner : 1;
533 ULONG WriteThrough : 1;
534 ULONG CacheDisable : 1;
535 ULONG Accessed : 1;
536 ULONG Dirty : 1;
537 ULONG LargePage : 1;
538 ULONG Global : 1;
539 ULONG CopyOnWrite : 1;
540 ULONG Prototype : 1;
541 ULONG reserved : 1;
542 ULONG PageFrameNumber : 20;
543 } HARDWARE_PTE_X86, *PHARDWARE_PTE_X86;
545 typedef struct _KAPC_STATE {
546 LIST_ENTRY ApcListHead[2];
547 PKPROCESS Process;
548 BOOLEAN KernelApcInProgress;
549 BOOLEAN KernelApcPending;
550 BOOLEAN UserApcPending;
551 } KAPC_STATE, *PKAPC_STATE;
553 typedef struct _KGDTENTRY {
554 USHORT LimitLow;
555 USHORT BaseLow;
556 union {
557 struct {
558 UCHAR BaseMid;
559 UCHAR Flags1;
560 UCHAR Flags2;
561 UCHAR BaseHi;
562 } Bytes;
563 struct {
564 ULONG BaseMid : 8;
565 ULONG Type : 5;
566 ULONG Dpl : 2;
567 ULONG Pres : 1;
568 ULONG LimitHi : 4;
569 ULONG Sys : 1;
570 ULONG Reserved_0 : 1;
571 ULONG Default_Big : 1;
572 ULONG Granularity : 1;
573 ULONG BaseHi : 8;
574 } Bits;
575 } HighWord;
576 } KGDTENTRY, *PKGDTENTRY;
578 typedef struct _KIDTENTRY {
579 USHORT Offset;
580 USHORT Selector;
581 USHORT Access;
582 USHORT ExtendedOffset;
583 } KIDTENTRY, *PKIDTENTRY;
585 #if (VER_PRODUCTBUILD >= 2600)
587 typedef struct _MMSUPPORT_FLAGS {
588 ULONG SessionSpace : 1;
589 ULONG BeingTrimmed : 1;
590 ULONG SessionLeader : 1;
591 ULONG TrimHard : 1;
592 ULONG WorkingSetHard : 1;
593 ULONG AddressSpaceBeingDeleted : 1;
594 ULONG Available : 10;
595 ULONG AllowWorkingSetAdjustment : 8;
596 ULONG MemoryPriority : 8;
597 } MMSUPPORT_FLAGS, *PMMSUPPORT_FLAGS;
599 #else
601 typedef struct _MMSUPPORT_FLAGS {
602 ULONG SessionSpace : 1;
603 ULONG BeingTrimmed : 1;
604 ULONG ProcessInSession : 1;
605 ULONG SessionLeader : 1;
606 ULONG TrimHard : 1;
607 ULONG WorkingSetHard : 1;
608 ULONG WriteWatch : 1;
609 ULONG Filler : 25;
610 } MMSUPPORT_FLAGS, *PMMSUPPORT_FLAGS;
612 #endif
614 #if (VER_PRODUCTBUILD >= 2600)
616 typedef struct _MMSUPPORT {
617 LARGE_INTEGER LastTrimTime;
618 MMSUPPORT_FLAGS Flags;
619 ULONG PageFaultCount;
620 ULONG PeakWorkingSetSize;
621 ULONG WorkingSetSize;
622 ULONG MinimumWorkingSetSize;
623 ULONG MaximumWorkingSetSize;
624 PMMWSL VmWorkingSetList;
625 LIST_ENTRY WorkingSetExpansionLinks;
626 ULONG Claim;
627 ULONG NextEstimationSlot;
628 ULONG NextAgingSlot;
629 ULONG EstimatedAvailable;
630 ULONG GrowthSinceLastEstimate;
631 } MMSUPPORT, *PMMSUPPORT;
633 #else
635 typedef struct _MMSUPPORT {
636 LARGE_INTEGER LastTrimTime;
637 ULONG LastTrimFaultCount;
638 ULONG PageFaultCount;
639 ULONG PeakWorkingSetSize;
640 ULONG WorkingSetSize;
641 ULONG MinimumWorkingSetSize;
642 ULONG MaximumWorkingSetSize;
643 PMMWSL VmWorkingSetList;
644 LIST_ENTRY WorkingSetExpansionLinks;
645 BOOLEAN AllowWorkingSetAdjustment;
646 BOOLEAN AddressSpaceBeingDeleted;
647 UCHAR ForegroundSwitchCount;
648 UCHAR MemoryPriority;
649 #if (VER_PRODUCTBUILD >= 2195)
650 union {
651 ULONG LongFlags;
652 MMSUPPORT_FLAGS Flags;
653 } u;
654 ULONG Claim;
655 ULONG NextEstimationSlot;
656 ULONG NextAgingSlot;
657 ULONG EstimatedAvailable;
658 ULONG GrowthSinceLastEstimate;
659 #endif /* (VER_PRODUCTBUILD >= 2195) */
660 } MMSUPPORT, *PMMSUPPORT;
662 #endif
664 typedef struct _SE_AUDIT_PROCESS_CREATION_INFO {
665 POBJECT_NAME_INFORMATION ImageFileName;
666 } SE_AUDIT_PROCESS_CREATION_INFO, *PSE_AUDIT_PROCESS_CREATION_INFO;
668 typedef struct _BITMAP_RANGE {
669 LIST_ENTRY Links;
670 LARGE_INTEGER BasePage;
671 ULONG FirstDirtyPage;
672 ULONG LastDirtyPage;
673 ULONG DirtyPages;
674 PULONG Bitmap;
675 } BITMAP_RANGE, *PBITMAP_RANGE;
677 typedef struct _CACHE_UNINITIALIZE_EVENT {
678 struct _CACHE_UNINITIALIZE_EVENT *Next;
679 KEVENT Event;
680 } CACHE_UNINITIALIZE_EVENT, *PCACHE_UNINITIALIZE_EVENT;
682 typedef struct _CC_FILE_SIZES {
683 LARGE_INTEGER AllocationSize;
684 LARGE_INTEGER FileSize;
685 LARGE_INTEGER ValidDataLength;
686 } CC_FILE_SIZES, *PCC_FILE_SIZES;
688 typedef struct _COMPRESSED_DATA_INFO {
689 USHORT CompressionFormatAndEngine;
690 UCHAR CompressionUnitShift;
691 UCHAR ChunkShift;
692 UCHAR ClusterShift;
693 UCHAR Reserved;
694 USHORT NumberOfChunks;
695 ULONG CompressedChunkSizes[ANYSIZE_ARRAY];
696 } COMPRESSED_DATA_INFO, *PCOMPRESSED_DATA_INFO;
698 typedef struct _DEVICE_MAP {
699 POBJECT_DIRECTORY DosDevicesDirectory;
700 POBJECT_DIRECTORY GlobalDosDevicesDirectory;
701 ULONG ReferenceCount;
702 ULONG DriveMap;
703 UCHAR DriveType[32];
704 } DEVICE_MAP, *PDEVICE_MAP;
706 #if (VER_PRODUCTBUILD >= 2600)
708 typedef struct _EX_FAST_REF {
709 _ANONYMOUS_UNION union {
710 PVOID Object;
711 ULONG RefCnt : 3;
712 ULONG Value;
713 } DUMMYUNIONNAME;
714 } EX_FAST_REF, *PEX_FAST_REF;
716 typedef struct _EX_PUSH_LOCK {
717 _ANONYMOUS_UNION union {
718 _ANONYMOUS_STRUCT struct {
719 ULONG Waiting : 1;
720 ULONG Exclusive : 1;
721 ULONG Shared : 30;
722 } DUMMYSTRUCTNAME;
723 ULONG Value;
724 PVOID Ptr;
725 } DUMMYUNIONNAME;
726 } EX_PUSH_LOCK, *PEX_PUSH_LOCK;
728 typedef struct _EX_RUNDOWN_REF {
729 _ANONYMOUS_UNION union {
730 ULONG Count;
731 PVOID Ptr;
732 } DUMMYUNIONNAME;
733 } EX_RUNDOWN_REF, *PEX_RUNDOWN_REF;
735 #endif
737 typedef struct _EPROCESS_QUOTA_ENTRY {
738 ULONG Usage;
739 ULONG Limit;
740 ULONG Peak;
741 ULONG Return;
742 } EPROCESS_QUOTA_ENTRY, *PEPROCESS_QUOTA_ENTRY;
744 typedef struct _EPROCESS_QUOTA_BLOCK {
745 EPROCESS_QUOTA_ENTRY QuotaEntry[3];
746 LIST_ENTRY QuotaList;
747 ULONG ReferenceCount;
748 ULONG ProcessCount;
749 } EPROCESS_QUOTA_BLOCK, *PEPROCESS_QUOTA_BLOCK;
752 * When needing these parameters cast your PIO_STACK_LOCATION to
753 * PEXTENDED_IO_STACK_LOCATION
755 #if !defined(_ALPHA_)
756 #include <pshpack4.h>
757 #endif
758 typedef struct _EXTENDED_IO_STACK_LOCATION {
760 /* Included for padding */
761 UCHAR MajorFunction;
762 UCHAR MinorFunction;
763 UCHAR Flags;
764 UCHAR Control;
766 union {
768 struct {
769 PIO_SECURITY_CONTEXT SecurityContext;
770 ULONG Options;
771 USHORT Reserved;
772 USHORT ShareAccess;
773 PMAILSLOT_CREATE_PARAMETERS Parameters;
774 } CreateMailslot;
776 struct {
777 PIO_SECURITY_CONTEXT SecurityContext;
778 ULONG Options;
779 USHORT Reserved;
780 USHORT ShareAccess;
781 PNAMED_PIPE_CREATE_PARAMETERS Parameters;
782 } CreatePipe;
784 struct {
785 ULONG OutputBufferLength;
786 ULONG InputBufferLength;
787 ULONG FsControlCode;
788 PVOID Type3InputBuffer;
789 } FileSystemControl;
791 struct {
792 PLARGE_INTEGER Length;
793 ULONG Key;
794 LARGE_INTEGER ByteOffset;
795 } LockControl;
797 struct {
798 ULONG Length;
799 ULONG CompletionFilter;
800 } NotifyDirectory;
802 struct {
803 ULONG Length;
804 PUNICODE_STRING FileName;
805 FILE_INFORMATION_CLASS FileInformationClass;
806 ULONG FileIndex;
807 } QueryDirectory;
809 struct {
810 ULONG Length;
811 PVOID EaList;
812 ULONG EaListLength;
813 ULONG EaIndex;
814 } QueryEa;
816 struct {
817 ULONG Length;
818 PSID StartSid;
819 PFILE_GET_QUOTA_INFORMATION SidList;
820 ULONG SidListLength;
821 } QueryQuota;
823 struct {
824 ULONG Length;
825 } SetEa;
827 struct {
828 ULONG Length;
829 } SetQuota;
831 struct {
832 ULONG Length;
833 FS_INFORMATION_CLASS FsInformationClass;
834 } SetVolume;
836 } Parameters;
837 PDEVICE_OBJECT DeviceObject;
838 PFILE_OBJECT FileObject;
839 PIO_COMPLETION_ROUTINE CompletionRoutine;
840 PVOID Context;
842 } EXTENDED_IO_STACK_LOCATION, *PEXTENDED_IO_STACK_LOCATION;
843 #if !defined(_ALPHA_)
844 #include <poppack.h>
845 #endif
847 typedef struct _FILE_ACCESS_INFORMATION {
848 ACCESS_MASK AccessFlags;
849 } FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION;
851 typedef struct _FILE_ALLOCATION_INFORMATION {
852 LARGE_INTEGER AllocationSize;
853 } FILE_ALLOCATION_INFORMATION, *PFILE_ALLOCATION_INFORMATION;
855 typedef struct _FILE_BOTH_DIR_INFORMATION {
856 ULONG NextEntryOffset;
857 ULONG FileIndex;
858 LARGE_INTEGER CreationTime;
859 LARGE_INTEGER LastAccessTime;
860 LARGE_INTEGER LastWriteTime;
861 LARGE_INTEGER ChangeTime;
862 LARGE_INTEGER EndOfFile;
863 LARGE_INTEGER AllocationSize;
864 ULONG FileAttributes;
865 ULONG FileNameLength;
866 ULONG EaSize;
867 CCHAR ShortNameLength;
868 WCHAR ShortName[12];
869 WCHAR FileName[1];
870 } FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION;
872 typedef struct _FILE_COMPLETION_INFORMATION {
873 HANDLE Port;
874 ULONG Key;
875 } FILE_COMPLETION_INFORMATION, *PFILE_COMPLETION_INFORMATION;
877 typedef struct _FILE_COMPRESSION_INFORMATION {
878 LARGE_INTEGER CompressedFileSize;
879 USHORT CompressionFormat;
880 UCHAR CompressionUnitShift;
881 UCHAR ChunkShift;
882 UCHAR ClusterShift;
883 UCHAR Reserved[3];
884 } FILE_COMPRESSION_INFORMATION, *PFILE_COMPRESSION_INFORMATION;
886 typedef struct _FILE_COPY_ON_WRITE_INFORMATION {
887 BOOLEAN ReplaceIfExists;
888 HANDLE RootDirectory;
889 ULONG FileNameLength;
890 WCHAR FileName[1];
891 } FILE_COPY_ON_WRITE_INFORMATION, *PFILE_COPY_ON_WRITE_INFORMATION;
893 typedef struct _FILE_DIRECTORY_INFORMATION {
894 ULONG NextEntryOffset;
895 ULONG FileIndex;
896 LARGE_INTEGER CreationTime;
897 LARGE_INTEGER LastAccessTime;
898 LARGE_INTEGER LastWriteTime;
899 LARGE_INTEGER ChangeTime;
900 LARGE_INTEGER EndOfFile;
901 LARGE_INTEGER AllocationSize;
902 ULONG FileAttributes;
903 ULONG FileNameLength;
904 WCHAR FileName[1];
905 } FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION;
907 typedef struct _FILE_FULL_DIRECTORY_INFORMATION {
908 ULONG NextEntryOffset;
909 ULONG FileIndex;
910 LARGE_INTEGER CreationTime;
911 LARGE_INTEGER LastAccessTime;
912 LARGE_INTEGER LastWriteTime;
913 LARGE_INTEGER ChangeTime;
914 LARGE_INTEGER EndOfFile;
915 LARGE_INTEGER AllocationSize;
916 ULONG FileAttributes;
917 ULONG FileNameLength;
918 ULONG EaSize;
919 WCHAR FileName[0];
920 } FILE_FULL_DIRECTORY_INFORMATION, *PFILE_FULL_DIRECTORY_INFORMATION;
922 typedef struct _FILE_BOTH_DIRECTORY_INFORMATION {
923 ULONG NextEntryOffset;
924 ULONG FileIndex;
925 LARGE_INTEGER CreationTime;
926 LARGE_INTEGER LastAccessTime;
927 LARGE_INTEGER LastWriteTime;
928 LARGE_INTEGER ChangeTime;
929 LARGE_INTEGER EndOfFile;
930 LARGE_INTEGER AllocationSize;
931 ULONG FileAttributes;
932 ULONG FileNameLength;
933 ULONG EaSize;
934 CHAR ShortNameLength;
935 WCHAR ShortName[12];
936 WCHAR FileName[0];
937 } FILE_BOTH_DIRECTORY_INFORMATION, *PFILE_BOTH_DIRECTORY_INFORMATION;
939 #if (VER_PRODUCTBUILD >= 2600)
941 typedef struct _FILE_ID_FULL_DIRECTORY_INFORMATION {
942 ULONG NextEntryOffset;
943 ULONG FileIndex;
944 LARGE_INTEGER CreationTime;
945 LARGE_INTEGER LastAccessTime;
946 LARGE_INTEGER LastWriteTime;
947 LARGE_INTEGER ChangeTime;
948 LARGE_INTEGER EndOfFile;
949 LARGE_INTEGER AllocationSize;
950 ULONG FileAttributes;
951 ULONG FileNameLength;
952 ULONG EaSize;
953 LARGE_INTEGER FileId;
954 WCHAR FileName[0];
955 } FILE_ID_FULL_DIRECTORY_INFORMATION, *PFILE_ID_FULL_DIRECTORY_INFORMATION;
957 typedef struct _FILE_ID_BOTH_DIRECTORY_INFORMATION {
958 ULONG NextEntryOffset;
959 ULONG FileIndex;
960 LARGE_INTEGER CreationTime;
961 LARGE_INTEGER LastAccessTime;
962 LARGE_INTEGER LastWriteTime;
963 LARGE_INTEGER ChangeTime;
964 LARGE_INTEGER EndOfFile;
965 LARGE_INTEGER AllocationSize;
966 ULONG FileAttributes;
967 ULONG FileNameLength;
968 ULONG EaSize;
969 CHAR ShortNameLength;
970 WCHAR ShortName[12];
971 LARGE_INTEGER FileId;
972 WCHAR FileName[0];
973 } FILE_ID_BOTH_DIRECTORY_INFORMATION, *PFILE_ID_BOTH_DIRECTORY_INFORMATION;
975 #endif
977 typedef struct _FILE_EA_INFORMATION {
978 ULONG EaSize;
979 } FILE_EA_INFORMATION, *PFILE_EA_INFORMATION;
981 typedef struct _FILE_FS_ATTRIBUTE_INFORMATION {
982 ULONG FileSystemAttributes;
983 ULONG MaximumComponentNameLength;
984 ULONG FileSystemNameLength;
985 WCHAR FileSystemName[1];
986 } FILE_FS_ATTRIBUTE_INFORMATION, *PFILE_FS_ATTRIBUTE_INFORMATION;
988 typedef struct _FILE_FS_CONTROL_INFORMATION {
989 LARGE_INTEGER FreeSpaceStartFiltering;
990 LARGE_INTEGER FreeSpaceThreshold;
991 LARGE_INTEGER FreeSpaceStopFiltering;
992 LARGE_INTEGER DefaultQuotaThreshold;
993 LARGE_INTEGER DefaultQuotaLimit;
994 ULONG FileSystemControlFlags;
995 } FILE_FS_CONTROL_INFORMATION, *PFILE_FS_CONTROL_INFORMATION;
997 typedef struct _FILE_FS_FULL_SIZE_INFORMATION {
998 LARGE_INTEGER TotalAllocationUnits;
999 LARGE_INTEGER CallerAvailableAllocationUnits;
1000 LARGE_INTEGER ActualAvailableAllocationUnits;
1001 ULONG SectorsPerAllocationUnit;
1002 ULONG BytesPerSector;
1003 } FILE_FS_FULL_SIZE_INFORMATION, *PFILE_FS_FULL_SIZE_INFORMATION;
1005 typedef struct _FILE_FS_LABEL_INFORMATION {
1006 ULONG VolumeLabelLength;
1007 WCHAR VolumeLabel[1];
1008 } FILE_FS_LABEL_INFORMATION, *PFILE_FS_LABEL_INFORMATION;
1010 #if (VER_PRODUCTBUILD >= 2195)
1012 typedef struct _FILE_FS_OBJECT_ID_INFORMATION {
1013 UCHAR ObjectId[16];
1014 UCHAR ExtendedInfo[48];
1015 } FILE_FS_OBJECT_ID_INFORMATION, *PFILE_FS_OBJECT_ID_INFORMATION;
1017 #endif /* (VER_PRODUCTBUILD >= 2195) */
1019 typedef struct _FILE_FS_SIZE_INFORMATION {
1020 LARGE_INTEGER TotalAllocationUnits;
1021 LARGE_INTEGER AvailableAllocationUnits;
1022 ULONG SectorsPerAllocationUnit;
1023 ULONG BytesPerSector;
1024 } FILE_FS_SIZE_INFORMATION, *PFILE_FS_SIZE_INFORMATION;
1026 typedef struct _FILE_FS_VOLUME_INFORMATION {
1027 LARGE_INTEGER VolumeCreationTime;
1028 ULONG VolumeSerialNumber;
1029 ULONG VolumeLabelLength;
1030 BOOLEAN SupportsObjects;
1031 WCHAR VolumeLabel[1];
1032 } FILE_FS_VOLUME_INFORMATION, *PFILE_FS_VOLUME_INFORMATION;
1034 typedef struct _FILE_FULL_DIR_INFORMATION {
1035 ULONG NextEntryOffset;
1036 ULONG FileIndex;
1037 LARGE_INTEGER CreationTime;
1038 LARGE_INTEGER LastAccessTime;
1039 LARGE_INTEGER LastWriteTime;
1040 LARGE_INTEGER ChangeTime;
1041 LARGE_INTEGER EndOfFile;
1042 LARGE_INTEGER AllocationSize;
1043 ULONG FileAttributes;
1044 ULONG FileNameLength;
1045 ULONG EaSize;
1046 WCHAR FileName[1];
1047 } FILE_FULL_DIR_INFORMATION, *PFILE_FULL_DIR_INFORMATION;
1049 typedef struct _FILE_GET_EA_INFORMATION {
1050 ULONG NextEntryOffset;
1051 UCHAR EaNameLength;
1052 CHAR EaName[1];
1053 } FILE_GET_EA_INFORMATION, *PFILE_GET_EA_INFORMATION;
1055 typedef struct _FILE_GET_QUOTA_INFORMATION {
1056 ULONG NextEntryOffset;
1057 ULONG SidLength;
1058 SID Sid;
1059 } FILE_GET_QUOTA_INFORMATION, *PFILE_GET_QUOTA_INFORMATION;
1061 typedef struct _FILE_INTERNAL_INFORMATION {
1062 LARGE_INTEGER IndexNumber;
1063 } FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION;
1065 typedef struct _FILE_LINK_INFORMATION {
1066 BOOLEAN ReplaceIfExists;
1067 HANDLE RootDirectory;
1068 ULONG FileNameLength;
1069 WCHAR FileName[1];
1070 } FILE_LINK_INFORMATION, *PFILE_LINK_INFORMATION;
1072 typedef struct _FILE_LOCK_INFO {
1073 LARGE_INTEGER StartingByte;
1074 LARGE_INTEGER Length;
1075 BOOLEAN ExclusiveLock;
1076 ULONG Key;
1077 PFILE_OBJECT FileObject;
1078 PEPROCESS Process;
1079 LARGE_INTEGER EndingByte;
1080 } FILE_LOCK_INFO, *PFILE_LOCK_INFO;
1082 /* raw internal file lock struct returned from FsRtlGetNextFileLock */
1083 typedef struct _FILE_SHARED_LOCK_ENTRY {
1084 PVOID Unknown1;
1085 PVOID Unknown2;
1086 FILE_LOCK_INFO FileLock;
1087 } FILE_SHARED_LOCK_ENTRY, *PFILE_SHARED_LOCK_ENTRY;
1089 /* raw internal file lock struct returned from FsRtlGetNextFileLock */
1090 typedef struct _FILE_EXCLUSIVE_LOCK_ENTRY {
1091 LIST_ENTRY ListEntry;
1092 PVOID Unknown1;
1093 PVOID Unknown2;
1094 FILE_LOCK_INFO FileLock;
1095 } FILE_EXCLUSIVE_LOCK_ENTRY, *PFILE_EXCLUSIVE_LOCK_ENTRY;
1097 typedef NTSTATUS (*PCOMPLETE_LOCK_IRP_ROUTINE) (
1098 /*IN*/ PVOID Context,
1099 /*IN*/ PIRP Irp
1102 typedef VOID (NTAPI *PUNLOCK_ROUTINE) (
1103 /*IN*/ PVOID Context,
1104 /*IN*/ PFILE_LOCK_INFO FileLockInfo
1107 typedef struct _FILE_LOCK {
1108 PCOMPLETE_LOCK_IRP_ROUTINE CompleteLockIrpRoutine;
1109 PUNLOCK_ROUTINE UnlockRoutine;
1110 BOOLEAN FastIoIsQuestionable;
1111 BOOLEAN Pad[3];
1112 PVOID LockInformation;
1113 FILE_LOCK_INFO LastReturnedLockInfo;
1114 PVOID LastReturnedLock;
1115 } FILE_LOCK, *PFILE_LOCK;
1117 typedef struct _FILE_MAILSLOT_PEEK_BUFFER {
1118 ULONG ReadDataAvailable;
1119 ULONG NumberOfMessages;
1120 ULONG MessageLength;
1121 } FILE_MAILSLOT_PEEK_BUFFER, *PFILE_MAILSLOT_PEEK_BUFFER;
1123 typedef struct _FILE_MAILSLOT_QUERY_INFORMATION {
1124 ULONG MaximumMessageSize;
1125 ULONG MailslotQuota;
1126 ULONG NextMessageSize;
1127 ULONG MessagesAvailable;
1128 LARGE_INTEGER ReadTimeout;
1129 } FILE_MAILSLOT_QUERY_INFORMATION, *PFILE_MAILSLOT_QUERY_INFORMATION;
1131 typedef struct _FILE_MAILSLOT_SET_INFORMATION {
1132 LARGE_INTEGER ReadTimeout;
1133 } FILE_MAILSLOT_SET_INFORMATION, *PFILE_MAILSLOT_SET_INFORMATION;
1135 typedef struct _FILE_MODE_INFORMATION {
1136 ULONG Mode;
1137 } FILE_MODE_INFORMATION, *PFILE_MODE_INFORMATION;
1139 typedef struct _FILE_ALL_INFORMATION {
1140 FILE_BASIC_INFORMATION BasicInformation;
1141 FILE_STANDARD_INFORMATION StandardInformation;
1142 FILE_INTERNAL_INFORMATION InternalInformation;
1143 FILE_EA_INFORMATION EaInformation;
1144 FILE_ACCESS_INFORMATION AccessInformation;
1145 FILE_POSITION_INFORMATION PositionInformation;
1146 FILE_MODE_INFORMATION ModeInformation;
1147 FILE_ALIGNMENT_INFORMATION AlignmentInformation;
1148 FILE_NAME_INFORMATION NameInformation;
1149 } FILE_ALL_INFORMATION, *PFILE_ALL_INFORMATION;
1151 typedef struct _FILE_NAMES_INFORMATION {
1152 ULONG NextEntryOffset;
1153 ULONG FileIndex;
1154 ULONG FileNameLength;
1155 WCHAR FileName[1];
1156 } FILE_NAMES_INFORMATION, *PFILE_NAMES_INFORMATION;
1158 typedef struct _FILE_OBJECTID_INFORMATION {
1159 LONGLONG FileReference;
1160 UCHAR ObjectId[16];
1161 _ANONYMOUS_UNION union {
1162 struct {
1163 UCHAR BirthVolumeId[16];
1164 UCHAR BirthObjectId[16];
1165 UCHAR DomainId[16];
1167 UCHAR ExtendedInfo[48];
1168 } DUMMYUNIONNAME;
1169 } FILE_OBJECTID_INFORMATION, *PFILE_OBJECTID_INFORMATION;
1171 typedef struct _FILE_OLE_CLASSID_INFORMATION {
1172 GUID ClassId;
1173 } FILE_OLE_CLASSID_INFORMATION, *PFILE_OLE_CLASSID_INFORMATION;
1175 typedef struct _FILE_OLE_ALL_INFORMATION {
1176 FILE_BASIC_INFORMATION BasicInformation;
1177 FILE_STANDARD_INFORMATION StandardInformation;
1178 FILE_INTERNAL_INFORMATION InternalInformation;
1179 FILE_EA_INFORMATION EaInformation;
1180 FILE_ACCESS_INFORMATION AccessInformation;
1181 FILE_POSITION_INFORMATION PositionInformation;
1182 FILE_MODE_INFORMATION ModeInformation;
1183 FILE_ALIGNMENT_INFORMATION AlignmentInformation;
1184 USN LastChangeUsn;
1185 USN ReplicationUsn;
1186 LARGE_INTEGER SecurityChangeTime;
1187 FILE_OLE_CLASSID_INFORMATION OleClassIdInformation;
1188 FILE_OBJECTID_INFORMATION ObjectIdInformation;
1189 FILE_STORAGE_TYPE StorageType;
1190 ULONG OleStateBits;
1191 ULONG OleId;
1192 ULONG NumberOfStreamReferences;
1193 ULONG StreamIndex;
1194 ULONG SecurityId;
1195 BOOLEAN ContentIndexDisable;
1196 BOOLEAN InheritContentIndexDisable;
1197 FILE_NAME_INFORMATION NameInformation;
1198 } FILE_OLE_ALL_INFORMATION, *PFILE_OLE_ALL_INFORMATION;
1200 typedef struct _FILE_OLE_DIR_INFORMATION {
1201 ULONG NextEntryOffset;
1202 ULONG FileIndex;
1203 LARGE_INTEGER CreationTime;
1204 LARGE_INTEGER LastAccessTime;
1205 LARGE_INTEGER LastWriteTime;
1206 LARGE_INTEGER ChangeTime;
1207 LARGE_INTEGER EndOfFile;
1208 LARGE_INTEGER AllocationSize;
1209 ULONG FileAttributes;
1210 ULONG FileNameLength;
1211 FILE_STORAGE_TYPE StorageType;
1212 GUID OleClassId;
1213 ULONG OleStateBits;
1214 BOOLEAN ContentIndexDisable;
1215 BOOLEAN InheritContentIndexDisable;
1216 WCHAR FileName[1];
1217 } FILE_OLE_DIR_INFORMATION, *PFILE_OLE_DIR_INFORMATION;
1219 typedef struct _FILE_OLE_INFORMATION {
1220 LARGE_INTEGER SecurityChangeTime;
1221 FILE_OLE_CLASSID_INFORMATION OleClassIdInformation;
1222 FILE_OBJECTID_INFORMATION ObjectIdInformation;
1223 FILE_STORAGE_TYPE StorageType;
1224 ULONG OleStateBits;
1225 BOOLEAN ContentIndexDisable;
1226 BOOLEAN InheritContentIndexDisable;
1227 } FILE_OLE_INFORMATION, *PFILE_OLE_INFORMATION;
1229 typedef struct _FILE_OLE_STATE_BITS_INFORMATION {
1230 ULONG StateBits;
1231 ULONG StateBitsMask;
1232 } FILE_OLE_STATE_BITS_INFORMATION, *PFILE_OLE_STATE_BITS_INFORMATION;
1234 typedef struct _FILE_PIPE_ASSIGN_EVENT_BUFFER {
1235 HANDLE EventHandle;
1236 ULONG KeyValue;
1237 } FILE_PIPE_ASSIGN_EVENT_BUFFER, *PFILE_PIPE_ASSIGN_EVENT_BUFFER;
1239 typedef struct _FILE_PIPE_CLIENT_PROCESS_BUFFER {
1240 PVOID ClientSession;
1241 PVOID ClientProcess;
1242 } FILE_PIPE_CLIENT_PROCESS_BUFFER, *PFILE_PIPE_CLIENT_PROCESS_BUFFER;
1244 typedef struct _FILE_PIPE_EVENT_BUFFER {
1245 ULONG NamedPipeState;
1246 ULONG EntryType;
1247 ULONG ByteCount;
1248 ULONG KeyValue;
1249 ULONG NumberRequests;
1250 } FILE_PIPE_EVENT_BUFFER, *PFILE_PIPE_EVENT_BUFFER;
1252 typedef struct _FILE_PIPE_INFORMATION {
1253 ULONG ReadMode;
1254 ULONG CompletionMode;
1255 } FILE_PIPE_INFORMATION, *PFILE_PIPE_INFORMATION;
1257 typedef struct _FILE_PIPE_LOCAL_INFORMATION {
1258 ULONG NamedPipeType;
1259 ULONG NamedPipeConfiguration;
1260 ULONG MaximumInstances;
1261 ULONG CurrentInstances;
1262 ULONG InboundQuota;
1263 ULONG ReadDataAvailable;
1264 ULONG OutboundQuota;
1265 ULONG WriteQuotaAvailable;
1266 ULONG NamedPipeState;
1267 ULONG NamedPipeEnd;
1268 } FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION;
1270 typedef struct _FILE_PIPE_REMOTE_INFORMATION {
1271 LARGE_INTEGER CollectDataTime;
1272 ULONG MaximumCollectionCount;
1273 } FILE_PIPE_REMOTE_INFORMATION, *PFILE_PIPE_REMOTE_INFORMATION;
1275 typedef struct _FILE_PIPE_WAIT_FOR_BUFFER {
1276 LARGE_INTEGER Timeout;
1277 ULONG NameLength;
1278 BOOLEAN TimeoutSpecified;
1279 WCHAR Name[1];
1280 } FILE_PIPE_WAIT_FOR_BUFFER, *PFILE_PIPE_WAIT_FOR_BUFFER;
1282 typedef struct _FILE_QUOTA_INFORMATION {
1283 ULONG NextEntryOffset;
1284 ULONG SidLength;
1285 LARGE_INTEGER ChangeTime;
1286 LARGE_INTEGER QuotaUsed;
1287 LARGE_INTEGER QuotaThreshold;
1288 LARGE_INTEGER QuotaLimit;
1289 SID Sid;
1290 } FILE_QUOTA_INFORMATION, *PFILE_QUOTA_INFORMATION;
1292 typedef struct _FILE_RENAME_INFORMATION {
1293 BOOLEAN ReplaceIfExists;
1294 HANDLE RootDirectory;
1295 ULONG FileNameLength;
1296 WCHAR FileName[1];
1297 } FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION;
1299 typedef struct _FILE_STREAM_INFORMATION {
1300 ULONG NextEntryOffset;
1301 ULONG StreamNameLength;
1302 LARGE_INTEGER StreamSize;
1303 LARGE_INTEGER StreamAllocationSize;
1304 WCHAR StreamName[1];
1305 } FILE_STREAM_INFORMATION, *PFILE_STREAM_INFORMATION;
1307 typedef struct _FILE_TRACKING_INFORMATION {
1308 HANDLE DestinationFile;
1309 ULONG ObjectInformationLength;
1310 CHAR ObjectInformation[1];
1311 } FILE_TRACKING_INFORMATION, *PFILE_TRACKING_INFORMATION;
1313 typedef struct _FSRTL_COMMON_FCB_HEADER {
1314 CSHORT NodeTypeCode;
1315 CSHORT NodeByteSize;
1316 UCHAR Flags;
1317 UCHAR IsFastIoPossible;
1318 #if (VER_PRODUCTBUILD >= 1381)
1319 UCHAR Flags2;
1320 UCHAR Reserved;
1321 #endif /* (VER_PRODUCTBUILD >= 1381) */
1322 PERESOURCE Resource;
1323 PERESOURCE PagingIoResource;
1324 LARGE_INTEGER AllocationSize;
1325 LARGE_INTEGER FileSize;
1326 LARGE_INTEGER ValidDataLength;
1327 } FSRTL_COMMON_FCB_HEADER, *PFSRTL_COMMON_FCB_HEADER;
1329 typedef struct _GENERATE_NAME_CONTEXT {
1330 USHORT Checksum;
1331 BOOLEAN CheckSumInserted;
1332 UCHAR NameLength;
1333 WCHAR NameBuffer[8];
1334 ULONG ExtensionLength;
1335 WCHAR ExtensionBuffer[4];
1336 ULONG LastIndexValue;
1337 } GENERATE_NAME_CONTEXT, *PGENERATE_NAME_CONTEXT;
1339 typedef struct _HANDLE_TABLE_ENTRY {
1340 PVOID Object;
1341 ULONG ObjectAttributes;
1342 ULONG GrantedAccess;
1343 USHORT GrantedAccessIndex;
1344 USHORT CreatorBackTraceIndex;
1345 ULONG NextFreeTableEntry;
1346 } HANDLE_TABLE_ENTRY, *PHANDLE_TABLE_ENTRY;
1348 typedef struct _MAPPING_PAIR {
1349 ULONGLONG Vcn;
1350 ULONGLONG Lcn;
1351 } MAPPING_PAIR, *PMAPPING_PAIR;
1353 typedef struct _GET_RETRIEVAL_DESCRIPTOR {
1354 ULONG NumberOfPairs;
1355 ULONGLONG StartVcn;
1356 MAPPING_PAIR Pair[1];
1357 } GET_RETRIEVAL_DESCRIPTOR, *PGET_RETRIEVAL_DESCRIPTOR;
1359 typedef struct _IO_CLIENT_EXTENSION {
1360 struct _IO_CLIENT_EXTENSION *NextExtension;
1361 PVOID ClientIdentificationAddress;
1362 } IO_CLIENT_EXTENSION, *PIO_CLIENT_EXTENSION;
1364 typedef struct _IO_COMPLETION_BASIC_INFORMATION {
1365 LONG Depth;
1366 } IO_COMPLETION_BASIC_INFORMATION, *PIO_COMPLETION_BASIC_INFORMATION;
1368 typedef struct _KEVENT_PAIR {
1369 USHORT Type;
1370 USHORT Size;
1371 KEVENT Event1;
1372 KEVENT Event2;
1373 } KEVENT_PAIR, *PKEVENT_PAIR;
1375 typedef struct _KQUEUE {
1376 DISPATCHER_HEADER Header;
1377 LIST_ENTRY EntryListHead;
1378 ULONG CurrentCount;
1379 ULONG MaximumCount;
1380 LIST_ENTRY ThreadListHead;
1381 } KQUEUE, *PKQUEUE, *RESTRICTED_POINTER PRKQUEUE;
1383 typedef struct _MAILSLOT_CREATE_PARAMETERS {
1384 ULONG MailslotQuota;
1385 ULONG MaximumMessageSize;
1386 LARGE_INTEGER ReadTimeout;
1387 BOOLEAN TimeoutSpecified;
1388 } MAILSLOT_CREATE_PARAMETERS, *PMAILSLOT_CREATE_PARAMETERS;
1390 typedef struct _MBCB {
1391 CSHORT NodeTypeCode;
1392 CSHORT NodeIsInZone;
1393 ULONG PagesToWrite;
1394 ULONG DirtyPages;
1395 ULONG Reserved;
1396 LIST_ENTRY BitmapRanges;
1397 LONGLONG ResumeWritePage;
1398 BITMAP_RANGE BitmapRange1;
1399 BITMAP_RANGE BitmapRange2;
1400 BITMAP_RANGE BitmapRange3;
1401 } MBCB, *PMBCB;
1403 typedef struct _MOVEFILE_DESCRIPTOR {
1404 HANDLE FileHandle;
1405 ULONG Reserved;
1406 LARGE_INTEGER StartVcn;
1407 LARGE_INTEGER TargetLcn;
1408 ULONG NumVcns;
1409 ULONG Reserved1;
1410 } MOVEFILE_DESCRIPTOR, *PMOVEFILE_DESCRIPTOR;
1412 typedef struct _NAMED_PIPE_CREATE_PARAMETERS {
1413 ULONG NamedPipeType;
1414 ULONG ReadMode;
1415 ULONG CompletionMode;
1416 ULONG MaximumInstances;
1417 ULONG InboundQuota;
1418 ULONG OutboundQuota;
1419 LARGE_INTEGER DefaultTimeout;
1420 BOOLEAN TimeoutSpecified;
1421 } NAMED_PIPE_CREATE_PARAMETERS, *PNAMED_PIPE_CREATE_PARAMETERS;
1423 typedef struct _OBJECT_BASIC_INFO {
1424 ULONG Attributes;
1425 ACCESS_MASK GrantedAccess;
1426 ULONG HandleCount;
1427 ULONG ReferenceCount;
1428 ULONG PagedPoolUsage;
1429 ULONG NonPagedPoolUsage;
1430 ULONG Reserved[3];
1431 ULONG NameInformationLength;
1432 ULONG TypeInformationLength;
1433 ULONG SecurityDescriptorLength;
1434 LARGE_INTEGER CreateTime;
1435 } OBJECT_BASIC_INFO, *POBJECT_BASIC_INFO;
1437 typedef struct _OBJECT_HANDLE_ATTRIBUTE_INFO {
1438 BOOLEAN Inherit;
1439 BOOLEAN ProtectFromClose;
1440 } OBJECT_HANDLE_ATTRIBUTE_INFO, *POBJECT_HANDLE_ATTRIBUTE_INFO;
1442 typedef struct _OBJECT_NAME_INFO {
1443 UNICODE_STRING ObjectName;
1444 WCHAR ObjectNameBuffer[1];
1445 } OBJECT_NAME_INFO, *POBJECT_NAME_INFO;
1447 typedef struct _OBJECT_PROTECTION_INFO {
1448 BOOLEAN Inherit;
1449 BOOLEAN ProtectHandle;
1450 } OBJECT_PROTECTION_INFO, *POBJECT_PROTECTION_INFO;
1452 typedef struct _OBJECT_TYPE_INFO {
1453 UNICODE_STRING ObjectTypeName;
1454 UCHAR Unknown[0x58];
1455 WCHAR ObjectTypeNameBuffer[1];
1456 } OBJECT_TYPE_INFO, *POBJECT_TYPE_INFO;
1458 typedef struct _OBJECT_ALL_TYPES_INFO {
1459 ULONG NumberOfObjectTypes;
1460 OBJECT_TYPE_INFO ObjectsTypeInfo[1];
1461 } OBJECT_ALL_TYPES_INFO, *POBJECT_ALL_TYPES_INFO;
1463 typedef struct _PAGEFAULT_HISTORY {
1464 ULONG CurrentIndex;
1465 ULONG MaxIndex;
1466 KSPIN_LOCK SpinLock;
1467 PVOID Reserved;
1468 PROCESS_WS_WATCH_INFORMATION WatchInfo[1];
1469 } PAGEFAULT_HISTORY, *PPAGEFAULT_HISTORY;
1471 typedef struct _PATHNAME_BUFFER {
1472 ULONG PathNameLength;
1473 WCHAR Name[1];
1474 } PATHNAME_BUFFER, *PPATHNAME_BUFFER;
1476 #if (VER_PRODUCTBUILD >= 2600)
1478 typedef struct _PRIVATE_CACHE_MAP_FLAGS {
1479 ULONG DontUse : 16;
1480 ULONG ReadAheadActive : 1;
1481 ULONG ReadAheadEnabled : 1;
1482 ULONG Available : 14;
1483 } PRIVATE_CACHE_MAP_FLAGS, *PPRIVATE_CACHE_MAP_FLAGS;
1485 typedef struct _PRIVATE_CACHE_MAP {
1486 _ANONYMOUS_UNION union {
1487 CSHORT NodeTypeCode;
1488 PRIVATE_CACHE_MAP_FLAGS Flags;
1489 ULONG UlongFlags;
1490 } DUMMYUNIONNAME;
1491 ULONG ReadAheadMask;
1492 PFILE_OBJECT FileObject;
1493 LARGE_INTEGER FileOffset1;
1494 LARGE_INTEGER BeyondLastByte1;
1495 LARGE_INTEGER FileOffset2;
1496 LARGE_INTEGER BeyondLastByte2;
1497 LARGE_INTEGER ReadAheadOffset[2];
1498 ULONG ReadAheadLength[2];
1499 KSPIN_LOCK ReadAheadSpinLock;
1500 LIST_ENTRY PrivateLinks;
1501 } PRIVATE_CACHE_MAP, *PPRIVATE_CACHE_MAP;
1503 #endif
1505 typedef struct _PS_IMPERSONATION_INFORMATION {
1506 PACCESS_TOKEN Token;
1507 BOOLEAN CopyOnOpen;
1508 BOOLEAN EffectiveOnly;
1509 SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
1510 } PS_IMPERSONATION_INFORMATION, *PPS_IMPERSONATION_INFORMATION;
1512 typedef struct _PUBLIC_BCB {
1513 CSHORT NodeTypeCode;
1514 CSHORT NodeByteSize;
1515 ULONG MappedLength;
1516 LARGE_INTEGER MappedFileOffset;
1517 } PUBLIC_BCB, *PPUBLIC_BCB;
1519 typedef struct _QUERY_PATH_REQUEST {
1520 ULONG PathNameLength;
1521 PIO_SECURITY_CONTEXT SecurityContext;
1522 WCHAR FilePathName[1];
1523 } QUERY_PATH_REQUEST, *PQUERY_PATH_REQUEST;
1525 typedef struct _QUERY_PATH_RESPONSE {
1526 ULONG LengthAccepted;
1527 } QUERY_PATH_RESPONSE, *PQUERY_PATH_RESPONSE;
1529 typedef struct _RETRIEVAL_POINTERS_BUFFER {
1530 ULONG ExtentCount;
1531 LARGE_INTEGER StartingVcn;
1532 struct {
1533 LARGE_INTEGER NextVcn;
1534 LARGE_INTEGER Lcn;
1535 } Extents[1];
1536 } RETRIEVAL_POINTERS_BUFFER, *PRETRIEVAL_POINTERS_BUFFER;
1538 typedef struct _RTL_SPLAY_LINKS {
1539 struct _RTL_SPLAY_LINKS *Parent;
1540 struct _RTL_SPLAY_LINKS *LeftChild;
1541 struct _RTL_SPLAY_LINKS *RightChild;
1542 } RTL_SPLAY_LINKS, *PRTL_SPLAY_LINKS;
1544 typedef struct _SE_EXPORTS {
1546 LUID SeCreateTokenPrivilege;
1547 LUID SeAssignPrimaryTokenPrivilege;
1548 LUID SeLockMemoryPrivilege;
1549 LUID SeIncreaseQuotaPrivilege;
1550 LUID SeUnsolicitedInputPrivilege;
1551 LUID SeTcbPrivilege;
1552 LUID SeSecurityPrivilege;
1553 LUID SeTakeOwnershipPrivilege;
1554 LUID SeLoadDriverPrivilege;
1555 LUID SeCreatePagefilePrivilege;
1556 LUID SeIncreaseBasePriorityPrivilege;
1557 LUID SeSystemProfilePrivilege;
1558 LUID SeSystemtimePrivilege;
1559 LUID SeProfileSingleProcessPrivilege;
1560 LUID SeCreatePermanentPrivilege;
1561 LUID SeBackupPrivilege;
1562 LUID SeRestorePrivilege;
1563 LUID SeShutdownPrivilege;
1564 LUID SeDebugPrivilege;
1565 LUID SeAuditPrivilege;
1566 LUID SeSystemEnvironmentPrivilege;
1567 LUID SeChangeNotifyPrivilege;
1568 LUID SeRemoteShutdownPrivilege;
1570 PSID SeNullSid;
1571 PSID SeWorldSid;
1572 PSID SeLocalSid;
1573 PSID SeCreatorOwnerSid;
1574 PSID SeCreatorGroupSid;
1576 PSID SeNtAuthoritySid;
1577 PSID SeDialupSid;
1578 PSID SeNetworkSid;
1579 PSID SeBatchSid;
1580 PSID SeInteractiveSid;
1581 PSID SeLocalSystemSid;
1582 PSID SeAliasAdminsSid;
1583 PSID SeAliasUsersSid;
1584 PSID SeAliasGuestsSid;
1585 PSID SeAliasPowerUsersSid;
1586 PSID SeAliasAccountOpsSid;
1587 PSID SeAliasSystemOpsSid;
1588 PSID SeAliasPrintOpsSid;
1589 PSID SeAliasBackupOpsSid;
1591 PSID SeAuthenticatedUsersSid;
1593 PSID SeRestrictedSid;
1594 PSID SeAnonymousLogonSid;
1596 LUID SeUndockPrivilege;
1597 LUID SeSyncAgentPrivilege;
1598 LUID SeEnableDelegationPrivilege;
1600 } SE_EXPORTS, *PSE_EXPORTS;
1602 typedef struct _SECTION_BASIC_INFORMATION {
1603 PVOID BaseAddress;
1604 ULONG Attributes;
1605 LARGE_INTEGER Size;
1606 } SECTION_BASIC_INFORMATION, *PSECTION_BASIC_INFORMATION;
1608 typedef struct _SECTION_IMAGE_INFORMATION {
1609 PVOID EntryPoint;
1610 ULONG Unknown1;
1611 ULONG StackReserve;
1612 ULONG StackCommit;
1613 ULONG Subsystem;
1614 USHORT MinorSubsystemVersion;
1615 USHORT MajorSubsystemVersion;
1616 ULONG Unknown2;
1617 ULONG Characteristics;
1618 USHORT ImageNumber;
1619 BOOLEAN Executable;
1620 UCHAR Unknown3;
1621 ULONG Unknown4[3];
1622 } SECTION_IMAGE_INFORMATION, *PSECTION_IMAGE_INFORMATION;
1624 #if (VER_PRODUCTBUILD >= 2600)
1626 typedef struct _SHARED_CACHE_MAP {
1627 CSHORT NodeTypeCode;
1628 CSHORT NodeByteSize;
1629 ULONG OpenCount;
1630 LARGE_INTEGER FileSize;
1631 LIST_ENTRY BcbList;
1632 LARGE_INTEGER SectionSize;
1633 LARGE_INTEGER ValidDataLength;
1634 LARGE_INTEGER ValidDataGoal;
1635 PVACB InitialVacbs[4];
1636 PVACB *Vacbs;
1637 PFILE_OBJECT FileObject;
1638 PVACB ActiveVacb;
1639 PVOID NeedToZero;
1640 ULONG ActivePage;
1641 ULONG NeedToZeroPage;
1642 KSPIN_LOCK ActiveVacbSpinLock;
1643 ULONG VacbActiveCount;
1644 ULONG DirtyPages;
1645 LIST_ENTRY SharedCacheMapLinks;
1646 ULONG Flags;
1647 NTSTATUS Status;
1648 PMBCB Mbcb;
1649 PVOID Section;
1650 PKEVENT CreateEvent;
1651 PKEVENT WaitOnActiveCount;
1652 ULONG PagesToWrite;
1653 LONGLONG BeyondLastFlush;
1654 PCACHE_MANAGER_CALLBACKS Callbacks;
1655 PVOID LazyWriteContext;
1656 LIST_ENTRY PrivateList;
1657 PVOID LogHandle;
1658 PVOID FlushToLsnRoutine;
1659 ULONG DirtyPageThreshold;
1660 ULONG LazyWritePassCount;
1661 PCACHE_UNINITIALIZE_EVENT UninitializeEvent;
1662 PVACB NeedToZeroVacb;
1663 KSPIN_LOCK BcbSpinLock;
1664 PVOID Reserved;
1665 KEVENT Event;
1666 EX_PUSH_LOCK VacbPushLock;
1667 PRIVATE_CACHE_MAP PrivateCacheMap;
1668 } SHARED_CACHE_MAP, *PSHARED_CACHE_MAP;
1670 #endif
1672 typedef struct _STARTING_VCN_INPUT_BUFFER {
1673 LARGE_INTEGER StartingVcn;
1674 } STARTING_VCN_INPUT_BUFFER, *PSTARTING_VCN_INPUT_BUFFER;
1676 typedef struct _SYSTEM_CACHE_INFORMATION {
1677 ULONG CurrentSize;
1678 ULONG PeakSize;
1679 ULONG PageFaultCount;
1680 ULONG MinimumWorkingSet;
1681 ULONG MaximumWorkingSet;
1682 ULONG Unused[4];
1683 } SYSTEM_CACHE_INFORMATION, *PSYSTEM_CACHE_INFORMATION;
1685 typedef struct _TERMINATION_PORT {
1686 struct _TERMINATION_PORT* Next;
1687 PVOID Port;
1688 } TERMINATION_PORT, *PTERMINATION_PORT;
1690 typedef struct _SECURITY_CLIENT_CONTEXT {
1691 SECURITY_QUALITY_OF_SERVICE SecurityQos;
1692 PACCESS_TOKEN ClientToken;
1693 BOOLEAN DirectlyAccessClientToken;
1694 BOOLEAN DirectAccessEffectiveOnly;
1695 BOOLEAN ServerIsRemote;
1696 TOKEN_CONTROL ClientTokenControl;
1697 } SECURITY_CLIENT_CONTEXT, *PSECURITY_CLIENT_CONTEXT;
1699 typedef struct _TUNNEL {
1700 FAST_MUTEX Mutex;
1701 PRTL_SPLAY_LINKS Cache;
1702 LIST_ENTRY TimerQueue;
1703 USHORT NumEntries;
1704 } TUNNEL, *PTUNNEL;
1706 typedef struct _VACB {
1707 PVOID BaseAddress;
1708 PSHARED_CACHE_MAP SharedCacheMap;
1709 union {
1710 LARGE_INTEGER FileOffset;
1711 USHORT ActiveCount;
1712 } Overlay;
1713 LIST_ENTRY LruList;
1714 } VACB, *PVACB;
1716 typedef struct _VAD_HEADER {
1717 PVOID StartVPN;
1718 PVOID EndVPN;
1719 PVAD_HEADER ParentLink;
1720 PVAD_HEADER LeftLink;
1721 PVAD_HEADER RightLink;
1722 ULONG Flags; /* LSB = CommitCharge */
1723 PVOID ControlArea;
1724 PVOID FirstProtoPte;
1725 PVOID LastPTE;
1726 ULONG Unknown;
1727 LIST_ENTRY Secured;
1728 } VAD_HEADER, *PVAD_HEADER;
1730 NTKERNELAPI
1731 BOOLEAN
1732 NTAPI
1733 CcCanIWrite (
1734 /*IN*/ PFILE_OBJECT FileObject,
1735 /*IN*/ ULONG BytesToWrite,
1736 /*IN*/ BOOLEAN Wait,
1737 /*IN*/ BOOLEAN Retrying
1740 NTKERNELAPI
1741 BOOLEAN
1742 NTAPI
1743 CcCopyRead (
1744 /*IN*/ PFILE_OBJECT FileObject,
1745 /*IN*/ PLARGE_INTEGER FileOffset,
1746 /*IN*/ ULONG Length,
1747 /*IN*/ BOOLEAN Wait,
1748 /*OUT*/ PVOID Buffer,
1749 /*OUT*/ PIO_STATUS_BLOCK IoStatus
1752 NTKERNELAPI
1753 BOOLEAN
1754 NTAPI
1755 CcCopyWrite (
1756 /*IN*/ PFILE_OBJECT FileObject,
1757 /*IN*/ PLARGE_INTEGER FileOffset,
1758 /*IN*/ ULONG Length,
1759 /*IN*/ BOOLEAN Wait,
1760 /*IN*/ PVOID Buffer
1763 #define CcCopyWriteWontFlush(FO, FOFF, LEN) ((LEN) <= 0x10000)
1765 typedef VOID (NTAPI *PCC_POST_DEFERRED_WRITE) (
1766 /*IN*/ PVOID Context1,
1767 /*IN*/ PVOID Context2
1770 NTKERNELAPI
1771 VOID
1772 NTAPI
1773 CcDeferWrite (
1774 /*IN*/ PFILE_OBJECT FileObject,
1775 /*IN*/ PCC_POST_DEFERRED_WRITE PostRoutine,
1776 /*IN*/ PVOID Context1,
1777 /*IN*/ PVOID Context2,
1778 /*IN*/ ULONG BytesToWrite,
1779 /*IN*/ BOOLEAN Retrying
1782 NTKERNELAPI
1783 VOID
1784 NTAPI
1785 CcFastCopyRead (
1786 /*IN*/ PFILE_OBJECT FileObject,
1787 /*IN*/ ULONG FileOffset,
1788 /*IN*/ ULONG Length,
1789 /*IN*/ ULONG PageCount,
1790 /*OUT*/ PVOID Buffer,
1791 /*OUT*/ PIO_STATUS_BLOCK IoStatus
1794 NTKERNELAPI
1795 VOID
1796 NTAPI
1797 CcFastCopyWrite (
1798 /*IN*/ PFILE_OBJECT FileObject,
1799 /*IN*/ ULONG FileOffset,
1800 /*IN*/ ULONG Length,
1801 /*IN*/ PVOID Buffer
1804 NTKERNELAPI
1805 VOID
1806 NTAPI
1807 CcFlushCache (
1808 /*IN*/ PSECTION_OBJECT_POINTERS SectionObjectPointer,
1809 /*IN*/ PLARGE_INTEGER FileOffset /*OPTIONAL*/,
1810 /*IN*/ ULONG Length,
1811 /*OUT*/ PIO_STATUS_BLOCK IoStatus /*OPTIONAL*/
1814 typedef VOID (*PDIRTY_PAGE_ROUTINE) (
1815 /*IN*/ PFILE_OBJECT FileObject,
1816 /*IN*/ PLARGE_INTEGER FileOffset,
1817 /*IN*/ ULONG Length,
1818 /*IN*/ PLARGE_INTEGER OldestLsn,
1819 /*IN*/ PLARGE_INTEGER NewestLsn,
1820 /*IN*/ PVOID Context1,
1821 /*IN*/ PVOID Context2
1824 NTKERNELAPI
1825 LARGE_INTEGER
1826 NTAPI
1827 CcGetDirtyPages (
1828 /*IN*/ PVOID LogHandle,
1829 /*IN*/ PDIRTY_PAGE_ROUTINE DirtyPageRoutine,
1830 /*IN*/ PVOID Context1,
1831 /*IN*/ PVOID Context2
1834 NTKERNELAPI
1835 PFILE_OBJECT
1836 NTAPI
1837 CcGetFileObjectFromBcb (
1838 /*IN*/ PVOID Bcb
1841 NTKERNELAPI
1842 PFILE_OBJECT
1843 NTAPI
1844 CcGetFileObjectFromSectionPtrs (
1845 /*IN*/ PSECTION_OBJECT_POINTERS SectionObjectPointer
1848 #define CcGetFileSizePointer(FO) ( \
1849 ((PLARGE_INTEGER)((FO)->SectionObjectPointer->SharedCacheMap) + 1) \
1852 #if (VER_PRODUCTBUILD >= 2195)
1854 NTKERNELAPI
1855 LARGE_INTEGER
1856 NTAPI
1857 CcGetFlushedValidData (
1858 /*IN*/ PSECTION_OBJECT_POINTERS SectionObjectPointer,
1859 /*IN*/ BOOLEAN BcbListHeld
1862 #endif /* (VER_PRODUCTBUILD >= 2195) */
1864 NTKERNELAPI
1865 LARGE_INTEGER
1866 CcGetLsnForFileObject (
1867 /*IN*/ PFILE_OBJECT FileObject,
1868 /*OUT*/ PLARGE_INTEGER OldestLsn /*OPTIONAL*/
1871 typedef BOOLEAN (NTAPI *PACQUIRE_FOR_LAZY_WRITE) (
1872 /*IN*/ PVOID Context,
1873 /*IN*/ BOOLEAN Wait
1876 typedef VOID (NTAPI *PRELEASE_FROM_LAZY_WRITE) (
1877 /*IN*/ PVOID Context
1880 typedef BOOLEAN (NTAPI *PACQUIRE_FOR_READ_AHEAD) (
1881 /*IN*/ PVOID Context,
1882 /*IN*/ BOOLEAN Wait
1885 typedef VOID (NTAPI *PRELEASE_FROM_READ_AHEAD) (
1886 /*IN*/ PVOID Context
1889 typedef struct _CACHE_MANAGER_CALLBACKS {
1890 PACQUIRE_FOR_LAZY_WRITE AcquireForLazyWrite;
1891 PRELEASE_FROM_LAZY_WRITE ReleaseFromLazyWrite;
1892 PACQUIRE_FOR_READ_AHEAD AcquireForReadAhead;
1893 PRELEASE_FROM_READ_AHEAD ReleaseFromReadAhead;
1894 } CACHE_MANAGER_CALLBACKS, *PCACHE_MANAGER_CALLBACKS;
1896 NTKERNELAPI
1897 VOID
1898 NTAPI
1899 CcInitializeCacheMap (
1900 /*IN*/ PFILE_OBJECT FileObject,
1901 /*IN*/ PCC_FILE_SIZES FileSizes,
1902 /*IN*/ BOOLEAN PinAccess,
1903 /*IN*/ PCACHE_MANAGER_CALLBACKS Callbacks,
1904 /*IN*/ PVOID LazyWriteContext
1907 #define CcIsFileCached(FO) ( \
1908 ((FO)->SectionObjectPointer != NULL) && \
1909 (((PSECTION_OBJECT_POINTERS)(FO)->SectionObjectPointer)->SharedCacheMap != NULL) \
1912 NTKERNELAPI
1913 BOOLEAN
1914 NTAPI
1915 CcIsThereDirtyData (
1916 /*IN*/ PVPB Vpb
1919 NTKERNELAPI
1920 BOOLEAN
1921 NTAPI
1922 CcMapData (
1923 /*IN*/ PFILE_OBJECT FileObject,
1924 /*IN*/ PLARGE_INTEGER FileOffset,
1925 /*IN*/ ULONG Length,
1926 /*IN*/ BOOLEAN Wait,
1927 /*OUT*/ PVOID *Bcb,
1928 /*OUT*/ PVOID *Buffer
1931 NTKERNELAPI
1932 VOID
1933 NTAPI
1934 CcMdlRead (
1935 /*IN*/ PFILE_OBJECT FileObject,
1936 /*IN*/ PLARGE_INTEGER FileOffset,
1937 /*IN*/ ULONG Length,
1938 /*OUT*/ PMDL *MdlChain,
1939 /*OUT*/ PIO_STATUS_BLOCK IoStatus
1942 NTKERNELAPI
1943 VOID
1944 NTAPI
1945 CcMdlReadComplete (
1946 /*IN*/ PFILE_OBJECT FileObject,
1947 /*IN*/ PMDL MdlChain
1950 NTKERNELAPI
1951 VOID
1952 NTAPI
1953 CcMdlWriteComplete (
1954 /*IN*/ PFILE_OBJECT FileObject,
1955 /*IN*/ PLARGE_INTEGER FileOffset,
1956 /*IN*/ PMDL MdlChain
1959 NTKERNELAPI
1960 BOOLEAN
1961 NTAPI
1962 CcPinMappedData (
1963 /*IN*/ PFILE_OBJECT FileObject,
1964 /*IN*/ PLARGE_INTEGER FileOffset,
1965 /*IN*/ ULONG Length,
1966 #if (VER_PRODUCTBUILD >= 2195)
1967 /*IN*/ ULONG Flags,
1968 #else
1969 /*IN*/ BOOLEAN Wait,
1970 #endif
1971 /*IN OUT*/ PVOID *Bcb
1974 NTKERNELAPI
1975 BOOLEAN
1976 NTAPI
1977 CcPinRead (
1978 /*IN*/ PFILE_OBJECT FileObject,
1979 /*IN*/ PLARGE_INTEGER FileOffset,
1980 /*IN*/ ULONG Length,
1981 #if (VER_PRODUCTBUILD >= 2195)
1982 /*IN*/ ULONG Flags,
1983 #else
1984 /*IN*/ BOOLEAN Wait,
1985 #endif
1986 /*OUT*/ PVOID *Bcb,
1987 /*OUT*/ PVOID *Buffer
1990 NTKERNELAPI
1991 VOID
1992 NTAPI
1993 CcPrepareMdlWrite (
1994 /*IN*/ PFILE_OBJECT FileObject,
1995 /*IN*/ PLARGE_INTEGER FileOffset,
1996 /*IN*/ ULONG Length,
1997 /*OUT*/ PMDL *MdlChain,
1998 /*OUT*/ PIO_STATUS_BLOCK IoStatus
2001 NTKERNELAPI
2002 BOOLEAN
2003 NTAPI
2004 CcPreparePinWrite (
2005 /*IN*/ PFILE_OBJECT FileObject,
2006 /*IN*/ PLARGE_INTEGER FileOffset,
2007 /*IN*/ ULONG Length,
2008 /*IN*/ BOOLEAN Zero,
2009 #if (VER_PRODUCTBUILD >= 2195)
2010 /*IN*/ ULONG Flags,
2011 #else
2012 /*IN*/ BOOLEAN Wait,
2013 #endif
2014 /*OUT*/ PVOID *Bcb,
2015 /*OUT*/ PVOID *Buffer
2018 NTKERNELAPI
2019 BOOLEAN
2020 NTAPI
2021 CcPurgeCacheSection (
2022 /*IN*/ PSECTION_OBJECT_POINTERS SectionObjectPointer,
2023 /*IN*/ PLARGE_INTEGER FileOffset /*OPTIONAL*/,
2024 /*IN*/ ULONG Length,
2025 /*IN*/ BOOLEAN UninitializeCacheMaps
2028 #define CcReadAhead(FO, FOFF, LEN) ( \
2029 if ((LEN) >= 256) { \
2030 CcScheduleReadAhead((FO), (FOFF), (LEN)); \
2034 #if (VER_PRODUCTBUILD >= 2195)
2036 NTKERNELAPI
2037 PVOID
2038 NTAPI
2039 CcRemapBcb (
2040 /*IN*/ PVOID Bcb
2043 #endif /* (VER_PRODUCTBUILD >= 2195) */
2045 NTKERNELAPI
2046 VOID
2047 NTAPI
2048 CcRepinBcb (
2049 /*IN*/ PVOID Bcb
2052 NTKERNELAPI
2053 VOID
2054 NTAPI
2055 CcScheduleReadAhead (
2056 /*IN*/ PFILE_OBJECT FileObject,
2057 /*IN*/ PLARGE_INTEGER FileOffset,
2058 /*IN*/ ULONG Length
2061 NTKERNELAPI
2062 VOID
2063 NTAPI
2064 CcSetAdditionalCacheAttributes (
2065 /*IN*/ PFILE_OBJECT FileObject,
2066 /*IN*/ BOOLEAN DisableReadAhead,
2067 /*IN*/ BOOLEAN DisableWriteBehind
2070 NTKERNELAPI
2071 VOID
2072 NTAPI
2073 CcSetBcbOwnerPointer (
2074 /*IN*/ PVOID Bcb,
2075 /*IN*/ PVOID OwnerPointer
2078 NTKERNELAPI
2079 VOID
2080 NTAPI
2081 CcSetDirtyPageThreshold (
2082 /*IN*/ PFILE_OBJECT FileObject,
2083 /*IN*/ ULONG DirtyPageThreshold
2086 NTKERNELAPI
2087 VOID
2088 NTAPI
2089 CcSetDirtyPinnedData (
2090 /*IN*/ PVOID BcbVoid,
2091 /*IN*/ PLARGE_INTEGER Lsn /*OPTIONAL*/
2094 NTKERNELAPI
2095 VOID
2096 NTAPI
2097 CcSetFileSizes (
2098 /*IN*/ PFILE_OBJECT FileObject,
2099 /*IN*/ PCC_FILE_SIZES FileSizes
2102 typedef VOID (NTAPI *PFLUSH_TO_LSN) (
2103 /*IN*/ PVOID LogHandle,
2104 /*IN*/ PLARGE_INTEGER Lsn
2107 NTKERNELAPI
2108 VOID
2109 NTAPI
2110 CcSetLogHandleForFile (
2111 /*IN*/ PFILE_OBJECT FileObject,
2112 /*IN*/ PVOID LogHandle,
2113 /*IN*/ PFLUSH_TO_LSN FlushToLsnRoutine
2116 NTKERNELAPI
2117 VOID
2118 NTAPI
2119 CcSetReadAheadGranularity (
2120 /*IN*/ PFILE_OBJECT FileObject,
2121 /*IN*/ ULONG Granularity /* default: PAGE_SIZE */
2122 /* allowed: 2^n * PAGE_SIZE */
2125 NTKERNELAPI
2126 BOOLEAN
2127 NTAPI
2128 CcUninitializeCacheMap (
2129 /*IN*/ PFILE_OBJECT FileObject,
2130 /*IN*/ PLARGE_INTEGER TruncateSize /*OPTIONAL*/,
2131 /*IN*/ PCACHE_UNINITIALIZE_EVENT UninitializeCompleteEvent /*OPTIONAL*/
2134 NTKERNELAPI
2135 VOID
2136 NTAPI
2137 CcUnpinData (
2138 /*IN*/ PVOID Bcb
2141 NTKERNELAPI
2142 VOID
2143 NTAPI
2144 CcUnpinDataForThread (
2145 /*IN*/ PVOID Bcb,
2146 /*IN*/ ERESOURCE_THREAD ResourceThreadId
2149 NTKERNELAPI
2150 VOID
2151 NTAPI
2152 CcUnpinRepinnedBcb (
2153 /*IN*/ PVOID Bcb,
2154 /*IN*/ BOOLEAN WriteThrough,
2155 /*OUT*/ PIO_STATUS_BLOCK IoStatus
2158 #if (VER_PRODUCTBUILD >= 2195)
2160 NTKERNELAPI
2161 NTSTATUS
2162 NTAPI
2163 CcWaitForCurrentLazyWriterActivity (
2164 VOID
2167 #endif /* (VER_PRODUCTBUILD >= 2195) */
2169 NTKERNELAPI
2170 BOOLEAN
2171 NTAPI
2172 CcZeroData (
2173 /*IN*/ PFILE_OBJECT FileObject,
2174 /*IN*/ PLARGE_INTEGER StartOffset,
2175 /*IN*/ PLARGE_INTEGER EndOffset,
2176 /*IN*/ BOOLEAN Wait
2179 NTKERNELAPI
2180 VOID
2181 NTAPI
2182 ExDisableResourceBoostLite (
2183 /*IN*/ PERESOURCE Resource
2186 NTKERNELAPI
2187 ULONG
2188 NTAPI
2189 ExQueryPoolBlockSize (
2190 /*IN*/ PVOID PoolBlock,
2191 /*OUT*/ PBOOLEAN QuotaCharged
2194 #define FlagOn(x, f) ((x) & (f))
2196 NTKERNELAPI
2197 VOID
2198 NTAPI
2199 FsRtlAddToTunnelCache (
2200 /*IN*/ PTUNNEL Cache,
2201 /*IN*/ ULONGLONG DirectoryKey,
2202 /*IN*/ PUNICODE_STRING ShortName,
2203 /*IN*/ PUNICODE_STRING LongName,
2204 /*IN*/ BOOLEAN KeyByShortName,
2205 /*IN*/ ULONG DataLength,
2206 /*IN*/ PVOID Data
2209 #if (VER_PRODUCTBUILD >= 2195)
2211 PFILE_LOCK
2212 NTAPI
2213 FsRtlAllocateFileLock (
2214 /*IN*/ PCOMPLETE_LOCK_IRP_ROUTINE CompleteLockIrpRoutine /*OPTIONAL*/,
2215 /*IN*/ PUNLOCK_ROUTINE UnlockRoutine /*OPTIONAL*/
2218 #endif /* (VER_PRODUCTBUILD >= 2195) */
2220 NTKERNELAPI
2221 PVOID
2222 NTAPI
2223 FsRtlAllocatePool (
2224 /*IN*/ POOL_TYPE PoolType,
2225 /*IN*/ ULONG NumberOfBytes
2228 NTKERNELAPI
2229 PVOID
2230 NTAPI
2231 FsRtlAllocatePoolWithQuota (
2232 /*IN*/ POOL_TYPE PoolType,
2233 /*IN*/ ULONG NumberOfBytes
2236 NTKERNELAPI
2237 PVOID
2238 NTAPI
2239 FsRtlAllocatePoolWithQuotaTag (
2240 /*IN*/ POOL_TYPE PoolType,
2241 /*IN*/ ULONG NumberOfBytes,
2242 /*IN*/ ULONG Tag
2245 NTKERNELAPI
2246 PVOID
2247 NTAPI
2248 FsRtlAllocatePoolWithTag (
2249 /*IN*/ POOL_TYPE PoolType,
2250 /*IN*/ ULONG NumberOfBytes,
2251 /*IN*/ ULONG Tag
2254 NTKERNELAPI
2255 BOOLEAN
2256 NTAPI
2257 FsRtlAreNamesEqual (
2258 /*IN*/ PUNICODE_STRING Name1,
2259 /*IN*/ PUNICODE_STRING Name2,
2260 /*IN*/ BOOLEAN IgnoreCase,
2261 /*IN*/ PWCHAR UpcaseTable /*OPTIONAL*/
2264 #define FsRtlAreThereCurrentFileLocks(FL) ( \
2265 ((FL)->FastIoIsQuestionable) \
2269 FsRtlCheckLockForReadAccess:
2271 All this really does is pick out the lock parameters from the irp (io stack
2272 location?), get IoGetRequestorProcess, and pass values on to
2273 FsRtlFastCheckLockForRead.
2275 NTKERNELAPI
2276 BOOLEAN
2277 NTAPI
2278 FsRtlCheckLockForReadAccess (
2279 /*IN*/ PFILE_LOCK FileLock,
2280 /*IN*/ PIRP Irp
2284 FsRtlCheckLockForWriteAccess:
2286 All this really does is pick out the lock parameters from the irp (io stack
2287 location?), get IoGetRequestorProcess, and pass values on to
2288 FsRtlFastCheckLockForWrite.
2290 NTKERNELAPI
2291 BOOLEAN
2292 NTAPI
2293 FsRtlCheckLockForWriteAccess (
2294 /*IN*/ PFILE_LOCK FileLock,
2295 /*IN*/ PIRP Irp
2298 typedef
2299 VOID NTAPI
2300 (*POPLOCK_WAIT_COMPLETE_ROUTINE) (
2301 /*IN*/ PVOID Context,
2302 /*IN*/ PIRP Irp
2305 typedef
2306 VOID NTAPI
2307 (*POPLOCK_FS_PREPOST_IRP) (
2308 /*IN*/ PVOID Context,
2309 /*IN*/ PIRP Irp
2312 NTKERNELAPI
2313 NTSTATUS
2314 NTAPI
2315 FsRtlCheckOplock (
2316 /*IN*/ POPLOCK Oplock,
2317 /*IN*/ PIRP Irp,
2318 /*IN*/ PVOID Context,
2319 /*IN*/ POPLOCK_WAIT_COMPLETE_ROUTINE CompletionRoutine /*OPTIONAL*/,
2320 /*IN*/ POPLOCK_FS_PREPOST_IRP PostIrpRoutine /*OPTIONAL*/
2323 NTKERNELAPI
2324 BOOLEAN
2325 NTAPI
2326 FsRtlCopyRead (
2327 /*IN*/ PFILE_OBJECT FileObject,
2328 /*IN*/ PLARGE_INTEGER FileOffset,
2329 /*IN*/ ULONG Length,
2330 /*IN*/ BOOLEAN Wait,
2331 /*IN*/ ULONG LockKey,
2332 /*OUT*/ PVOID Buffer,
2333 /*OUT*/ PIO_STATUS_BLOCK IoStatus,
2334 /*IN*/ PDEVICE_OBJECT DeviceObject
2337 NTKERNELAPI
2338 BOOLEAN
2339 NTAPI
2340 FsRtlCopyWrite (
2341 /*IN*/ PFILE_OBJECT FileObject,
2342 /*IN*/ PLARGE_INTEGER FileOffset,
2343 /*IN*/ ULONG Length,
2344 /*IN*/ BOOLEAN Wait,
2345 /*IN*/ ULONG LockKey,
2346 /*IN*/ PVOID Buffer,
2347 /*OUT*/ PIO_STATUS_BLOCK IoStatus,
2348 /*IN*/ PDEVICE_OBJECT DeviceObject
2351 NTKERNELAPI
2352 BOOLEAN
2353 NTAPI
2354 FsRtlCurrentBatchOplock (
2355 /*IN*/ POPLOCK Oplock
2358 NTKERNELAPI
2359 VOID
2360 NTAPI
2361 FsRtlDeleteKeyFromTunnelCache (
2362 /*IN*/ PTUNNEL Cache,
2363 /*IN*/ ULONGLONG DirectoryKey
2366 NTKERNELAPI
2367 VOID
2368 NTAPI
2369 FsRtlDeleteTunnelCache (
2370 /*IN*/ PTUNNEL Cache
2373 NTKERNELAPI
2374 VOID
2375 NTAPI
2376 FsRtlDeregisterUncProvider (
2377 /*IN*/ HANDLE Handle
2380 NTKERNELAPI
2381 BOOLEAN
2382 NTAPI
2383 FsRtlDoesNameContainWildCards (
2384 /*IN*/ PUNICODE_STRING Name
2387 #define FsRtlEnterFileSystem KeEnterCriticalRegion
2389 #define FsRtlExitFileSystem KeLeaveCriticalRegion
2391 NTKERNELAPI
2392 BOOLEAN
2393 NTAPI
2394 FsRtlFastCheckLockForRead (
2395 /*IN*/ PFILE_LOCK FileLock,
2396 /*IN*/ PLARGE_INTEGER FileOffset,
2397 /*IN*/ PLARGE_INTEGER Length,
2398 /*IN*/ ULONG Key,
2399 /*IN*/ PFILE_OBJECT FileObject,
2400 /*IN*/ PEPROCESS Process
2403 NTKERNELAPI
2404 BOOLEAN
2405 NTAPI
2406 FsRtlFastCheckLockForWrite (
2407 /*IN*/ PFILE_LOCK FileLock,
2408 /*IN*/ PLARGE_INTEGER FileOffset,
2409 /*IN*/ PLARGE_INTEGER Length,
2410 /*IN*/ ULONG Key,
2411 /*IN*/ PFILE_OBJECT FileObject,
2412 /*IN*/ PEPROCESS Process
2415 #define FsRtlFastLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) ( \
2416 FsRtlPrivateLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, NULL, A10, A11) \
2419 NTKERNELAPI
2420 NTSTATUS
2421 NTAPI
2422 FsRtlFastUnlockAll (
2423 /*IN*/ PFILE_LOCK FileLock,
2424 /*IN*/ PFILE_OBJECT FileObject,
2425 /*IN*/ PEPROCESS Process,
2426 /*IN*/ PVOID Context /*OPTIONAL*/
2428 /* ret: STATUS_RANGE_NOT_LOCKED */
2430 NTKERNELAPI
2431 NTSTATUS
2432 NTAPI
2433 FsRtlFastUnlockAllByKey (
2434 /*IN*/ PFILE_LOCK FileLock,
2435 /*IN*/ PFILE_OBJECT FileObject,
2436 /*IN*/ PEPROCESS Process,
2437 /*IN*/ ULONG Key,
2438 /*IN*/ PVOID Context /*OPTIONAL*/
2440 /* ret: STATUS_RANGE_NOT_LOCKED */
2442 NTKERNELAPI
2443 NTSTATUS
2444 NTAPI
2445 FsRtlFastUnlockSingle (
2446 /*IN*/ PFILE_LOCK FileLock,
2447 /*IN*/ PFILE_OBJECT FileObject,
2448 /*IN*/ PLARGE_INTEGER FileOffset,
2449 /*IN*/ PLARGE_INTEGER Length,
2450 /*IN*/ PEPROCESS Process,
2451 /*IN*/ ULONG Key,
2452 /*IN*/ PVOID Context /*OPTIONAL*/,
2453 /*IN*/ BOOLEAN AlreadySynchronized
2455 /* ret: STATUS_RANGE_NOT_LOCKED */
2457 NTKERNELAPI
2458 BOOLEAN
2459 NTAPI
2460 FsRtlFindInTunnelCache (
2461 /*IN*/ PTUNNEL Cache,
2462 /*IN*/ ULONGLONG DirectoryKey,
2463 /*IN*/ PUNICODE_STRING Name,
2464 /*OUT*/ PUNICODE_STRING ShortName,
2465 /*OUT*/ PUNICODE_STRING LongName,
2466 /*IN OUT*/ PULONG DataLength,
2467 /*OUT*/ PVOID Data
2470 #if (VER_PRODUCTBUILD >= 2195)
2472 NTKERNELAPI
2473 VOID
2474 NTAPI
2475 FsRtlFreeFileLock (
2476 /*IN*/ PFILE_LOCK FileLock
2479 #endif /* (VER_PRODUCTBUILD >= 2195) */
2481 NTKERNELAPI
2482 NTSTATUS
2483 NTAPI
2484 FsRtlGetFileSize (
2485 /*IN*/ PFILE_OBJECT FileObject,
2486 /*IN OUT*/ PLARGE_INTEGER FileSize
2490 FsRtlGetNextFileLock:
2492 ret: NULL if no more locks
2494 Internals:
2495 FsRtlGetNextFileLock uses FileLock->LastReturnedLockInfo and
2496 FileLock->LastReturnedLock as storage.
2497 LastReturnedLock is a pointer to the 'raw' lock inkl. double linked
2498 list, and FsRtlGetNextFileLock needs this to get next lock on subsequent
2499 calls with Restart = FALSE.
2501 NTKERNELAPI
2502 PFILE_LOCK_INFO
2503 NTAPI
2504 FsRtlGetNextFileLock (
2505 /*IN*/ PFILE_LOCK FileLock,
2506 /*IN*/ BOOLEAN Restart
2509 NTKERNELAPI
2510 VOID
2511 NTAPI
2512 FsRtlInitializeFileLock (
2513 /*IN*/ PFILE_LOCK FileLock,
2514 /*IN*/ PCOMPLETE_LOCK_IRP_ROUTINE CompleteLockIrpRoutine /*OPTIONAL*/,
2515 /*IN*/ PUNLOCK_ROUTINE UnlockRoutine /*OPTIONAL*/
2518 NTKERNELAPI
2519 VOID
2520 NTAPI
2521 FsRtlInitializeOplock (
2522 /*IN OUT*/ POPLOCK Oplock
2525 NTKERNELAPI
2526 VOID
2527 NTAPI
2528 FsRtlInitializeTunnelCache (
2529 /*IN*/ PTUNNEL Cache
2532 NTKERNELAPI
2533 BOOLEAN
2534 NTAPI
2535 FsRtlIsNameInExpression (
2536 /*IN*/ PUNICODE_STRING Expression,
2537 /*IN*/ PUNICODE_STRING Name,
2538 /*IN*/ BOOLEAN IgnoreCase,
2539 /*IN*/ PWCHAR UpcaseTable /*OPTIONAL*/
2542 NTKERNELAPI
2543 BOOLEAN
2544 NTAPI
2545 FsRtlIsNtstatusExpected (
2546 /*IN*/ NTSTATUS Ntstatus
2549 #define FsRtlIsUnicodeCharacterWild(C) ( \
2550 (((C) >= 0x40) ? \
2551 FALSE : \
2552 FlagOn((*FsRtlLegalAnsiCharacterArray)[(C)], FSRTL_WILD_CHARACTER )) \
2555 NTKERNELAPI
2556 BOOLEAN
2557 NTAPI
2558 FsRtlMdlReadComplete (
2559 /*IN*/ PFILE_OBJECT FileObject,
2560 /*IN*/ PMDL MdlChain
2563 NTKERNELAPI
2564 BOOLEAN
2565 NTAPI
2566 FsRtlMdlReadCompleteDev (
2567 /*IN*/ PFILE_OBJECT FileObject,
2568 /*IN*/ PMDL MdlChain,
2569 /*IN*/ PDEVICE_OBJECT DeviceObject
2572 NTKERNELAPI
2573 BOOLEAN
2574 NTAPI
2575 FsRtlMdlWriteComplete (
2576 /*IN*/ PFILE_OBJECT FileObject,
2577 /*IN*/ PLARGE_INTEGER FileOffset,
2578 /*IN*/ PMDL MdlChain
2581 NTKERNELAPI
2582 BOOLEAN
2583 NTAPI
2584 FsRtlMdlWriteCompleteDev (
2585 /*IN*/ PFILE_OBJECT FileObject,
2586 /*IN*/ PLARGE_INTEGER FileOffset,
2587 /*IN*/ PMDL MdlChain,
2588 /*IN*/ PDEVICE_OBJECT DeviceObject
2591 NTKERNELAPI
2592 NTSTATUS
2593 NTAPI
2594 FsRtlNormalizeNtstatus (
2595 /*IN*/ NTSTATUS Exception,
2596 /*IN*/ NTSTATUS GenericException
2599 NTKERNELAPI
2600 VOID
2601 NTAPI
2602 FsRtlNotifyChangeDirectory (
2603 /*IN*/ PNOTIFY_SYNC NotifySync,
2604 /*IN*/ PVOID FsContext,
2605 /*IN*/ PSTRING FullDirectoryName,
2606 /*IN*/ PLIST_ENTRY NotifyList,
2607 /*IN*/ BOOLEAN WatchTree,
2608 /*IN*/ ULONG CompletionFilter,
2609 /*IN*/ PIRP NotifyIrp
2612 NTKERNELAPI
2613 VOID
2614 NTAPI
2615 FsRtlNotifyCleanup (
2616 /*IN*/ PNOTIFY_SYNC NotifySync,
2617 /*IN*/ PLIST_ENTRY NotifyList,
2618 /*IN*/ PVOID FsContext
2621 typedef BOOLEAN (*PCHECK_FOR_TRAVERSE_ACCESS) (
2622 /*IN*/ PVOID NotifyContext,
2623 /*IN*/ PVOID TargetContext,
2624 /*IN*/ PSECURITY_SUBJECT_CONTEXT SubjectContext
2627 NTKERNELAPI
2628 VOID
2629 NTAPI
2630 FsRtlNotifyFullChangeDirectory (
2631 /*IN*/ PNOTIFY_SYNC NotifySync,
2632 /*IN*/ PLIST_ENTRY NotifyList,
2633 /*IN*/ PVOID FsContext,
2634 /*IN*/ PSTRING FullDirectoryName,
2635 /*IN*/ BOOLEAN WatchTree,
2636 /*IN*/ BOOLEAN IgnoreBuffer,
2637 /*IN*/ ULONG CompletionFilter,
2638 /*IN*/ PIRP NotifyIrp,
2639 /*IN*/ PCHECK_FOR_TRAVERSE_ACCESS TraverseCallback /*OPTIONAL*/,
2640 /*IN*/ PSECURITY_SUBJECT_CONTEXT SubjectContext /*OPTIONAL*/
2643 NTKERNELAPI
2644 VOID
2645 NTAPI
2646 FsRtlNotifyFullReportChange (
2647 /*IN*/ PNOTIFY_SYNC NotifySync,
2648 /*IN*/ PLIST_ENTRY NotifyList,
2649 /*IN*/ PSTRING FullTargetName,
2650 /*IN*/ USHORT TargetNameOffset,
2651 /*IN*/ PSTRING StreamName /*OPTIONAL*/,
2652 /*IN*/ PSTRING NormalizedParentName /*OPTIONAL*/,
2653 /*IN*/ ULONG FilterMatch,
2654 /*IN*/ ULONG Action,
2655 /*IN*/ PVOID TargetContext
2658 NTKERNELAPI
2659 VOID
2660 NTAPI
2661 FsRtlNotifyInitializeSync (
2662 /*IN*/ PNOTIFY_SYNC NotifySync
2665 NTKERNELAPI
2666 VOID
2667 NTAPI
2668 FsRtlNotifyReportChange (
2669 /*IN*/ PNOTIFY_SYNC NotifySync,
2670 /*IN*/ PLIST_ENTRY NotifyList,
2671 /*IN*/ PSTRING FullTargetName,
2672 /*IN*/ PUSHORT FileNamePartLength,
2673 /*IN*/ ULONG FilterMatch
2676 NTKERNELAPI
2677 VOID
2678 NTAPI
2679 FsRtlNotifyUninitializeSync (
2680 /*IN*/ PNOTIFY_SYNC NotifySync
2683 #if (VER_PRODUCTBUILD >= 2195)
2685 NTKERNELAPI
2686 NTSTATUS
2687 NTAPI
2688 FsRtlNotifyVolumeEvent (
2689 /*IN*/ PFILE_OBJECT FileObject,
2690 /*IN*/ ULONG EventCode
2693 #endif /* (VER_PRODUCTBUILD >= 2195) */
2695 NTKERNELAPI
2696 NTSTATUS
2697 NTAPI
2698 FsRtlOplockFsctrl (
2699 /*IN*/ POPLOCK Oplock,
2700 /*IN*/ PIRP Irp,
2701 /*IN*/ ULONG OpenCount
2704 NTKERNELAPI
2705 BOOLEAN
2706 NTAPI
2707 FsRtlOplockIsFastIoPossible (
2708 /*IN*/ POPLOCK Oplock
2712 FsRtlPrivateLock:
2714 ret: IoStatus->Status: STATUS_PENDING, STATUS_LOCK_NOT_GRANTED
2716 Internals:
2717 -Calls IoCompleteRequest if Irp
2718 -Uses exception handling / ExRaiseStatus with STATUS_INSUFFICIENT_RESOURCES
2720 NTKERNELAPI
2721 BOOLEAN
2722 NTAPI
2723 FsRtlPrivateLock (
2724 /*IN*/ PFILE_LOCK FileLock,
2725 /*IN*/ PFILE_OBJECT FileObject,
2726 /*IN*/ PLARGE_INTEGER FileOffset,
2727 /*IN*/ PLARGE_INTEGER Length,
2728 /*IN*/ PEPROCESS Process,
2729 /*IN*/ ULONG Key,
2730 /*IN*/ BOOLEAN FailImmediately,
2731 /*IN*/ BOOLEAN ExclusiveLock,
2732 /*OUT*/ PIO_STATUS_BLOCK IoStatus,
2733 /*IN*/ PIRP Irp /*OPTIONAL*/,
2734 /*IN*/ PVOID Context,
2735 /*IN*/ BOOLEAN AlreadySynchronized
2739 FsRtlProcessFileLock:
2741 ret:
2742 -STATUS_INVALID_DEVICE_REQUEST
2743 -STATUS_RANGE_NOT_LOCKED from unlock routines.
2744 -STATUS_PENDING, STATUS_LOCK_NOT_GRANTED from FsRtlPrivateLock
2745 (redirected IoStatus->Status).
2747 Internals:
2748 -switch ( Irp->CurrentStackLocation->MinorFunction )
2749 lock: return FsRtlPrivateLock;
2750 unlocksingle: return FsRtlFastUnlockSingle;
2751 unlockall: return FsRtlFastUnlockAll;
2752 unlockallbykey: return FsRtlFastUnlockAllByKey;
2753 default: IofCompleteRequest with STATUS_INVALID_DEVICE_REQUEST;
2754 return STATUS_INVALID_DEVICE_REQUEST;
2756 -'AllwaysZero' is passed thru as 'AllwaysZero' to lock / unlock routines.
2757 -'Irp' is passet thru as 'Irp' to FsRtlPrivateLock.
2759 NTKERNELAPI
2760 NTSTATUS
2761 NTAPI
2762 FsRtlProcessFileLock (
2763 /*IN*/ PFILE_LOCK FileLock,
2764 /*IN*/ PIRP Irp,
2765 /*IN*/ PVOID Context /*OPTIONAL*/
2768 NTKERNELAPI
2769 NTSTATUS
2770 NTAPI
2771 FsRtlRegisterUncProvider (
2772 /*IN OUT*/ PHANDLE MupHandle,
2773 /*IN*/ PUNICODE_STRING RedirectorDeviceName,
2774 /*IN*/ BOOLEAN MailslotsSupported
2777 NTKERNELAPI
2778 VOID
2779 NTAPI
2780 FsRtlUninitializeFileLock (
2781 /*IN*/ PFILE_LOCK FileLock
2784 NTKERNELAPI
2785 VOID
2786 NTAPI
2787 FsRtlUninitializeOplock (
2788 /*IN OUT*/ POPLOCK Oplock
2791 NTSYSAPI
2792 VOID
2793 NTAPI
2794 HalDisplayString (
2795 /*IN*/ PCHAR String
2798 NTSYSAPI
2799 VOID
2800 NTAPI
2801 HalQueryRealTimeClock (
2802 /*IN OUT*/ PTIME_FIELDS TimeFields
2805 NTSYSAPI
2806 VOID
2807 NTAPI
2808 HalSetRealTimeClock (
2809 /*IN*/ PTIME_FIELDS TimeFields
2812 #define InitializeMessageHeader(m, l, t) { \
2813 (m)->Length = (USHORT)(l); \
2814 (m)->DataLength = (USHORT)(l - sizeof( LPC_MESSAGE )); \
2815 (m)->MessageType = (USHORT)(t); \
2816 (m)->DataInfoOffset = 0; \
2819 NTKERNELAPI
2820 VOID
2821 NTAPI
2822 IoAcquireVpbSpinLock (
2823 /*OUT*/ PKIRQL Irql
2826 NTKERNELAPI
2827 NTSTATUS
2828 NTAPI
2829 IoCheckDesiredAccess (
2830 /*IN OUT*/ PACCESS_MASK DesiredAccess,
2831 /*IN*/ ACCESS_MASK GrantedAccess
2834 NTKERNELAPI
2835 NTSTATUS
2836 NTAPI
2837 IoCheckEaBufferValidity (
2838 /*IN*/ PFILE_FULL_EA_INFORMATION EaBuffer,
2839 /*IN*/ ULONG EaLength,
2840 /*OUT*/ PULONG ErrorOffset
2843 NTKERNELAPI
2844 NTSTATUS
2845 NTAPI
2846 IoCheckFunctionAccess (
2847 /*IN*/ ACCESS_MASK GrantedAccess,
2848 /*IN*/ UCHAR MajorFunction,
2849 /*IN*/ UCHAR MinorFunction,
2850 /*IN*/ ULONG IoControlCode,
2851 /*IN*/ PFILE_INFORMATION_CLASS FileInformationClass /*OPTIONAL*/,
2852 /*IN*/ PFS_INFORMATION_CLASS FsInformationClass /*OPTIONAL*/
2855 #if (VER_PRODUCTBUILD >= 2195)
2857 NTKERNELAPI
2858 NTSTATUS
2859 NTAPI
2860 IoCheckQuotaBufferValidity (
2861 /*IN*/ PFILE_QUOTA_INFORMATION QuotaBuffer,
2862 /*IN*/ ULONG QuotaLength,
2863 /*OUT*/ PULONG ErrorOffset
2866 #endif /* (VER_PRODUCTBUILD >= 2195) */
2868 NTKERNELAPI
2869 PFILE_OBJECT
2870 NTAPI
2871 IoCreateStreamFileObject (
2872 /*IN*/ PFILE_OBJECT FileObject /*OPTIONAL*/,
2873 /*IN*/ PDEVICE_OBJECT DeviceObject /*OPTIONAL*/
2876 #if (VER_PRODUCTBUILD >= 2195)
2878 NTKERNELAPI
2879 PFILE_OBJECT
2880 NTAPI
2881 IoCreateStreamFileObjectLite (
2882 /*IN*/ PFILE_OBJECT FileObject /*OPTIONAL*/,
2883 /*IN*/ PDEVICE_OBJECT DeviceObject /*OPTIONAL*/
2886 #endif /* (VER_PRODUCTBUILD >= 2195) */
2888 NTKERNELAPI
2889 BOOLEAN
2890 NTAPI
2891 IoFastQueryNetworkAttributes (
2892 /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
2893 /*IN*/ ACCESS_MASK DesiredAccess,
2894 /*IN*/ ULONG OpenOptions,
2895 /*OUT*/ PIO_STATUS_BLOCK IoStatus,
2896 /*OUT*/ PFILE_NETWORK_OPEN_INFORMATION Buffer
2899 NTKERNELAPI
2900 PDEVICE_OBJECT
2901 NTAPI
2902 IoGetAttachedDevice (
2903 /*IN*/ PDEVICE_OBJECT DeviceObject
2906 NTKERNELAPI
2907 PDEVICE_OBJECT
2908 NTAPI
2909 IoGetBaseFileSystemDeviceObject (
2910 /*IN*/ PFILE_OBJECT FileObject
2913 NTKERNELAPI
2914 PEPROCESS
2915 NTAPI
2916 IoGetRequestorProcess (
2917 /*IN*/ PIRP Irp
2920 #if (VER_PRODUCTBUILD >= 2195)
2922 NTKERNELAPI
2923 ULONG
2924 NTAPI
2925 IoGetRequestorProcessId (
2926 /*IN*/ PIRP Irp
2929 #endif /* (VER_PRODUCTBUILD >= 2195) */
2931 NTKERNELAPI
2932 PIRP
2933 NTAPI
2934 IoGetTopLevelIrp (
2935 VOID
2938 #define IoIsFileOpenedExclusively(FileObject) ( \
2939 (BOOLEAN) !( \
2940 (FileObject)->SharedRead || \
2941 (FileObject)->SharedWrite || \
2942 (FileObject)->SharedDelete \
2946 NTKERNELAPI
2947 BOOLEAN
2948 NTAPI
2949 IoIsOperationSynchronous (
2950 /*IN*/ PIRP Irp
2953 NTKERNELAPI
2954 BOOLEAN
2955 NTAPI
2956 IoIsSystemThread (
2957 /*IN*/ PETHREAD Thread
2960 #if (VER_PRODUCTBUILD >= 2195)
2962 NTKERNELAPI
2963 BOOLEAN
2964 NTAPI
2965 IoIsValidNameGraftingBuffer (
2966 /*IN*/ PIRP Irp,
2967 /*IN*/ PREPARSE_DATA_BUFFER ReparseBuffer
2970 #endif /* (VER_PRODUCTBUILD >= 2195) */
2972 NTKERNELAPI
2973 NTSTATUS
2974 NTAPI
2975 IoPageRead (
2976 /*IN*/ PFILE_OBJECT FileObject,
2977 /*IN*/ PMDL Mdl,
2978 /*IN*/ PLARGE_INTEGER Offset,
2979 /*IN*/ PKEVENT Event,
2980 /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock
2983 NTKERNELAPI
2984 NTSTATUS
2985 NTAPI
2986 IoQueryFileInformation (
2987 /*IN*/ PFILE_OBJECT FileObject,
2988 /*IN*/ FILE_INFORMATION_CLASS FileInformationClass,
2989 /*IN*/ ULONG Length,
2990 /*OUT*/ PVOID FileInformation,
2991 /*OUT*/ PULONG ReturnedLength
2994 NTKERNELAPI
2995 NTSTATUS
2996 NTAPI
2997 IoQueryVolumeInformation (
2998 /*IN*/ PFILE_OBJECT FileObject,
2999 /*IN*/ FS_INFORMATION_CLASS FsInformationClass,
3000 /*IN*/ ULONG Length,
3001 /*OUT*/ PVOID FsInformation,
3002 /*OUT*/ PULONG ReturnedLength
3005 NTKERNELAPI
3006 VOID
3007 NTAPI
3008 IoRegisterFileSystem (
3009 /*IN OUT*/ PDEVICE_OBJECT DeviceObject
3012 #if (VER_PRODUCTBUILD >= 1381)
3014 typedef VOID (NTAPI *PDRIVER_FS_NOTIFICATION) (
3015 /*IN*/ PDEVICE_OBJECT DeviceObject,
3016 /*IN*/ BOOLEAN DriverActive
3019 NTKERNELAPI
3020 NTSTATUS
3021 NTAPI
3022 IoRegisterFsRegistrationChange (
3023 /*IN*/ PDRIVER_OBJECT DriverObject,
3024 /*IN*/ PDRIVER_FS_NOTIFICATION DriverNotificationRoutine
3027 #endif /* (VER_PRODUCTBUILD >= 1381) */
3029 NTKERNELAPI
3030 VOID
3031 NTAPI
3032 IoReleaseVpbSpinLock (
3033 /*IN*/ KIRQL Irql
3036 NTKERNELAPI
3037 VOID
3038 NTAPI
3039 IoSetDeviceToVerify (
3040 /*IN*/ PETHREAD Thread,
3041 /*IN*/ PDEVICE_OBJECT DeviceObject
3044 NTKERNELAPI
3045 NTSTATUS
3046 NTAPI
3047 IoSetInformation (
3048 /*IN*/ PFILE_OBJECT FileObject,
3049 /*IN*/ FILE_INFORMATION_CLASS FileInformationClass,
3050 /*IN*/ ULONG Length,
3051 /*IN*/ PVOID FileInformation
3054 NTKERNELAPI
3055 VOID
3056 NTAPI
3057 IoSetTopLevelIrp (
3058 /*IN*/ PIRP Irp
3061 NTKERNELAPI
3062 NTSTATUS
3063 NTAPI
3064 IoSynchronousPageWrite (
3065 /*IN*/ PFILE_OBJECT FileObject,
3066 /*IN*/ PMDL Mdl,
3067 /*IN*/ PLARGE_INTEGER FileOffset,
3068 /*IN*/ PKEVENT Event,
3069 /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock
3072 NTKERNELAPI
3073 PEPROCESS
3074 NTAPI
3075 IoThreadToProcess (
3076 /*IN*/ PETHREAD Thread
3079 NTKERNELAPI
3080 VOID
3081 NTAPI
3082 IoUnregisterFileSystem (
3083 /*IN OUT*/ PDEVICE_OBJECT DeviceObject
3086 #if (VER_PRODUCTBUILD >= 1381)
3088 NTKERNELAPI
3089 NTSTATUS
3090 NTAPI
3091 IoUnregisterFsRegistrationChange (
3092 /*IN*/ PDRIVER_OBJECT DriverObject,
3093 /*IN*/ PDRIVER_FS_NOTIFICATION DriverNotificationRoutine
3096 #endif /* (VER_PRODUCTBUILD >= 1381) */
3098 NTKERNELAPI
3099 NTSTATUS
3100 NTAPI
3101 IoVerifyVolume (
3102 /*IN*/ PDEVICE_OBJECT DeviceObject,
3103 /*IN*/ BOOLEAN AllowRawMount
3106 NTKERNELAPI
3107 VOID
3108 NTAPI
3109 KeAttachProcess (
3110 /*IN*/ PEPROCESS Process
3113 NTKERNELAPI
3114 VOID
3115 NTAPI
3116 KeDetachProcess (
3117 VOID
3120 NTKERNELAPI
3121 VOID
3122 NTAPI
3123 KeInitializeQueue (
3124 /*IN*/ PRKQUEUE Queue,
3125 /*IN*/ ULONG Count /*OPTIONAL*/
3128 NTKERNELAPI
3129 LONG
3130 NTAPI
3131 KeInsertHeadQueue (
3132 /*IN*/ PRKQUEUE Queue,
3133 /*IN*/ PLIST_ENTRY Entry
3136 NTKERNELAPI
3137 LONG
3138 NTAPI
3139 KeInsertQueue (
3140 /*IN*/ PRKQUEUE Queue,
3141 /*IN*/ PLIST_ENTRY Entry
3144 NTKERNELAPI
3145 BOOLEAN
3146 NTAPI
3147 KeInsertQueueApc (
3148 /*IN*/ PKAPC Apc,
3149 /*IN*/ PVOID SystemArgument1,
3150 /*IN*/ PVOID SystemArgument2,
3151 /*IN*/ KPRIORITY PriorityBoost
3154 NTKERNELAPI
3155 LONG
3156 NTAPI
3157 KeReadStateQueue (
3158 /*IN*/ PRKQUEUE Queue
3161 NTKERNELAPI
3162 PLIST_ENTRY
3163 NTAPI
3164 KeRemoveQueue (
3165 /*IN*/ PRKQUEUE Queue,
3166 /*IN*/ KPROCESSOR_MODE WaitMode,
3167 /*IN*/ PLARGE_INTEGER Timeout /*OPTIONAL*/
3170 NTKERNELAPI
3171 PLIST_ENTRY
3172 NTAPI
3173 KeRundownQueue (
3174 /*IN*/ PRKQUEUE Queue
3177 #if (VER_PRODUCTBUILD >= 2195)
3179 NTKERNELAPI
3180 VOID
3181 NTAPI
3182 KeStackAttachProcess (
3183 /*IN*/ PKPROCESS Process,
3184 /*OUT*/ PKAPC_STATE ApcState
3187 NTKERNELAPI
3188 VOID
3189 NTAPI
3190 KeUnstackDetachProcess (
3191 /*IN*/ PKAPC_STATE ApcState
3194 #endif /* (VER_PRODUCTBUILD >= 2195) */
3196 NTKERNELAPI
3197 BOOLEAN
3198 NTAPI
3199 MmCanFileBeTruncated (
3200 /*IN*/ PSECTION_OBJECT_POINTERS SectionObjectPointer,
3201 /*IN*/ PLARGE_INTEGER NewFileSize
3204 NTKERNELAPI
3205 BOOLEAN
3206 NTAPI
3207 MmFlushImageSection (
3208 /*IN*/ PSECTION_OBJECT_POINTERS SectionObjectPointer,
3209 /*IN*/ MMFLUSH_TYPE FlushType
3212 NTKERNELAPI
3213 BOOLEAN
3214 NTAPI
3215 MmForceSectionClosed (
3216 /*IN*/ PSECTION_OBJECT_POINTERS SectionObjectPointer,
3217 /*IN*/ BOOLEAN DelayClose
3220 #if (VER_PRODUCTBUILD >= 1381)
3222 NTKERNELAPI
3223 BOOLEAN
3224 NTAPI
3225 MmIsRecursiveIoFault (
3226 VOID
3229 #else
3231 #define MmIsRecursiveIoFault() ( \
3232 (PsGetCurrentThread()->DisablePageFaultClustering) | \
3233 (PsGetCurrentThread()->ForwardClusterOnly) \
3236 #endif
3238 NTKERNELAPI
3239 NTSTATUS
3240 NTAPI
3241 MmMapViewOfSection (
3242 /*IN*/ PVOID SectionObject,
3243 /*IN*/ PEPROCESS Process,
3244 /*IN OUT*/ PVOID *BaseAddress,
3245 /*IN*/ ULONG ZeroBits,
3246 /*IN*/ ULONG CommitSize,
3247 /*IN OUT*/ PLARGE_INTEGER SectionOffset /*OPTIONAL*/,
3248 /*IN OUT*/ PULONG ViewSize,
3249 /*IN*/ SECTION_INHERIT InheritDisposition,
3250 /*IN*/ ULONG AllocationType,
3251 /*IN*/ ULONG Protect
3254 NTKERNELAPI
3255 BOOLEAN
3256 NTAPI
3257 MmSetAddressRangeModified (
3258 /*IN*/ PVOID Address,
3259 /*IN*/ ULONG Length
3262 NTKERNELAPI
3263 NTSTATUS
3264 NTAPI
3265 ObCreateObject (
3266 /*IN*/ KPROCESSOR_MODE ObjectAttributesAccessMode /*OPTIONAL*/,
3267 /*IN*/ POBJECT_TYPE ObjectType,
3268 /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes /*OPTIONAL*/,
3269 /*IN*/ KPROCESSOR_MODE AccessMode,
3270 /*IN OUT*/ PVOID ParseContext /*OPTIONAL*/,
3271 /*IN*/ ULONG ObjectSize,
3272 /*IN*/ ULONG PagedPoolCharge /*OPTIONAL*/,
3273 /*IN*/ ULONG NonPagedPoolCharge /*OPTIONAL*/,
3274 /*OUT*/ PVOID *Object
3277 NTKERNELAPI
3278 ULONG
3279 NTAPI
3280 ObGetObjectPointerCount (
3281 /*IN*/ PVOID Object
3284 NTKERNELAPI
3285 NTSTATUS
3286 NTAPI
3287 ObInsertObject (
3288 /*IN*/ PVOID Object,
3289 /*IN*/ PACCESS_STATE PassedAccessState /*OPTIONAL*/,
3290 /*IN*/ ACCESS_MASK DesiredAccess,
3291 /*IN*/ ULONG AdditionalReferences,
3292 /*OUT*/ PVOID *ReferencedObject /*OPTIONAL*/,
3293 /*OUT*/ PHANDLE Handle
3296 NTKERNELAPI
3297 VOID
3298 NTAPI
3299 ObMakeTemporaryObject (
3300 /*IN*/ PVOID Object
3303 NTKERNELAPI
3304 NTSTATUS
3305 NTAPI
3306 ObOpenObjectByPointer (
3307 /*IN*/ PVOID Object,
3308 /*IN*/ ULONG HandleAttributes,
3309 /*IN*/ PACCESS_STATE PassedAccessState /*OPTIONAL*/,
3310 /*IN*/ ACCESS_MASK DesiredAccess /*OPTIONAL*/,
3311 /*IN*/ POBJECT_TYPE ObjectType /*OPTIONAL*/,
3312 /*IN*/ KPROCESSOR_MODE AccessMode,
3313 /*OUT*/ PHANDLE Handle
3316 NTKERNELAPI
3317 NTSTATUS
3318 NTAPI
3319 ObQueryNameString (
3320 /*IN*/ PVOID Object,
3321 /*OUT*/ POBJECT_NAME_INFORMATION ObjectNameInfo,
3322 /*IN*/ ULONG Length,
3323 /*OUT*/ PULONG ReturnLength
3326 NTKERNELAPI
3327 NTSTATUS
3328 NTAPI
3329 ObQueryObjectAuditingByHandle (
3330 /*IN*/ HANDLE Handle,
3331 /*OUT*/ PBOOLEAN GenerateOnClose
3334 NTKERNELAPI
3335 NTSTATUS
3336 NTAPI
3337 ObReferenceObjectByName (
3338 /*IN*/ PUNICODE_STRING ObjectName,
3339 /*IN*/ ULONG Attributes,
3340 /*IN*/ PACCESS_STATE PassedAccessState /*OPTIONAL*/,
3341 /*IN*/ ACCESS_MASK DesiredAccess /*OPTIONAL*/,
3342 /*IN*/ POBJECT_TYPE ObjectType,
3343 /*IN*/ KPROCESSOR_MODE AccessMode,
3344 /*IN OUT*/ PVOID ParseContext /*OPTIONAL*/,
3345 /*OUT*/ PVOID *Object
3348 NTKERNELAPI
3349 VOID
3350 NTAPI
3351 PsChargePoolQuota (
3352 /*IN*/ PEPROCESS Process,
3353 /*IN*/ POOL_TYPE PoolType,
3354 /*IN*/ ULONG Amount
3357 #define PsDereferenceImpersonationToken(T) \
3358 {if (ARGUMENT_PRESENT(T)) { \
3359 (ObDereferenceObject((T))); \
3360 } else { \
3365 #define PsDereferencePrimaryToken(T) (ObDereferenceObject((T)))
3367 NTKERNELAPI
3368 ULONGLONG
3369 NTAPI
3370 PsGetProcessExitTime (
3371 VOID
3374 NTKERNELAPI
3375 BOOLEAN
3376 NTAPI
3377 PsIsThreadTerminating (
3378 /*IN*/ PETHREAD Thread
3381 NTKERNELAPI
3382 NTSTATUS
3383 NTAPI
3384 PsLookupProcessByProcessId (
3385 /*IN*/ PVOID ProcessId,
3386 /*OUT*/ PEPROCESS *Process
3389 NTKERNELAPI
3390 NTSTATUS
3391 NTAPI
3392 PsLookupProcessThreadByCid (
3393 /*IN*/ PCLIENT_ID Cid,
3394 /*OUT*/ PEPROCESS *Process /*OPTIONAL*/,
3395 /*OUT*/ PETHREAD *Thread
3398 NTKERNELAPI
3399 NTSTATUS
3400 NTAPI
3401 PsLookupThreadByThreadId (
3402 /*IN*/ PVOID UniqueThreadId,
3403 /*OUT*/ PETHREAD *Thread
3406 NTKERNELAPI
3407 PACCESS_TOKEN
3408 NTAPI
3409 PsReferenceImpersonationToken (
3410 /*IN*/ PETHREAD Thread,
3411 /*OUT*/ PBOOLEAN CopyOnUse,
3412 /*OUT*/ PBOOLEAN EffectiveOnly,
3413 /*OUT*/ PSECURITY_IMPERSONATION_LEVEL Level
3416 NTKERNELAPI
3417 HANDLE
3418 NTAPI
3419 PsReferencePrimaryToken (
3420 /*IN*/ PEPROCESS Process
3423 NTKERNELAPI
3424 VOID
3425 NTAPI
3426 PsReturnPoolQuota (
3427 /*IN*/ PEPROCESS Process,
3428 /*IN*/ POOL_TYPE PoolType,
3429 /*IN*/ ULONG Amount
3432 NTKERNELAPI
3433 VOID
3434 NTAPI
3435 PsRevertToSelf (
3436 VOID
3439 NTSYSAPI
3440 NTSTATUS
3441 NTAPI
3442 RtlAbsoluteToSelfRelativeSD (
3443 /*IN*/ PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor,
3444 /*IN OUT*/ PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor,
3445 /*IN*/ PULONG BufferLength
3448 NTSYSAPI
3449 PVOID
3450 NTAPI
3451 RtlAllocateHeap (
3452 /*IN*/ HANDLE HeapHandle,
3453 /*IN*/ ULONG Flags,
3454 /*IN*/ ULONG Size
3457 NTSYSAPI
3458 NTSTATUS
3459 NTAPI
3460 RtlCompressBuffer (
3461 /*IN*/ USHORT CompressionFormatAndEngine,
3462 /*IN*/ PUCHAR UncompressedBuffer,
3463 /*IN*/ ULONG UncompressedBufferSize,
3464 /*OUT*/ PUCHAR CompressedBuffer,
3465 /*IN*/ ULONG CompressedBufferSize,
3466 /*IN*/ ULONG UncompressedChunkSize,
3467 /*OUT*/ PULONG FinalCompressedSize,
3468 /*IN*/ PVOID WorkSpace
3471 NTSYSAPI
3472 NTSTATUS
3473 NTAPI
3474 RtlCompressChunks (
3475 /*IN*/ PUCHAR UncompressedBuffer,
3476 /*IN*/ ULONG UncompressedBufferSize,
3477 /*OUT*/ PUCHAR CompressedBuffer,
3478 /*IN*/ ULONG CompressedBufferSize,
3479 /*IN OUT*/ PCOMPRESSED_DATA_INFO CompressedDataInfo,
3480 /*IN*/ ULONG CompressedDataInfoLength,
3481 /*IN*/ PVOID WorkSpace
3484 NTSYSAPI
3485 NTSTATUS
3486 NTAPI
3487 RtlConvertSidToUnicodeString (
3488 /*OUT*/ PUNICODE_STRING DestinationString,
3489 /*IN*/ PSID Sid,
3490 /*IN*/ BOOLEAN AllocateDestinationString
3493 NTSYSAPI
3494 NTSTATUS
3495 NTAPI
3496 RtlCopySid (
3497 /*IN*/ ULONG Length,
3498 /*IN*/ PSID Destination,
3499 /*IN*/ PSID Source
3502 NTSYSAPI
3503 NTSTATUS
3504 NTAPI
3505 RtlDecompressBuffer (
3506 /*IN*/ USHORT CompressionFormat,
3507 /*OUT*/ PUCHAR UncompressedBuffer,
3508 /*IN*/ ULONG UncompressedBufferSize,
3509 /*IN*/ PUCHAR CompressedBuffer,
3510 /*IN*/ ULONG CompressedBufferSize,
3511 /*OUT*/ PULONG FinalUncompressedSize
3514 NTSYSAPI
3515 NTSTATUS
3516 NTAPI
3517 RtlDecompressChunks (
3518 /*OUT*/ PUCHAR UncompressedBuffer,
3519 /*IN*/ ULONG UncompressedBufferSize,
3520 /*IN*/ PUCHAR CompressedBuffer,
3521 /*IN*/ ULONG CompressedBufferSize,
3522 /*IN*/ PUCHAR CompressedTail,
3523 /*IN*/ ULONG CompressedTailSize,
3524 /*IN*/ PCOMPRESSED_DATA_INFO CompressedDataInfo
3527 NTSYSAPI
3528 NTSTATUS
3529 NTAPI
3530 RtlDecompressFragment (
3531 /*IN*/ USHORT CompressionFormat,
3532 /*OUT*/ PUCHAR UncompressedFragment,
3533 /*IN*/ ULONG UncompressedFragmentSize,
3534 /*IN*/ PUCHAR CompressedBuffer,
3535 /*IN*/ ULONG CompressedBufferSize,
3536 /*IN*/ ULONG FragmentOffset,
3537 /*OUT*/ PULONG FinalUncompressedSize,
3538 /*IN*/ PVOID WorkSpace
3541 NTSYSAPI
3542 NTSTATUS
3543 NTAPI
3544 RtlDescribeChunk (
3545 /*IN*/ USHORT CompressionFormat,
3546 /*IN OUT*/ PUCHAR *CompressedBuffer,
3547 /*IN*/ PUCHAR EndOfCompressedBufferPlus1,
3548 /*OUT*/ PUCHAR *ChunkBuffer,
3549 /*OUT*/ PULONG ChunkSize
3552 NTSYSAPI
3553 BOOLEAN
3554 NTAPI
3555 RtlEqualSid (
3556 /*IN*/ PSID Sid1,
3557 /*IN*/ PSID Sid2
3560 NTSYSAPI
3561 VOID
3562 NTAPI
3563 RtlFillMemoryUlong (
3564 /*IN*/ PVOID Destination,
3565 /*IN*/ ULONG Length,
3566 /*IN*/ ULONG Fill
3569 NTSYSAPI
3570 BOOLEAN
3571 NTAPI
3572 RtlFreeHeap (
3573 /*IN*/ HANDLE HeapHandle,
3574 /*IN*/ ULONG Flags,
3575 /*IN*/ PVOID P
3578 NTSYSAPI
3579 VOID
3580 NTAPI
3581 RtlGenerate8dot3Name (
3582 /*IN*/ PUNICODE_STRING Name,
3583 /*IN*/ BOOLEAN AllowExtendedCharacters,
3584 /*IN OUT*/ PGENERATE_NAME_CONTEXT Context,
3585 /*OUT*/ PUNICODE_STRING Name8dot3
3588 NTSYSAPI
3589 NTSTATUS
3590 NTAPI
3591 RtlGetCompressionWorkSpaceSize (
3592 /*IN*/ USHORT CompressionFormatAndEngine,
3593 /*OUT*/ PULONG CompressBufferWorkSpaceSize,
3594 /*OUT*/ PULONG CompressFragmentWorkSpaceSize
3597 NTSYSAPI
3598 NTSTATUS
3599 NTAPI
3600 RtlGetDaclSecurityDescriptor (
3601 /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
3602 /*OUT*/ PBOOLEAN DaclPresent,
3603 /*OUT*/ PACL *Dacl,
3604 /*OUT*/ PBOOLEAN DaclDefaulted
3607 NTSYSAPI
3608 NTSTATUS
3609 NTAPI
3610 RtlGetGroupSecurityDescriptor (
3611 /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
3612 /*OUT*/ PSID *Group,
3613 /*OUT*/ PBOOLEAN GroupDefaulted
3616 NTSYSAPI
3617 NTSTATUS
3618 NTAPI
3619 RtlGetOwnerSecurityDescriptor (
3620 /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
3621 /*OUT*/ PSID *Owner,
3622 /*OUT*/ PBOOLEAN OwnerDefaulted
3625 NTSYSAPI
3626 NTSTATUS
3627 NTAPI
3628 RtlInitializeSid (
3629 /*IN OUT*/ PSID Sid,
3630 /*IN*/ PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
3631 /*IN*/ UCHAR SubAuthorityCount
3634 NTSYSAPI
3635 BOOLEAN
3636 NTAPI
3637 RtlIsNameLegalDOS8Dot3 (
3638 /*IN*/ PUNICODE_STRING UnicodeName,
3639 /*IN*/ PANSI_STRING AnsiName,
3640 PBOOLEAN Unknown
3643 NTSYSAPI
3644 ULONG
3645 NTAPI
3646 RtlLengthRequiredSid (
3647 /*IN*/ UCHAR SubAuthorityCount
3650 NTSYSAPI
3651 ULONG
3652 NTAPI
3653 RtlLengthSid (
3654 /*IN*/ PSID Sid
3657 NTSYSAPI
3658 ULONG
3659 NTAPI
3660 RtlNtStatusToDosError (
3661 /*IN*/ NTSTATUS Status
3664 NTSYSAPI
3665 NTSTATUS
3666 NTAPI
3667 RtlReserveChunk (
3668 /*IN*/ USHORT CompressionFormat,
3669 /*IN OUT*/ PUCHAR *CompressedBuffer,
3670 /*IN*/ PUCHAR EndOfCompressedBufferPlus1,
3671 /*OUT*/ PUCHAR *ChunkBuffer,
3672 /*IN*/ ULONG ChunkSize
3675 NTSYSAPI
3676 VOID
3677 NTAPI
3678 RtlSecondsSince1970ToTime (
3679 /*IN*/ ULONG SecondsSince1970,
3680 /*OUT*/ PLARGE_INTEGER Time
3683 #if (VER_PRODUCTBUILD >= 2195)
3685 NTSYSAPI
3686 NTSTATUS
3687 NTAPI
3688 RtlSelfRelativeToAbsoluteSD (
3689 /*IN*/ PSECURITY_DESCRIPTOR SelfRelativeSD,
3690 /*OUT*/ PSECURITY_DESCRIPTOR AbsoluteSD,
3691 /*IN*/ PULONG AbsoluteSDSize,
3692 /*IN*/ PACL Dacl,
3693 /*IN*/ PULONG DaclSize,
3694 /*IN*/ PACL Sacl,
3695 /*IN*/ PULONG SaclSize,
3696 /*IN*/ PSID Owner,
3697 /*IN*/ PULONG OwnerSize,
3698 /*IN*/ PSID PrimaryGroup,
3699 /*IN*/ PULONG PrimaryGroupSize
3702 #endif /* (VER_PRODUCTBUILD >= 2195) */
3704 NTSYSAPI
3705 NTSTATUS
3706 NTAPI
3707 RtlSetGroupSecurityDescriptor (
3708 /*IN OUT*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
3709 /*IN*/ PSID Group,
3710 /*IN*/ BOOLEAN GroupDefaulted
3713 NTSYSAPI
3714 NTSTATUS
3715 NTAPI
3716 RtlSetOwnerSecurityDescriptor (
3717 /*IN OUT*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
3718 /*IN*/ PSID Owner,
3719 /*IN*/ BOOLEAN OwnerDefaulted
3722 NTSYSAPI
3723 NTSTATUS
3724 NTAPI
3725 RtlSetSaclSecurityDescriptor (
3726 /*IN OUT*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
3727 /*IN*/ BOOLEAN SaclPresent,
3728 /*IN*/ PACL Sacl,
3729 /*IN*/ BOOLEAN SaclDefaulted
3732 NTSYSAPI
3733 PUCHAR
3734 NTAPI
3735 RtlSubAuthorityCountSid (
3736 /*IN*/ PSID Sid
3739 NTSYSAPI
3740 PULONG
3741 NTAPI
3742 RtlSubAuthoritySid (
3743 /*IN*/ PSID Sid,
3744 /*IN*/ ULONG SubAuthority
3747 NTSYSAPI
3748 BOOLEAN
3749 NTAPI
3750 RtlValidSid (
3751 /*IN*/ PSID Sid
3754 NTKERNELAPI
3755 NTSTATUS
3756 NTAPI
3757 SeAppendPrivileges (
3758 PACCESS_STATE AccessState,
3759 PPRIVILEGE_SET Privileges
3762 NTKERNELAPI
3763 BOOLEAN
3764 NTAPI
3765 SeAuditingFileEvents (
3766 /*IN*/ BOOLEAN AccessGranted,
3767 /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor
3770 NTKERNELAPI
3771 BOOLEAN
3772 NTAPI
3773 SeAuditingFileOrGlobalEvents (
3774 /*IN*/ BOOLEAN AccessGranted,
3775 /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
3776 /*IN*/ PSECURITY_SUBJECT_CONTEXT SubjectContext
3779 NTKERNELAPI
3780 VOID
3781 NTAPI
3782 SeCaptureSubjectContext (
3783 /*OUT*/ PSECURITY_SUBJECT_CONTEXT SubjectContext
3786 NTKERNELAPI
3787 NTSTATUS
3788 NTAPI
3789 SeCreateAccessState (
3790 /*OUT*/ PACCESS_STATE AccessState,
3791 /*IN*/ PVOID AuxData,
3792 /*IN*/ ACCESS_MASK AccessMask,
3793 /*IN*/ PGENERIC_MAPPING Mapping
3796 NTKERNELAPI
3797 NTSTATUS
3798 NTAPI
3799 SeCreateClientSecurity (
3800 /*IN*/ PETHREAD Thread,
3801 /*IN*/ PSECURITY_QUALITY_OF_SERVICE QualityOfService,
3802 /*IN*/ BOOLEAN RemoteClient,
3803 /*OUT*/ PSECURITY_CLIENT_CONTEXT ClientContext
3806 #if (VER_PRODUCTBUILD >= 2195)
3808 NTKERNELAPI
3809 NTSTATUS
3810 NTAPI
3811 SeCreateClientSecurityFromSubjectContext (
3812 /*IN*/ PSECURITY_SUBJECT_CONTEXT SubjectContext,
3813 /*IN*/ PSECURITY_QUALITY_OF_SERVICE QualityOfService,
3814 /*IN*/ BOOLEAN ServerIsRemote,
3815 /*OUT*/ PSECURITY_CLIENT_CONTEXT ClientContext
3818 #endif /* (VER_PRODUCTBUILD >= 2195) */
3820 #define SeDeleteClientSecurity(C) { \
3821 if (SeTokenType((C)->ClientToken) == TokenPrimary) { \
3822 PsDereferencePrimaryToken( (C)->ClientToken ); \
3823 } else { \
3824 PsDereferenceImpersonationToken( (C)->ClientToken ); \
3828 NTKERNELAPI
3829 VOID
3830 NTAPI
3831 SeDeleteObjectAuditAlarm (
3832 /*IN*/ PVOID Object,
3833 /*IN*/ HANDLE Handle
3836 #define SeEnableAccessToExports() SeExports = *(PSE_EXPORTS *)SeExports;
3838 NTKERNELAPI
3839 VOID
3840 NTAPI
3841 SeFreePrivileges (
3842 /*IN*/ PPRIVILEGE_SET Privileges
3845 NTKERNELAPI
3846 VOID
3847 NTAPI
3848 SeImpersonateClient (
3849 /*IN*/ PSECURITY_CLIENT_CONTEXT ClientContext,
3850 /*IN*/ PETHREAD ServerThread /*OPTIONAL*/
3853 #if (VER_PRODUCTBUILD >= 2195)
3855 NTKERNELAPI
3856 NTSTATUS
3857 NTAPI
3858 SeImpersonateClientEx (
3859 /*IN*/ PSECURITY_CLIENT_CONTEXT ClientContext,
3860 /*IN*/ PETHREAD ServerThread /*OPTIONAL*/
3863 #endif /* (VER_PRODUCTBUILD >= 2195) */
3865 NTKERNELAPI
3866 VOID
3867 NTAPI
3868 SeLockSubjectContext (
3869 /*IN*/ PSECURITY_SUBJECT_CONTEXT SubjectContext
3872 NTKERNELAPI
3873 NTSTATUS
3874 NTAPI
3875 SeMarkLogonSessionForTerminationNotification (
3876 /*IN*/ PLUID LogonId
3879 NTKERNELAPI
3880 VOID
3881 NTAPI
3882 SeOpenObjectAuditAlarm (
3883 /*IN*/ PUNICODE_STRING ObjectTypeName,
3884 /*IN*/ PVOID Object /*OPTIONAL*/,
3885 /*IN*/ PUNICODE_STRING AbsoluteObjectName /*OPTIONAL*/,
3886 /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
3887 /*IN*/ PACCESS_STATE AccessState,
3888 /*IN*/ BOOLEAN ObjectCreated,
3889 /*IN*/ BOOLEAN AccessGranted,
3890 /*IN*/ KPROCESSOR_MODE AccessMode,
3891 /*OUT*/ PBOOLEAN GenerateOnClose
3894 NTKERNELAPI
3895 VOID
3896 NTAPI
3897 SeOpenObjectForDeleteAuditAlarm (
3898 /*IN*/ PUNICODE_STRING ObjectTypeName,
3899 /*IN*/ PVOID Object /*OPTIONAL*/,
3900 /*IN*/ PUNICODE_STRING AbsoluteObjectName /*OPTIONAL*/,
3901 /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
3902 /*IN*/ PACCESS_STATE AccessState,
3903 /*IN*/ BOOLEAN ObjectCreated,
3904 /*IN*/ BOOLEAN AccessGranted,
3905 /*IN*/ KPROCESSOR_MODE AccessMode,
3906 /*OUT*/ PBOOLEAN GenerateOnClose
3909 NTKERNELAPI
3910 BOOLEAN
3911 NTAPI
3912 SePrivilegeCheck (
3913 /*IN OUT*/ PPRIVILEGE_SET RequiredPrivileges,
3914 /*IN*/ PSECURITY_SUBJECT_CONTEXT SubjectContext,
3915 /*IN*/ KPROCESSOR_MODE AccessMode
3918 NTKERNELAPI
3919 NTSTATUS
3920 NTAPI
3921 SeQueryAuthenticationIdToken (
3922 /*IN*/ PACCESS_TOKEN Token,
3923 /*OUT*/ PLUID LogonId
3926 #if (VER_PRODUCTBUILD >= 2195)
3928 NTKERNELAPI
3929 NTSTATUS
3930 NTAPI
3931 SeQueryInformationToken (
3932 /*IN*/ PACCESS_TOKEN Token,
3933 /*IN*/ TOKEN_INFORMATION_CLASS TokenInformationClass,
3934 /*OUT*/ PVOID *TokenInformation
3937 #endif /* (VER_PRODUCTBUILD >= 2195) */
3939 NTKERNELAPI
3940 NTSTATUS
3941 NTAPI
3942 SeQuerySecurityDescriptorInfo (
3943 /*IN*/ PSECURITY_INFORMATION SecurityInformation,
3944 /*OUT*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
3945 /*IN OUT*/ PULONG Length,
3946 /*IN*/ PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor
3949 #if (VER_PRODUCTBUILD >= 2195)
3951 NTKERNELAPI
3952 NTSTATUS
3953 NTAPI
3954 SeQuerySessionIdToken (
3955 /*IN*/ PACCESS_TOKEN Token,
3956 /*IN*/ PULONG SessionId
3959 #endif /* (VER_PRODUCTBUILD >= 2195) */
3961 #define SeQuerySubjectContextToken( SubjectContext ) \
3962 ( ARGUMENT_PRESENT( \
3963 ((PSECURITY_SUBJECT_CONTEXT) SubjectContext)->ClientToken \
3964 ) ? \
3965 ((PSECURITY_SUBJECT_CONTEXT) SubjectContext)->ClientToken : \
3966 ((PSECURITY_SUBJECT_CONTEXT) SubjectContext)->PrimaryToken )
3968 typedef NTSTATUS (*PSE_LOGON_SESSION_TERMINATED_ROUTINE) (
3969 /*IN*/ PLUID LogonId
3972 NTKERNELAPI
3973 NTSTATUS
3974 NTAPI
3975 SeRegisterLogonSessionTerminatedRoutine (
3976 /*IN*/ PSE_LOGON_SESSION_TERMINATED_ROUTINE CallbackRoutine
3979 NTKERNELAPI
3980 VOID
3981 NTAPI
3982 SeReleaseSubjectContext (
3983 /*IN*/ PSECURITY_SUBJECT_CONTEXT SubjectContext
3986 NTKERNELAPI
3987 VOID
3988 NTAPI
3989 SeSetAccessStateGenericMapping (
3990 PACCESS_STATE AccessState,
3991 PGENERIC_MAPPING GenericMapping
3994 NTKERNELAPI
3995 NTSTATUS
3996 NTAPI
3997 SeSetSecurityDescriptorInfo (
3998 /*IN*/ PVOID Object /*OPTIONAL*/,
3999 /*IN*/ PSECURITY_INFORMATION SecurityInformation,
4000 /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
4001 /*IN OUT*/ PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,
4002 /*IN*/ POOL_TYPE PoolType,
4003 /*IN*/ PGENERIC_MAPPING GenericMapping
4006 #if (VER_PRODUCTBUILD >= 2195)
4008 NTKERNELAPI
4009 NTSTATUS
4010 NTAPI
4011 SeSetSecurityDescriptorInfoEx (
4012 /*IN*/ PVOID Object /*OPTIONAL*/,
4013 /*IN*/ PSECURITY_INFORMATION SecurityInformation,
4014 /*IN*/ PSECURITY_DESCRIPTOR ModificationDescriptor,
4015 /*IN OUT*/ PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,
4016 /*IN*/ ULONG AutoInheritFlags,
4017 /*IN*/ POOL_TYPE PoolType,
4018 /*IN*/ PGENERIC_MAPPING GenericMapping
4021 NTKERNELAPI
4022 BOOLEAN
4023 NTAPI
4024 SeTokenIsAdmin (
4025 /*IN*/ PACCESS_TOKEN Token
4028 NTKERNELAPI
4029 BOOLEAN
4030 NTAPI
4031 SeTokenIsRestricted (
4032 /*IN*/ PACCESS_TOKEN Token
4035 #endif /* (VER_PRODUCTBUILD >= 2195) */
4037 NTKERNELAPI
4038 TOKEN_TYPE
4039 NTAPI
4040 SeTokenType (
4041 /*IN*/ PACCESS_TOKEN Token
4044 NTKERNELAPI
4045 VOID
4046 NTAPI
4047 SeUnlockSubjectContext (
4048 /*IN*/ PSECURITY_SUBJECT_CONTEXT SubjectContext
4051 NTKERNELAPI
4052 NTSTATUS
4053 SeUnregisterLogonSessionTerminatedRoutine (
4054 /*IN*/ PSE_LOGON_SESSION_TERMINATED_ROUTINE CallbackRoutine
4057 #if (VER_PRODUCTBUILD >= 2195)
4059 NTSYSAPI
4060 NTSTATUS
4061 NTAPI
4062 ZwAdjustPrivilegesToken (
4063 /*IN*/ HANDLE TokenHandle,
4064 /*IN*/ BOOLEAN DisableAllPrivileges,
4065 /*IN*/ PTOKEN_PRIVILEGES NewState,
4066 /*IN*/ ULONG BufferLength,
4067 /*OUT*/ PTOKEN_PRIVILEGES PreviousState /*OPTIONAL*/,
4068 /*OUT*/ PULONG ReturnLength
4071 #endif /* (VER_PRODUCTBUILD >= 2195) */
4073 NTSYSAPI
4074 NTSTATUS
4075 NTAPI
4076 ZwAlertThread (
4077 /*IN*/ HANDLE ThreadHandle
4080 NTSYSAPI
4081 NTSTATUS
4082 NTAPI
4083 ZwAllocateVirtualMemory (
4084 /*IN*/ HANDLE ProcessHandle,
4085 /*IN OUT*/ PVOID *BaseAddress,
4086 /*IN*/ ULONG ZeroBits,
4087 /*IN OUT*/ PULONG RegionSize,
4088 /*IN*/ ULONG AllocationType,
4089 /*IN*/ ULONG Protect
4092 NTSYSAPI
4093 NTSTATUS
4094 NTAPI
4095 ZwAccessCheckAndAuditAlarm (
4096 /*IN*/ PUNICODE_STRING SubsystemName,
4097 /*IN*/ PVOID HandleId,
4098 /*IN*/ PUNICODE_STRING ObjectTypeName,
4099 /*IN*/ PUNICODE_STRING ObjectName,
4100 /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
4101 /*IN*/ ACCESS_MASK DesiredAccess,
4102 /*IN*/ PGENERIC_MAPPING GenericMapping,
4103 /*IN*/ BOOLEAN ObjectCreation,
4104 /*OUT*/ PACCESS_MASK GrantedAccess,
4105 /*OUT*/ PBOOLEAN AccessStatus,
4106 /*OUT*/ PBOOLEAN GenerateOnClose
4109 #if (VER_PRODUCTBUILD >= 2195)
4111 NTSYSAPI
4112 NTSTATUS
4113 NTAPI
4114 ZwCancelIoFile (
4115 /*IN*/ HANDLE FileHandle,
4116 /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock
4119 #endif /* (VER_PRODUCTBUILD >= 2195) */
4121 NTSYSAPI
4122 NTSTATUS
4123 NTAPI
4124 ZwClearEvent (
4125 /*IN*/ HANDLE EventHandle
4128 NTSYSAPI
4129 NTSTATUS
4130 NTAPI
4131 ZwCloseObjectAuditAlarm (
4132 /*IN*/ PUNICODE_STRING SubsystemName,
4133 /*IN*/ PVOID HandleId,
4134 /*IN*/ BOOLEAN GenerateOnClose
4137 NTSYSAPI
4138 NTSTATUS
4139 NTAPI
4140 ZwCreateSection (
4141 /*OUT*/ PHANDLE SectionHandle,
4142 /*IN*/ ACCESS_MASK DesiredAccess,
4143 /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes /*OPTIONAL*/,
4144 /*IN*/ PLARGE_INTEGER MaximumSize /*OPTIONAL*/,
4145 /*IN*/ ULONG SectionPageProtection,
4146 /*IN*/ ULONG AllocationAttributes,
4147 /*IN*/ HANDLE FileHandle /*OPTIONAL*/
4150 NTSYSAPI
4151 NTSTATUS
4152 NTAPI
4153 ZwCreateSymbolicLinkObject (
4154 /*OUT*/ PHANDLE SymbolicLinkHandle,
4155 /*IN*/ ACCESS_MASK DesiredAccess,
4156 /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
4157 /*IN*/ PUNICODE_STRING TargetName
4160 NTSYSAPI
4161 NTSTATUS
4162 NTAPI
4163 ZwDeleteFile (
4164 /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes
4167 NTSYSAPI
4168 NTSTATUS
4169 NTAPI
4170 ZwDeleteValueKey (
4171 /*IN*/ HANDLE Handle,
4172 /*IN*/ PUNICODE_STRING Name
4175 NTSYSAPI
4176 NTSTATUS
4177 NTAPI
4178 ZwDeviceIoControlFile (
4179 /*IN*/ HANDLE FileHandle,
4180 /*IN*/ HANDLE Event /*OPTIONAL*/,
4181 /*IN*/ PIO_APC_ROUTINE ApcRoutine /*OPTIONAL*/,
4182 /*IN*/ PVOID ApcContext /*OPTIONAL*/,
4183 /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
4184 /*IN*/ ULONG IoControlCode,
4185 /*IN*/ PVOID InputBuffer /*OPTIONAL*/,
4186 /*IN*/ ULONG InputBufferLength,
4187 /*OUT*/ PVOID OutputBuffer /*OPTIONAL*/,
4188 /*IN*/ ULONG OutputBufferLength
4191 NTSYSAPI
4192 NTSTATUS
4193 NTAPI
4194 ZwDisplayString (
4195 /*IN*/ PUNICODE_STRING String
4198 NTSYSAPI
4199 NTSTATUS
4200 NTAPI
4201 ZwDuplicateObject (
4202 /*IN*/ HANDLE SourceProcessHandle,
4203 /*IN*/ HANDLE SourceHandle,
4204 /*IN*/ HANDLE TargetProcessHandle /*OPTIONAL*/,
4205 /*OUT*/ PHANDLE TargetHandle /*OPTIONAL*/,
4206 /*IN*/ ACCESS_MASK DesiredAccess,
4207 /*IN*/ ULONG HandleAttributes,
4208 /*IN*/ ULONG Options
4211 NTSYSAPI
4212 NTSTATUS
4213 NTAPI
4214 ZwDuplicateToken (
4215 /*IN*/ HANDLE ExistingTokenHandle,
4216 /*IN*/ ACCESS_MASK DesiredAccess,
4217 /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
4218 /*IN*/ BOOLEAN EffectiveOnly,
4219 /*IN*/ TOKEN_TYPE TokenType,
4220 /*OUT*/ PHANDLE NewTokenHandle
4223 NTSYSAPI
4224 NTSTATUS
4225 NTAPI
4226 ZwFlushInstructionCache (
4227 /*IN*/ HANDLE ProcessHandle,
4228 /*IN*/ PVOID BaseAddress /*OPTIONAL*/,
4229 /*IN*/ ULONG FlushSize
4232 #if (VER_PRODUCTBUILD >= 2195)
4234 NTSYSAPI
4235 NTSTATUS
4236 NTAPI
4237 ZwFlushVirtualMemory (
4238 /*IN*/ HANDLE ProcessHandle,
4239 /*IN OUT*/ PVOID *BaseAddress,
4240 /*IN OUT*/ PULONG FlushSize,
4241 /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock
4244 #endif /* (VER_PRODUCTBUILD >= 2195) */
4246 NTSYSAPI
4247 NTSTATUS
4248 NTAPI
4249 ZwFreeVirtualMemory (
4250 /*IN*/ HANDLE ProcessHandle,
4251 /*IN OUT*/ PVOID *BaseAddress,
4252 /*IN OUT*/ PULONG RegionSize,
4253 /*IN*/ ULONG FreeType
4256 NTSYSAPI
4257 NTSTATUS
4258 NTAPI
4259 ZwFsControlFile (
4260 /*IN*/ HANDLE FileHandle,
4261 /*IN*/ HANDLE Event /*OPTIONAL*/,
4262 /*IN*/ PIO_APC_ROUTINE ApcRoutine /*OPTIONAL*/,
4263 /*IN*/ PVOID ApcContext /*OPTIONAL*/,
4264 /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
4265 /*IN*/ ULONG FsControlCode,
4266 /*IN*/ PVOID InputBuffer /*OPTIONAL*/,
4267 /*IN*/ ULONG InputBufferLength,
4268 /*OUT*/ PVOID OutputBuffer /*OPTIONAL*/,
4269 /*IN*/ ULONG OutputBufferLength
4272 #if (VER_PRODUCTBUILD >= 2195)
4274 NTSYSAPI
4275 NTSTATUS
4276 NTAPI
4277 ZwInitiatePowerAction (
4278 /*IN*/ POWER_ACTION SystemAction,
4279 /*IN*/ SYSTEM_POWER_STATE MinSystemState,
4280 /*IN*/ ULONG Flags,
4281 /*IN*/ BOOLEAN Asynchronous
4284 #endif /* (VER_PRODUCTBUILD >= 2195) */
4286 NTSYSAPI
4287 NTSTATUS
4288 NTAPI
4289 ZwLoadDriver (
4290 /* "\\Registry\\Machine\\System\\CurrentControlSet\\Services\\<DriverName>" */
4291 /*IN*/ PUNICODE_STRING RegistryPath
4294 NTSYSAPI
4295 NTSTATUS
4296 NTAPI
4297 ZwLoadKey (
4298 /*IN*/ POBJECT_ATTRIBUTES KeyObjectAttributes,
4299 /*IN*/ POBJECT_ATTRIBUTES FileObjectAttributes
4302 NTSYSAPI
4303 NTSTATUS
4304 NTAPI
4305 ZwNotifyChangeKey (
4306 /*IN*/ HANDLE KeyHandle,
4307 /*IN*/ HANDLE EventHandle /*OPTIONAL*/,
4308 /*IN*/ PIO_APC_ROUTINE ApcRoutine /*OPTIONAL*/,
4309 /*IN*/ PVOID ApcContext /*OPTIONAL*/,
4310 /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
4311 /*IN*/ ULONG NotifyFilter,
4312 /*IN*/ BOOLEAN WatchSubtree,
4313 /*IN*/ PVOID Buffer,
4314 /*IN*/ ULONG BufferLength,
4315 /*IN*/ BOOLEAN Asynchronous
4318 NTSYSAPI
4319 NTSTATUS
4320 NTAPI
4321 ZwOpenDirectoryObject (
4322 /*OUT*/ PHANDLE DirectoryHandle,
4323 /*IN*/ ACCESS_MASK DesiredAccess,
4324 /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes
4327 NTSYSAPI
4328 NTSTATUS
4329 NTAPI
4330 ZwOpenEvent (
4331 /*OUT*/ PHANDLE EventHandle,
4332 /*IN*/ ACCESS_MASK DesiredAccess,
4333 /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes
4336 NTSYSAPI
4337 NTSTATUS
4338 NTAPI
4339 ZwOpenProcess (
4340 /*OUT*/ PHANDLE ProcessHandle,
4341 /*IN*/ ACCESS_MASK DesiredAccess,
4342 /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
4343 /*IN*/ PCLIENT_ID ClientId /*OPTIONAL*/
4346 NTSYSAPI
4347 NTSTATUS
4348 NTAPI
4349 ZwOpenProcessToken (
4350 /*IN*/ HANDLE ProcessHandle,
4351 /*IN*/ ACCESS_MASK DesiredAccess,
4352 /*OUT*/ PHANDLE TokenHandle
4355 NTSYSAPI
4356 NTSTATUS
4357 NTAPI
4358 ZwOpenThread (
4359 /*OUT*/ PHANDLE ThreadHandle,
4360 /*IN*/ ACCESS_MASK DesiredAccess,
4361 /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
4362 /*IN*/ PCLIENT_ID ClientId
4365 NTSYSAPI
4366 NTSTATUS
4367 NTAPI
4368 ZwOpenThreadToken (
4369 /*IN*/ HANDLE ThreadHandle,
4370 /*IN*/ ACCESS_MASK DesiredAccess,
4371 /*IN*/ BOOLEAN OpenAsSelf,
4372 /*OUT*/ PHANDLE TokenHandle
4375 #if (VER_PRODUCTBUILD >= 2195)
4377 NTSYSAPI
4378 NTSTATUS
4379 NTAPI
4380 ZwPowerInformation (
4381 /*IN*/ POWER_INFORMATION_LEVEL PowerInformationLevel,
4382 /*IN*/ PVOID InputBuffer /*OPTIONAL*/,
4383 /*IN*/ ULONG InputBufferLength,
4384 /*OUT*/ PVOID OutputBuffer /*OPTIONAL*/,
4385 /*IN*/ ULONG OutputBufferLength
4388 #endif /* (VER_PRODUCTBUILD >= 2195) */
4390 NTSYSAPI
4391 NTSTATUS
4392 NTAPI
4393 ZwPulseEvent (
4394 /*IN*/ HANDLE EventHandle,
4395 /*OUT*/ PULONG PreviousState /*OPTIONAL*/
4398 NTSYSAPI
4399 NTSTATUS
4400 NTAPI
4401 ZwQueryDefaultLocale (
4402 /*IN*/ BOOLEAN ThreadOrSystem,
4403 /*OUT*/ PLCID Locale
4406 NTSYSAPI
4407 NTSTATUS
4408 NTAPI
4409 ZwQueryDirectoryFile (
4410 /*IN*/ HANDLE FileHandle,
4411 /*IN*/ HANDLE Event /*OPTIONAL*/,
4412 /*IN*/ PIO_APC_ROUTINE ApcRoutine /*OPTIONAL*/,
4413 /*IN*/ PVOID ApcContext /*OPTIONAL*/,
4414 /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
4415 /*OUT*/ PVOID FileInformation,
4416 /*IN*/ ULONG Length,
4417 /*IN*/ FILE_INFORMATION_CLASS FileInformationClass,
4418 /*IN*/ BOOLEAN ReturnSingleEntry,
4419 /*IN*/ PUNICODE_STRING FileName /*OPTIONAL*/,
4420 /*IN*/ BOOLEAN RestartScan
4423 #if (VER_PRODUCTBUILD >= 2195)
4425 NTSYSAPI
4426 NTSTATUS
4427 NTAPI
4428 ZwQueryDirectoryObject (
4429 /*IN*/ HANDLE DirectoryHandle,
4430 /*OUT*/ PVOID Buffer,
4431 /*IN*/ ULONG Length,
4432 /*IN*/ BOOLEAN ReturnSingleEntry,
4433 /*IN*/ BOOLEAN RestartScan,
4434 /*IN OUT*/ PULONG Context,
4435 /*OUT*/ PULONG ReturnLength /*OPTIONAL*/
4438 NTSYSAPI
4439 NTSTATUS
4440 NTAPI
4441 ZwQueryEaFile (
4442 /*IN*/ HANDLE FileHandle,
4443 /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
4444 /*OUT*/ PVOID Buffer,
4445 /*IN*/ ULONG Length,
4446 /*IN*/ BOOLEAN ReturnSingleEntry,
4447 /*IN*/ PVOID EaList /*OPTIONAL*/,
4448 /*IN*/ ULONG EaListLength,
4449 /*IN*/ PULONG EaIndex /*OPTIONAL*/,
4450 /*IN*/ BOOLEAN RestartScan
4453 #endif /* (VER_PRODUCTBUILD >= 2195) */
4455 NTSYSAPI
4456 NTSTATUS
4457 NTAPI
4458 ZwQueryInformationProcess (
4459 /*IN*/ HANDLE ProcessHandle,
4460 /*IN*/ PROCESSINFOCLASS ProcessInformationClass,
4461 /*OUT*/ PVOID ProcessInformation,
4462 /*IN*/ ULONG ProcessInformationLength,
4463 /*OUT*/ PULONG ReturnLength /*OPTIONAL*/
4466 NTSYSAPI
4467 NTSTATUS
4468 NTAPI
4469 ZwQueryInformationToken (
4470 /*IN*/ HANDLE TokenHandle,
4471 /*IN*/ TOKEN_INFORMATION_CLASS TokenInformationClass,
4472 /*OUT*/ PVOID TokenInformation,
4473 /*IN*/ ULONG Length,
4474 /*OUT*/ PULONG ResultLength
4477 NTSYSAPI
4478 NTSTATUS
4479 NTAPI
4480 ZwQueryObject (
4481 /*IN*/ HANDLE ObjectHandle,
4482 /*IN*/ OBJECT_INFORMATION_CLASS ObjectInformationClass,
4483 /*OUT*/ PVOID ObjectInformation,
4484 /*IN*/ ULONG Length,
4485 /*OUT*/ PULONG ResultLength
4488 NTSYSAPI
4489 NTSTATUS
4490 NTAPI
4491 ZwQuerySection (
4492 /*IN*/ HANDLE SectionHandle,
4493 /*IN*/ SECTION_INFORMATION_CLASS SectionInformationClass,
4494 /*OUT*/ PVOID SectionInformation,
4495 /*IN*/ ULONG SectionInformationLength,
4496 /*OUT*/ PULONG ResultLength /*OPTIONAL*/
4499 NTSYSAPI
4500 NTSTATUS
4501 NTAPI
4502 ZwQuerySecurityObject (
4503 /*IN*/ HANDLE FileHandle,
4504 /*IN*/ SECURITY_INFORMATION SecurityInformation,
4505 /*OUT*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
4506 /*IN*/ ULONG Length,
4507 /*OUT*/ PULONG ResultLength
4510 NTSYSAPI
4511 NTSTATUS
4512 NTAPI
4513 ZwQuerySystemInformation (
4514 /*IN*/ SYSTEM_INFORMATION_CLASS SystemInformationClass,
4515 /*OUT*/ PVOID SystemInformation,
4516 /*IN*/ ULONG Length,
4517 /*OUT*/ PULONG ReturnLength
4520 NTSYSAPI
4521 NTSTATUS
4522 NTAPI
4523 ZwQueryVolumeInformationFile (
4524 /*IN*/ HANDLE FileHandle,
4525 /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
4526 /*OUT*/ PVOID FsInformation,
4527 /*IN*/ ULONG Length,
4528 /*IN*/ FS_INFORMATION_CLASS FsInformationClass
4531 NTSYSAPI
4532 NTSTATUS
4533 NTAPI
4534 ZwReplaceKey (
4535 /*IN*/ POBJECT_ATTRIBUTES NewFileObjectAttributes,
4536 /*IN*/ HANDLE KeyHandle,
4537 /*IN*/ POBJECT_ATTRIBUTES OldFileObjectAttributes
4540 NTSYSAPI
4541 NTSTATUS
4542 NTAPI
4543 ZwResetEvent (
4544 /*IN*/ HANDLE EventHandle,
4545 /*OUT*/ PULONG PreviousState /*OPTIONAL*/
4548 #if (VER_PRODUCTBUILD >= 2195)
4550 NTSYSAPI
4551 NTSTATUS
4552 NTAPI
4553 ZwRestoreKey (
4554 /*IN*/ HANDLE KeyHandle,
4555 /*IN*/ HANDLE FileHandle,
4556 /*IN*/ ULONG Flags
4559 #endif /* (VER_PRODUCTBUILD >= 2195) */
4561 NTSYSAPI
4562 NTSTATUS
4563 NTAPI
4564 ZwSaveKey (
4565 /*IN*/ HANDLE KeyHandle,
4566 /*IN*/ HANDLE FileHandle
4569 NTSYSAPI
4570 NTSTATUS
4571 NTAPI
4572 ZwSetDefaultLocale (
4573 /*IN*/ BOOLEAN ThreadOrSystem,
4574 /*IN*/ LCID Locale
4577 #if (VER_PRODUCTBUILD >= 2195)
4579 NTSYSAPI
4580 NTSTATUS
4581 NTAPI
4582 ZwSetDefaultUILanguage (
4583 /*IN*/ LANGID LanguageId
4586 NTSYSAPI
4587 NTSTATUS
4588 NTAPI
4589 ZwSetEaFile (
4590 /*IN*/ HANDLE FileHandle,
4591 /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
4592 /*OUT*/ PVOID Buffer,
4593 /*IN*/ ULONG Length
4596 #endif /* (VER_PRODUCTBUILD >= 2195) */
4598 NTSYSAPI
4599 NTSTATUS
4600 NTAPI
4601 ZwSetEvent (
4602 /*IN*/ HANDLE EventHandle,
4603 /*OUT*/ PULONG PreviousState /*OPTIONAL*/
4606 NTSYSAPI
4607 NTSTATUS
4608 NTAPI
4609 ZwSetInformationObject (
4610 /*IN*/ HANDLE ObjectHandle,
4611 /*IN*/ OBJECT_INFORMATION_CLASS ObjectInformationClass,
4612 /*IN*/ PVOID ObjectInformation,
4613 /*IN*/ ULONG ObjectInformationLength
4616 NTSYSAPI
4617 NTSTATUS
4618 NTAPI
4619 ZwSetInformationProcess (
4620 /*IN*/ HANDLE ProcessHandle,
4621 /*IN*/ PROCESSINFOCLASS ProcessInformationClass,
4622 /*IN*/ PVOID ProcessInformation,
4623 /*IN*/ ULONG ProcessInformationLength
4626 #if (VER_PRODUCTBUILD >= 2195)
4628 NTSYSAPI
4629 NTSTATUS
4630 NTAPI
4631 ZwSetSecurityObject (
4632 /*IN*/ HANDLE Handle,
4633 /*IN*/ SECURITY_INFORMATION SecurityInformation,
4634 /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor
4637 #endif /* (VER_PRODUCTBUILD >= 2195) */
4639 NTSYSAPI
4640 NTSTATUS
4641 NTAPI
4642 ZwSetSystemInformation (
4643 /*IN*/ SYSTEM_INFORMATION_CLASS SystemInformationClass,
4644 /*IN*/ PVOID SystemInformation,
4645 /*IN*/ ULONG Length
4648 NTSYSAPI
4649 NTSTATUS
4650 NTAPI
4651 ZwSetSystemTime (
4652 /*IN*/ PLARGE_INTEGER NewTime,
4653 /*OUT*/ PLARGE_INTEGER OldTime /*OPTIONAL*/
4656 #if (VER_PRODUCTBUILD >= 2195)
4658 NTSYSAPI
4659 NTSTATUS
4660 NTAPI
4661 ZwSetVolumeInformationFile (
4662 /*IN*/ HANDLE FileHandle,
4663 /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
4664 /*IN*/ PVOID FsInformation,
4665 /*IN*/ ULONG Length,
4666 /*IN*/ FS_INFORMATION_CLASS FsInformationClass
4669 #endif /* (VER_PRODUCTBUILD >= 2195) */
4671 NTSYSAPI
4672 NTSTATUS
4673 NTAPI
4674 ZwTerminateProcess (
4675 /*IN*/ HANDLE ProcessHandle /*OPTIONAL*/,
4676 /*IN*/ NTSTATUS ExitStatus
4679 NTSYSAPI
4680 NTSTATUS
4681 NTAPI
4682 ZwUnloadDriver (
4683 /* "\\Registry\\Machine\\System\\CurrentControlSet\\Services\\<DriverName>" */
4684 /*IN*/ PUNICODE_STRING RegistryPath
4687 NTSYSAPI
4688 NTSTATUS
4689 NTAPI
4690 ZwUnloadKey (
4691 /*IN*/ POBJECT_ATTRIBUTES KeyObjectAttributes
4694 NTSYSAPI
4695 NTSTATUS
4696 NTAPI
4697 ZwWaitForSingleObject (
4698 /*IN*/ HANDLE Handle,
4699 /*IN*/ BOOLEAN Alertable,
4700 /*IN*/ PLARGE_INTEGER Timeout /*OPTIONAL*/
4703 NTSYSAPI
4704 NTSTATUS
4705 NTAPI
4706 ZwWaitForMultipleObjects (
4707 /*IN*/ ULONG HandleCount,
4708 /*IN*/ PHANDLE Handles,
4709 /*IN*/ WAIT_TYPE WaitType,
4710 /*IN*/ BOOLEAN Alertable,
4711 /*IN*/ PLARGE_INTEGER Timeout /*OPTIONAL*/
4714 NTSYSAPI
4715 NTSTATUS
4716 NTAPI
4717 ZwYieldExecution (
4718 VOID
4721 #ifdef __cplusplus
4723 #endif
4725 #endif /* _NTIFS_ */