ReactOS  0.4.14-dev-77-gd9e7c48
fsrtltypes.h
Go to the documentation of this file.
1 $if (_NTIFS_)
2 /* FSRTL Types */
3 
4 typedef ULONG LBN;
5 typedef LBN *PLBN;
6 
7 typedef ULONG VBN;
8 typedef VBN *PVBN;
9 
10 #define FSRTL_COMMON_FCB_HEADER_LAYOUT \
11  CSHORT NodeTypeCode; \
12  CSHORT NodeByteSize; \
13  UCHAR Flags; \
14  UCHAR IsFastIoPossible; \
15  UCHAR Flags2; \
16  UCHAR Reserved:4; \
17  UCHAR Version:4; \
18  PERESOURCE Resource; \
19  PERESOURCE PagingIoResource; \
20  LARGE_INTEGER AllocationSize; \
21  LARGE_INTEGER FileSize; \
22  LARGE_INTEGER ValidDataLength;
23 
24 typedef struct _FSRTL_COMMON_FCB_HEADER {
27 
28 #ifdef __cplusplus
30 #else /* __cplusplus */
33 #endif /* __cplusplus */
36 #if (NTDDI_VERSION >= NTDDI_VISTA)
39 #endif
41 
42 #define FSRTL_FCB_HEADER_V0 (0x00)
43 #define FSRTL_FCB_HEADER_V1 (0x01)
44 
45 #define FSRTL_FLAG_FILE_MODIFIED (0x01)
46 #define FSRTL_FLAG_FILE_LENGTH_CHANGED (0x02)
47 #define FSRTL_FLAG_LIMIT_MODIFIED_PAGES (0x04)
48 #define FSRTL_FLAG_ACQUIRE_MAIN_RSRC_EX (0x08)
49 #define FSRTL_FLAG_ACQUIRE_MAIN_RSRC_SH (0x10)
50 #define FSRTL_FLAG_USER_MAPPED_FILE (0x20)
51 #define FSRTL_FLAG_ADVANCED_HEADER (0x40)
52 #define FSRTL_FLAG_EOF_ADVANCE_ACTIVE (0x80)
53 
54 #define FSRTL_FLAG2_DO_MODIFIED_WRITE (0x01)
55 #define FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS (0x02)
56 #define FSRTL_FLAG2_PURGE_WHEN_MAPPED (0x04)
57 #define FSRTL_FLAG2_IS_PAGING_FILE (0x08)
58 
59 #define FSRTL_FSP_TOP_LEVEL_IRP (0x01)
60 #define FSRTL_CACHE_TOP_LEVEL_IRP (0x02)
61 #define FSRTL_MOD_WRITE_TOP_LEVEL_IRP (0x03)
62 #define FSRTL_FAST_IO_TOP_LEVEL_IRP (0x04)
63 #define FSRTL_NETWORK1_TOP_LEVEL_IRP ((LONG_PTR)0x05)
64 #define FSRTL_NETWORK2_TOP_LEVEL_IRP ((LONG_PTR)0x06)
65 #define FSRTL_MAX_TOP_LEVEL_IRP_FLAG ((LONG_PTR)0xFFFF)
66 
67 typedef struct _FSRTL_AUXILIARY_BUFFER {
73 
74 #define FSRTL_AUXILIARY_FLAG_DEALLOCATE 0x00000001
75 
77  LessThan = -1,
78  EqualTo = 0,
81 
82 #define FSRTL_FAT_LEGAL 0x01
83 #define FSRTL_HPFS_LEGAL 0x02
84 #define FSRTL_NTFS_LEGAL 0x04
85 #define FSRTL_WILD_CHARACTER 0x08
86 #define FSRTL_OLE_LEGAL 0x10
87 #define FSRTL_NTFS_STREAM_LEGAL (FSRTL_NTFS_LEGAL | FSRTL_OLE_LEGAL)
88 
89 #define FSRTL_VOLUME_DISMOUNT 1
90 #define FSRTL_VOLUME_DISMOUNT_FAILED 2
91 #define FSRTL_VOLUME_LOCK 3
92 #define FSRTL_VOLUME_LOCK_FAILED 4
93 #define FSRTL_VOLUME_UNLOCK 5
94 #define FSRTL_VOLUME_MOUNT 6
95 #define FSRTL_VOLUME_NEEDS_CHKDSK 7
96 #define FSRTL_VOLUME_WORM_NEAR_FULL 8
97 #define FSRTL_VOLUME_WEARING_OUT 9
98 #define FSRTL_VOLUME_FORCED_CLOSED 10
99 #define FSRTL_VOLUME_INFO_MAKE_COMPAT 11
100 #define FSRTL_VOLUME_PREPARING_EJECT 12
101 #define FSRTL_VOLUME_CHANGE_SIZE 13
102 #define FSRTL_VOLUME_BACKGROUND_FORMAT 14
103 
104 typedef VOID
107  _In_ PKEVENT Event);
108 
109 #if (NTDDI_VERSION >= NTDDI_VISTA)
110 
111 #define FSRTL_UNC_PROVIDER_FLAGS_MAILSLOTS_SUPPORTED 0x00000001
112 #define FSRTL_UNC_PROVIDER_FLAGS_CSC_ENABLED 0x00000002
113 #define FSRTL_UNC_PROVIDER_FLAGS_DOMAIN_SVC_AWARE 0x00000004
114 
115 #define FSRTL_ALLOCATE_ECPLIST_FLAG_CHARGE_QUOTA 0x00000001
116 
117 #define FSRTL_ALLOCATE_ECP_FLAG_CHARGE_QUOTA 0x00000001
118 #define FSRTL_ALLOCATE_ECP_FLAG_NONPAGED_POOL 0x00000002
119 
120 #define FSRTL_ECP_LOOKASIDE_FLAG_NONPAGED_POOL 0x00000002
121 
122 #define FSRTL_VIRTDISK_FULLY_ALLOCATED 0x00000001
123 #define FSRTL_VIRTDISK_NO_DRIVE_LETTER 0x00000002
124 
128 
133 
134 typedef VOID
138 
139 typedef struct _ECP_LIST ECP_LIST, *PECP_LIST;
140 
144 
150 
151 #endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
152 
153 typedef struct _FSRTL_PER_FILE_CONTEXT {
157  PFREE_FUNCTION FreeCallback;
159 
164  PFREE_FUNCTION FreeCallback;
166 
167 #if (NTDDI_VERSION >= NTDDI_WIN2K)
168 typedef VOID
170  _In_ PFSRTL_ADVANCED_FCB_HEADER AdvancedHeader);
171 #endif
172 
178 
179 #define FSRTL_CC_FLUSH_ERROR_FLAG_NO_HARD_ERROR 0x1
180 #define FSRTL_CC_FLUSH_ERROR_FLAG_NO_LOG_ENTRY 0x2
181 
182 typedef NTSTATUS
185  _In_ PIRP Irp);
186 
187 typedef struct _FILE_LOCK_INFO {
196 
197 typedef VOID
200  _In_ PFILE_LOCK_INFO FileLockInfo);
201 
202 typedef struct _FILE_LOCK {
206  BOOLEAN SpareC[3];
212 
213 typedef struct _TUNNEL {
218 } TUNNEL, *PTUNNEL;
219 
220 typedef struct _BASE_MCB {
226 } BASE_MCB, *PBASE_MCB;
227 
228 typedef struct _LARGE_MCB {
232 
233 #define MCB_FLAG_RAISE_ON_ALLOCATION_FAILURE 1
234 
235 typedef struct _MCB {
237 } MCB, *PMCB;
238 
239 typedef enum _FAST_IO_POSSIBLE {
244 
245 typedef struct _EOF_WAIT_BLOCK {
249 
250 typedef PVOID OPLOCK, *POPLOCK;
251 
252 typedef VOID
255  _In_ PIRP Irp);
256 
257 typedef VOID
260  _In_ PIRP Irp);
261 
262 #if (NTDDI_VERSION >= NTDDI_VISTASP1)
263 #define OPLOCK_FLAG_COMPLETE_IF_OPLOCKED 0x00000001
264 #endif
265 
266 #if (NTDDI_VERSION >= NTDDI_WIN7)
267 #define OPLOCK_FLAG_OPLOCK_KEY_CHECK_ONLY 0x00000002
268 #define OPLOCK_FLAG_BACK_OUT_ATOMIC_OPLOCK 0x00000004
269 #define OPLOCK_FLAG_IGNORE_OPLOCK_KEYS 0x00000008
270 #define OPLOCK_FSCTRL_FLAG_ALL_KEYS_MATCH 0x00000001
271 #endif
272 
273 #if (NTDDI_VERSION >= NTDDI_WIN7)
274 
275 typedef struct _OPLOCK_KEY_ECP_CONTEXT {
279 
280 DEFINE_GUID(GUID_ECP_OPLOCK_KEY, 0x48850596, 0x3050, 0x4be7, 0x98, 0x63, 0xfe, 0xc3, 0x50, 0xce, 0x8d, 0x7f);
281 
282 #endif
283 
285 
286 #if (NTDDI_VERSION >= NTDDI_WIN7)
288 #endif
289 
290 typedef BOOLEAN
292  _In_ PVOID NotifyContext,
295 
296 typedef BOOLEAN
298  _In_ PVOID NotifyContext,
300 $endif (_NTIFS_)
struct _FILE_LOCK_INFO FILE_LOCK_INFO
LIST_ENTRY EofWaitLinks
Definition: fsrtltypes.h:246
ULONG FSRTL_ALLOCATE_ECPLIST_FLAGS
Definition: fsrtltypes.h:141
_Inout_ PLIST_ENTRY _In_ PVOID _In_ PSTRING _In_ BOOLEAN _In_ BOOLEAN _In_ ULONG _In_ PFLT_CALLBACK_DATA _In_opt_ PCHECK_FOR_TRAVERSE_ACCESS _In_opt_ PSECURITY_SUBJECT_CONTEXT SubjectContext
Definition: fltkernel.h:2239
struct _FSRTL_PER_FILE_CONTEXT FSRTL_PER_FILE_CONTEXT
unsigned int ULONG32
Definition: basetsd.h:125
_In_ PLIST_ENTRY _In_ PSTRING _In_ USHORT _In_opt_ PSTRING _In_opt_ PSTRING _In_ ULONG _In_ ULONG _In_opt_ PVOID _In_opt_ PVOID FilterContext
Definition: fsrtlfuncs.h:738
VOID(* PFN_FSRTLTEARDOWNPERSTREAMCONTEXTS)(_In_ PFSRTL_ADVANCED_FCB_HEADER AdvancedHeader)
Definition: fsrtltypes.h:169
_In_ PIRP Irp
Definition: csq.h:116
enum _FAST_IO_POSSIBLE FAST_IO_POSSIBLE
FILE_LOCK_INFO LastReturnedLockInfo
Definition: fsrtltypes.h:208
VBN * PVBN
Definition: fsrtltypes.h:8
ULONG FSRTL_ECP_LOOKASIDE_FLAGS
Definition: fsrtltypes.h:143
PVOID OPLOCK
Definition: fsrtltypes.h:250
struct _FSRTL_COMMON_FCB_HEADER * PFSRTL_COMMON_FCB_HEADER
#define _NTIFS_
Definition: ifssupp.h:20
PKGUARDED_MUTEX GuardedMutex
Definition: fsrtltypes.h:229
LONG volatile LockRequestsInProgress
Definition: fsrtltypes.h:210
_Must_inspect_result_ _In_ LPCGUID EcpType
Definition: fltkernel.h:2520
USHORT NumEntries
Definition: fsrtltypes.h:217
LIST_ENTRY TimerQueue
Definition: fsrtltypes.h:216
BOOLEAN(NTAPI * PFILTER_REPORT_CHANGE)(_In_ PVOID NotifyContext, _In_ PVOID FilterContext)
Definition: fsrtltypes.h:297
DEFINE_GUID(GUID_ECP_OPLOCK_KEY, 0x48850596, 0x3050, 0x4be7, 0x98, 0x63, 0xfe, 0xc3, 0x50, 0xce, 0x8d, 0x7f)
PCOMPLETE_LOCK_IRP_ROUTINE CompleteLockIrpRoutine
Definition: fsrtltypes.h:203
LBN * PLBN
Definition: fsrtltypes.h:5
#define _In_opt_
Definition: no_sal2.h:213
struct _LARGE_MCB * PLARGE_MCB
LARGE_INTEGER EndingByte
Definition: fsrtltypes.h:194
struct _FILE_LOCK * PFILE_LOCK
struct _FSRTL_PER_FILE_CONTEXT * PFSRTL_PER_FILE_CONTEXT
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
struct _FSRTL_ADVANCED_FCB_HEADER * PFSRTL_ADVANCED_FCB_HEADER
BOOLEAN(NTAPI * PCHECK_FOR_TRAVERSE_ACCESS)(_In_ PVOID NotifyContext, _In_opt_ PVOID TargetContext, _In_ PSECURITY_SUBJECT_CONTEXT SubjectContext)
Definition: fsrtltypes.h:291
long LONG
Definition: pedump.c:60
_Must_inspect_result_ _In_ LPCGUID ULONG _In_ FSRTL_ALLOCATE_ECP_FLAGS _In_opt_ PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK _In_ ULONG _Outptr_ PVOID * EcpContext
Definition: fltkernel.h:2520
FAST_MUTEX Mutex
Definition: fsrtltypes.h:214
PFREE_FUNCTION FreeCallback
Definition: fsrtltypes.h:164
$if(_NTIFS_) typedef ULONG LBN
Definition: cctypes.h:1
_In_ PVOID _In_ ULONG Event
Definition: iotypes.h:435
struct _BASE_MCB * PBASE_MCB
struct _FILE_LOCK FILE_LOCK
struct _FSRTL_MUP_PROVIDER_INFO_LEVEL_2 * PFSRTL_MUP_PROVIDER_INFO_LEVEL_2
VOID(NTAPI * POPLOCK_WAIT_COMPLETE_ROUTINE)(_In_ PVOID Context, _In_ PIRP Irp)
Definition: fsrtltypes.h:253
unsigned char BOOLEAN
PFILE_OBJECT FileObject
Definition: fsrtltypes.h:192
_FSRTL_COMPARISON_RESULT
Definition: fsrtltypes.h:76
LARGE_MCB DummyFieldThatSizesThisStructureCorrectly
Definition: fsrtltypes.h:236
$endif(_WDMDDK_) $if(_NTDDK_) typedef struct _NEON128
Definition: ke.h:202
PFREE_FUNCTION FreeCallback
Definition: fsrtltypes.h:157
struct _FSRTL_PER_FILEOBJECT_CONTEXT FSRTL_PER_FILEOBJECT_CONTEXT
BOOLEAN FastIoIsQuestionable
Definition: fsrtltypes.h:205
FSRTL_COMMON_FCB_HEADER_LAYOUT PFAST_MUTEX FastMutex
Definition: fsrtltypes.h:34
FAST_MUTEX
Definition: extypes.h:17
VOID(NTAPI * PUNLOCK_ROUTINE)(_In_ PVOID Context, _In_ PFILE_LOCK_INFO FileLockInfo)
Definition: fsrtltypes.h:198
enum _FSRTL_CHANGE_BACKING_TYPE * PFSRTL_CHANGE_BACKING_TYPE
struct _FSRTL_COMMON_FCB_HEADER FSRTL_COMMON_FCB_HEADER
PRTL_SPLAY_LINKS Cache
Definition: fsrtltypes.h:215
PVOID PNOTIFY_SYNC
Definition: fsrtltypes.h:284
struct _FSRTL_AUXILIARY_BUFFER FSRTL_AUXILIARY_BUFFER
struct _FSRTL_MUP_PROVIDER_INFO_LEVEL_1 * PFSRTL_MUP_PROVIDER_INFO_LEVEL_1
struct _FSRTL_MUP_PROVIDER_INFO_LEVEL_2 FSRTL_MUP_PROVIDER_INFO_LEVEL_2
PUNLOCK_ROUTINE UnlockRoutine
Definition: fsrtltypes.h:204
#define _Inout_
Definition: no_sal2.h:244
struct _LARGE_MCB LARGE_MCB
#define FSRTL_COMMON_FCB_HEADER_LAYOUT
Definition: fsrtltypes.h:10
* PFILE_OBJECT
Definition: iotypes.h:1955
USHORT Flags
Definition: fsrtltypes.h:224
USHORT PoolType
Definition: fsrtltypes.h:223
LARGE_INTEGER Length
Definition: fsrtltypes.h:189
struct _EOF_WAIT_BLOCK * PEOF_WAIT_BLOCK
struct _MCB MCB
NTSTATUS(NTAPI * PCOMPLETE_LOCK_IRP_ROUTINE)(_In_ PVOID Context, _In_ PIRP Irp)
Definition: fsrtltypes.h:183
#define NTSTATUS
Definition: precomp.h:20
#define VOID
Definition: acefi.h:82
Definition: typedefs.h:117
PVOID * POPLOCK
Definition: fsrtltypes.h:250
struct _FSRTL_PER_FILEOBJECT_CONTEXT * PFSRTL_PER_FILEOBJECT_CONTEXT
struct _MCB * PMCB
ULONG VBN
Definition: fsrtltypes.h:7
struct _FSRTL_MUP_PROVIDER_INFO_LEVEL_1 FSRTL_MUP_PROVIDER_INFO_LEVEL_1
VOID(NTAPI * PFSRTL_STACK_OVERFLOW_ROUTINE)(_In_ PVOID Context, _In_ PKEVENT Event)
Definition: fsrtltypes.h:105
#define _In_
Definition: no_sal2.h:204
struct _ECP_LIST * PECP_LIST
Definition: fsrtltypes.h:139
_In_ PLIST_ENTRY _In_ PSTRING _In_ USHORT _In_opt_ PSTRING _In_opt_ PSTRING _In_ ULONG _In_ ULONG _In_opt_ PVOID TargetContext
Definition: fsrtlfuncs.h:738
BOOLEAN ExclusiveLock
Definition: fsrtltypes.h:190
* PFAST_MUTEX
Definition: extypes.h:17
struct _TUNNEL TUNNEL
ULONG MaximumPairCount
Definition: fsrtltypes.h:221
struct _FSRTL_PER_STREAM_CONTEXT FSRTL_PER_STREAM_CONTEXT
struct _ECP_HEADER * PECP_HEADER
Definition: fsrtltypes.h:287
unsigned short USHORT
Definition: pedump.c:61
struct _FSRTL_PER_STREAM_CONTEXT * PFSRTL_PER_STREAM_CONTEXT
PVOID LockInformation
Definition: fsrtltypes.h:207
struct _OPLOCK_KEY_ECP_CONTEXT OPLOCK_KEY_ECP_CONTEXT
ULONG PairCount
Definition: fsrtltypes.h:222
struct _EOF_WAIT_BLOCK EOF_WAIT_BLOCK
enum _FSRTL_COMPARISON_RESULT FSRTL_COMPARISON_RESULT
#define BOOLEAN
Definition: pedump.c:73
struct tagContext Context
Definition: acpixf.h:1024
PVOID Mapping
Definition: fsrtltypes.h:225
struct _FILE_LOCK_INFO * PFILE_LOCK_INFO
struct _TUNNEL * PTUNNEL
unsigned int ULONG
Definition: retypes.h:1
BASE_MCB BaseMcb
Definition: fsrtltypes.h:230
struct _FSRTL_AUXILIARY_BUFFER * PFSRTL_AUXILIARY_BUFFER
VOID(* PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK)(_Inout_ PVOID EcpContext, _In_ LPCGUID EcpType)
Definition: fsrtltypes.h:135
struct _FSRTL_ADVANCED_FCB_HEADER FSRTL_ADVANCED_FCB_HEADER
struct _BASE_MCB BASE_MCB
PVOID LastReturnedLock
Definition: fsrtltypes.h:209
VOID(NTAPI * POPLOCK_FS_PREPOST_IRP)(_In_ PVOID Context, _In_ PIRP Irp)
Definition: fsrtltypes.h:258
_FAST_IO_POSSIBLE
Definition: fsrtltypes.h:239
_FSRTL_CHANGE_BACKING_TYPE
Definition: fsrtltypes.h:145
LARGE_INTEGER StartingByte
Definition: fsrtltypes.h:188
enum _FSRTL_CHANGE_BACKING_TYPE FSRTL_CHANGE_BACKING_TYPE
struct _OPLOCK_KEY_ECP_CONTEXT * POPLOCK_KEY_ECP_CONTEXT
ULONG FSRTL_ALLOCATE_ECP_FLAGS
Definition: fsrtltypes.h:142