2010-03-27 15:31:25 +00:00
$ if ( _NTIFS_ )
/* FSRTL Functions */
# define FsRtlEnterFileSystem KeEnterCriticalRegion
# define FsRtlExitFileSystem KeLeaveCriticalRegion
# if (NTDDI_VERSION >= NTDDI_WIN2K)
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( PASSIVE_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlCopyRead (
2012-01-22 14:43:53 +00:00
_In_ PFILE_OBJECT FileObject ,
_In_ PLARGE_INTEGER FileOffset ,
_In_ ULONG Length ,
_In_ BOOLEAN Wait ,
_In_ ULONG LockKey ,
_Out_writes_bytes_ ( Length ) PVOID Buffer ,
_Out_ PIO_STATUS_BLOCK IoStatus ,
_In_ PDEVICE_OBJECT DeviceObject ) ;
_Must_inspect_result_
_IRQL_requires_max_ ( PASSIVE_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlCopyWrite (
2012-01-22 14:43:53 +00:00
_In_ PFILE_OBJECT FileObject ,
_In_ PLARGE_INTEGER FileOffset ,
_In_ ULONG Length ,
_In_ BOOLEAN Wait ,
_In_ ULONG LockKey ,
_In_reads_bytes_ ( Length ) PVOID Buffer ,
_Out_ PIO_STATUS_BLOCK IoStatus ,
_In_ PDEVICE_OBJECT DeviceObject ) ;
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlMdlReadDev (
2012-01-22 14:43:53 +00:00
_In_ PFILE_OBJECT FileObject ,
_In_ PLARGE_INTEGER FileOffset ,
_In_ ULONG Length ,
_In_ ULONG LockKey ,
_Outptr_ PMDL * MdlChain ,
_Out_ PIO_STATUS_BLOCK IoStatus ,
_In_opt_ PDEVICE_OBJECT DeviceObject ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( PASSIVE_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlMdlReadCompleteDev (
2012-01-22 14:43:53 +00:00
_In_ PFILE_OBJECT FileObject ,
_In_ PMDL MdlChain ,
_In_opt_ PDEVICE_OBJECT DeviceObject ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlPrepareMdlWriteDev (
2012-01-22 14:43:53 +00:00
_In_ PFILE_OBJECT FileObject ,
_In_ PLARGE_INTEGER FileOffset ,
_In_ ULONG Length ,
_In_ ULONG LockKey ,
_Outptr_ PMDL * MdlChain ,
_Out_ PIO_STATUS_BLOCK IoStatus ,
_In_ PDEVICE_OBJECT DeviceObject ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( PASSIVE_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlMdlWriteCompleteDev (
2012-01-22 14:43:53 +00:00
_In_ PFILE_OBJECT FileObject ,
_In_ PLARGE_INTEGER FileOffset ,
_In_ PMDL MdlChain ,
_In_opt_ PDEVICE_OBJECT DeviceObject ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( PASSIVE_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlAcquireFileExclusive (
2012-01-22 14:43:53 +00:00
_In_ PFILE_OBJECT FileObject ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlReleaseFile (
2012-01-22 14:43:53 +00:00
_In_ PFILE_OBJECT FileObject ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( PASSIVE_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlGetFileSize (
2012-01-22 14:43:53 +00:00
_In_ PFILE_OBJECT FileObject ,
_Out_ PLARGE_INTEGER FileSize ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlIsTotalDeviceFailure (
2012-01-22 14:43:53 +00:00
_In_ NTSTATUS Status ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
PFILE_LOCK
NTAPI
FsRtlAllocateFileLock (
2012-01-22 14:43:53 +00:00
_In_opt_ PCOMPLETE_LOCK_IRP_ROUTINE CompleteLockIrpRoutine ,
_In_opt_ PUNLOCK_ROUTINE UnlockRoutine ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlFreeFileLock (
2012-01-22 14:43:53 +00:00
_In_ PFILE_LOCK FileLock ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlInitializeFileLock (
2012-01-22 14:43:53 +00:00
_Out_ PFILE_LOCK FileLock ,
_In_opt_ PCOMPLETE_LOCK_IRP_ROUTINE CompleteLockIrpRoutine ,
_In_opt_ PUNLOCK_ROUTINE UnlockRoutine ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlUninitializeFileLock (
2012-01-22 14:43:53 +00:00
_Inout_ PFILE_LOCK FileLock ) ;
2010-03-27 15:31:25 +00:00
/*
FsRtlProcessFileLock :
ret :
- STATUS_INVALID_DEVICE_REQUEST
- STATUS_RANGE_NOT_LOCKED from unlock routines .
- STATUS_PENDING , STATUS_LOCK_NOT_GRANTED from FsRtlPrivateLock
( redirected IoStatus - > Status ) .
Internals :
- switch ( Irp - > CurrentStackLocation - > MinorFunction )
lock : return FsRtlPrivateLock ;
unlocksingle : return FsRtlFastUnlockSingle ;
unlockall : return FsRtlFastUnlockAll ;
unlockallbykey : return FsRtlFastUnlockAllByKey ;
default : IofCompleteRequest with STATUS_INVALID_DEVICE_REQUEST ;
return STATUS_INVALID_DEVICE_REQUEST ;
- ' AllwaysZero ' is passed thru as ' AllwaysZero ' to lock / unlock routines .
- ' Irp ' is passet thru as ' Irp ' to FsRtlPrivateLock .
*/
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlProcessFileLock (
2012-01-22 14:43:53 +00:00
_In_ PFILE_LOCK FileLock ,
_In_ PIRP Irp ,
_In_opt_ PVOID Context ) ;
2010-03-27 15:31:25 +00:00
/*
FsRtlCheckLockForReadAccess :
All this really does is pick out the lock parameters from the irp ( io stack
location ? ) , get IoGetRequestorProcess , and pass values on to
FsRtlFastCheckLockForRead .
*/
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlCheckLockForReadAccess (
2012-01-22 14:43:53 +00:00
_In_ PFILE_LOCK FileLock ,
_In_ PIRP Irp ) ;
2010-03-27 15:31:25 +00:00
/*
FsRtlCheckLockForWriteAccess :
All this really does is pick out the lock parameters from the irp ( io stack
location ? ) , get IoGetRequestorProcess , and pass values on to
FsRtlFastCheckLockForWrite .
*/
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlCheckLockForWriteAccess (
2012-01-22 14:43:53 +00:00
_In_ PFILE_LOCK FileLock ,
_In_ PIRP Irp ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlFastCheckLockForRead (
2012-01-22 14:43:53 +00:00
_In_ PFILE_LOCK FileLock ,
_In_ PLARGE_INTEGER FileOffset ,
_In_ PLARGE_INTEGER Length ,
_In_ ULONG Key ,
_In_ PFILE_OBJECT FileObject ,
_In_ PVOID Process ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlFastCheckLockForWrite (
2012-01-22 14:43:53 +00:00
_In_ PFILE_LOCK FileLock ,
_In_ PLARGE_INTEGER FileOffset ,
_In_ PLARGE_INTEGER Length ,
_In_ ULONG Key ,
_In_ PFILE_OBJECT FileObject ,
_In_ PVOID Process ) ;
2010-03-27 15:31:25 +00:00
/*
FsRtlGetNextFileLock :
ret : NULL if no more locks
Internals :
FsRtlGetNextFileLock uses FileLock - > LastReturnedLockInfo and
FileLock - > LastReturnedLock as storage .
LastReturnedLock is a pointer to the ' raw ' lock inkl . double linked
list , and FsRtlGetNextFileLock needs this to get next lock on subsequent
calls with Restart = FALSE .
*/
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
PFILE_LOCK_INFO
NTAPI
FsRtlGetNextFileLock (
2012-01-22 14:43:53 +00:00
_In_ PFILE_LOCK FileLock ,
_In_ BOOLEAN Restart ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlFastUnlockSingle (
2012-01-22 14:43:53 +00:00
_In_ PFILE_LOCK FileLock ,
_In_ PFILE_OBJECT FileObject ,
_In_ PLARGE_INTEGER FileOffset ,
_In_ PLARGE_INTEGER Length ,
_In_ PEPROCESS Process ,
_In_ ULONG Key ,
_In_opt_ PVOID Context ,
_In_ BOOLEAN AlreadySynchronized ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlFastUnlockAll (
2012-01-22 14:43:53 +00:00
_In_ PFILE_LOCK FileLock ,
_In_ PFILE_OBJECT FileObject ,
_In_ PEPROCESS Process ,
_In_opt_ PVOID Context ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlFastUnlockAllByKey (
2012-01-22 14:43:53 +00:00
_In_ PFILE_LOCK FileLock ,
_In_ PFILE_OBJECT FileObject ,
_In_ PEPROCESS Process ,
_In_ ULONG Key ,
_In_opt_ PVOID Context ) ;
2010-03-27 15:31:25 +00:00
/*
FsRtlPrivateLock :
ret : IoStatus - > Status : STATUS_PENDING , STATUS_LOCK_NOT_GRANTED
Internals :
- Calls IoCompleteRequest if Irp
- Uses exception handling / ExRaiseStatus with STATUS_INSUFFICIENT_RESOURCES
*/
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
__drv_preferredFunction ( FsRtlFastLock , " Obsolete " )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlPrivateLock (
2012-01-22 14:43:53 +00:00
_In_ PFILE_LOCK FileLock ,
_In_ PFILE_OBJECT FileObject ,
_In_ PLARGE_INTEGER FileOffset ,
_In_ PLARGE_INTEGER Length ,
_In_ PEPROCESS Process ,
_In_ ULONG Key ,
_In_ BOOLEAN FailImmediately ,
_In_ BOOLEAN ExclusiveLock ,
_Out_ PIO_STATUS_BLOCK IoStatus ,
_In_opt_ PIRP Irp ,
_In_opt_ __drv_aliasesMem PVOID Context ,
_In_ BOOLEAN AlreadySynchronized ) ;
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlInitializeTunnelCache (
2012-01-22 14:43:53 +00:00
_In_ PTUNNEL Cache ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlAddToTunnelCache (
2012-01-22 14:43:53 +00:00
_In_ PTUNNEL Cache ,
_In_ ULONGLONG DirectoryKey ,
_In_ PUNICODE_STRING ShortName ,
_In_ PUNICODE_STRING LongName ,
_In_ BOOLEAN KeyByShortName ,
_In_ ULONG DataLength ,
_In_reads_bytes_ ( DataLength ) PVOID Data ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlFindInTunnelCache (
2012-01-22 14:43:53 +00:00
_In_ PTUNNEL Cache ,
_In_ ULONGLONG DirectoryKey ,
_In_ PUNICODE_STRING Name ,
_Out_ PUNICODE_STRING ShortName ,
_Out_ PUNICODE_STRING LongName ,
_Inout_ PULONG DataLength ,
_Out_writes_bytes_to_ ( * DataLength , * DataLength ) PVOID Data ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlDeleteKeyFromTunnelCache (
2012-01-22 14:43:53 +00:00
_In_ PTUNNEL Cache ,
_In_ ULONGLONG DirectoryKey ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlDeleteTunnelCache (
2012-01-22 14:43:53 +00:00
_In_ PTUNNEL Cache ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlDissectDbcs (
2012-01-22 14:43:53 +00:00
_In_ ANSI_STRING Name ,
_Out_ PANSI_STRING FirstPart ,
_Out_ PANSI_STRING RemainingPart ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlDoesDbcsContainWildCards (
2012-01-22 14:43:53 +00:00
_In_ PANSI_STRING Name ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlIsDbcsInExpression (
2012-01-22 14:43:53 +00:00
_In_ PANSI_STRING Expression ,
_In_ PANSI_STRING Name ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlIsFatDbcsLegal (
2012-01-22 14:43:53 +00:00
_In_ ANSI_STRING DbcsName ,
_In_ BOOLEAN WildCardsPermissible ,
_In_ BOOLEAN PathNamePermissible ,
_In_ BOOLEAN LeadingBackslashPermissible ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlIsHpfsDbcsLegal (
2012-01-22 14:43:53 +00:00
_In_ ANSI_STRING DbcsName ,
_In_ BOOLEAN WildCardsPermissible ,
_In_ BOOLEAN PathNamePermissible ,
_In_ BOOLEAN LeadingBackslashPermissible ) ;
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlNormalizeNtstatus (
2012-01-22 14:43:53 +00:00
_In_ NTSTATUS Exception ,
_In_ NTSTATUS GenericException ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlIsNtstatusExpected (
2012-01-22 14:43:53 +00:00
_In_ NTSTATUS Ntstatus ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
__drv_preferredFunction ( ExAllocateFromNPagedLookasideList , " The FsRtlAllocateResource routine is obsolete, but is exported to support existing driver binaries. Use ExAllocateFromNPagedLookasideList and ExInitializeResourceLite instead. " )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
PERESOURCE
NTAPI
2012-01-22 14:43:53 +00:00
FsRtlAllocateResource ( VOID ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlInitializeLargeMcb (
2012-01-22 14:43:53 +00:00
_Out_ PLARGE_MCB Mcb ,
_In_ POOL_TYPE PoolType ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlUninitializeLargeMcb (
2012-01-22 14:43:53 +00:00
_Inout_ PLARGE_MCB Mcb ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlResetLargeMcb (
2012-01-22 14:43:53 +00:00
_Inout_ PLARGE_MCB Mcb ,
_In_ BOOLEAN SelfSynchronized ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlTruncateLargeMcb (
2012-01-22 14:43:53 +00:00
_Inout_ PLARGE_MCB Mcb ,
_In_ LONGLONG Vbn ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlAddLargeMcbEntry (
2012-01-22 14:43:53 +00:00
_Inout_ PLARGE_MCB Mcb ,
_In_ LONGLONG Vbn ,
_In_ LONGLONG Lbn ,
_In_ LONGLONG SectorCount ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlRemoveLargeMcbEntry (
2012-01-22 14:43:53 +00:00
_Inout_ PLARGE_MCB Mcb ,
_In_ LONGLONG Vbn ,
_In_ LONGLONG SectorCount ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlLookupLargeMcbEntry (
2012-01-22 14:43:53 +00:00
_In_ PLARGE_MCB Mcb ,
_In_ LONGLONG Vbn ,
_Out_opt_ PLONGLONG Lbn ,
_Out_opt_ PLONGLONG SectorCountFromLbn ,
_Out_opt_ PLONGLONG StartingLbn ,
_Out_opt_ PLONGLONG SectorCountFromStartingLbn ,
_Out_opt_ PULONG Index ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlLookupLastLargeMcbEntry (
2012-01-22 14:43:53 +00:00
_In_ PLARGE_MCB Mcb ,
_Out_ PLONGLONG Vbn ,
_Out_ PLONGLONG Lbn ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlLookupLastLargeMcbEntryAndIndex (
2012-01-22 14:43:53 +00:00
_In_ PLARGE_MCB OpaqueMcb ,
_Out_ PLONGLONG LargeVbn ,
_Out_ PLONGLONG LargeLbn ,
_Out_ PULONG Index ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
ULONG
NTAPI
FsRtlNumberOfRunsInLargeMcb (
2012-01-22 14:43:53 +00:00
_In_ PLARGE_MCB Mcb ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlGetNextLargeMcbEntry (
2012-01-22 14:43:53 +00:00
_In_ PLARGE_MCB Mcb ,
_In_ ULONG RunIndex ,
_Out_ PLONGLONG Vbn ,
_Out_ PLONGLONG Lbn ,
_Out_ PLONGLONG SectorCount ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlSplitLargeMcb (
2012-01-22 14:43:53 +00:00
_Inout_ PLARGE_MCB Mcb ,
_In_ LONGLONG Vbn ,
_In_ LONGLONG Amount ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
__drv_preferredFunction ( FsRtlInitializeLargeMcb , " Obsolete " )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlInitializeMcb (
2012-01-22 14:43:53 +00:00
_Out_ PMCB Mcb ,
_In_ POOL_TYPE PoolType ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlUninitializeMcb (
2012-01-22 14:43:53 +00:00
_Inout_ PMCB Mcb ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlTruncateMcb (
2012-01-22 14:43:53 +00:00
_Inout_ PMCB Mcb ,
_In_ VBN Vbn ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlAddMcbEntry (
2012-01-22 14:43:53 +00:00
_Inout_ PMCB Mcb ,
_In_ VBN Vbn ,
_In_ LBN Lbn ,
_In_ ULONG SectorCount ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlRemoveMcbEntry (
2012-01-22 14:43:53 +00:00
_Inout_ PMCB Mcb ,
_In_ VBN Vbn ,
_In_ ULONG SectorCount ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlLookupMcbEntry (
2012-01-22 14:43:53 +00:00
_In_ PMCB Mcb ,
_In_ VBN Vbn ,
_Out_ PLBN Lbn ,
_Out_opt_ PULONG SectorCount ,
_Out_ PULONG Index ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlLookupLastMcbEntry (
2012-01-22 14:43:53 +00:00
_In_ PMCB Mcb ,
_Out_ PVBN Vbn ,
_Out_ PLBN Lbn ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
ULONG
NTAPI
FsRtlNumberOfRunsInMcb (
2012-01-22 14:43:53 +00:00
_In_ PMCB Mcb ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlGetNextMcbEntry (
2012-01-22 14:43:53 +00:00
_In_ PMCB Mcb ,
_In_ ULONG RunIndex ,
_Out_ PVBN Vbn ,
_Out_ PLBN Lbn ,
_Out_ PULONG SectorCount ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( PASSIVE_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlBalanceReads (
2012-01-22 14:43:53 +00:00
_In_ PDEVICE_OBJECT TargetDevice ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlInitializeOplock (
2012-01-22 14:43:53 +00:00
_Inout_ POPLOCK Oplock ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlUninitializeOplock (
2012-01-22 14:43:53 +00:00
_Inout_ POPLOCK Oplock ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlOplockFsctrl (
2012-01-22 14:43:53 +00:00
_In_ POPLOCK Oplock ,
_In_ PIRP Irp ,
_In_ ULONG OpenCount ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_When_ ( CompletionRoutine ! = NULL , _Must_inspect_result_ )
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlCheckOplock (
2012-01-22 14:43:53 +00:00
_In_ POPLOCK Oplock ,
_In_ PIRP Irp ,
_In_opt_ PVOID Context ,
_In_opt_ POPLOCK_WAIT_COMPLETE_ROUTINE CompletionRoutine ,
_In_opt_ POPLOCK_FS_PREPOST_IRP PostIrpRoutine ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlOplockIsFastIoPossible (
2012-01-22 14:43:53 +00:00
_In_ POPLOCK Oplock ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlCurrentBatchOplock (
2012-01-22 14:43:53 +00:00
_In_ POPLOCK Oplock ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlNotifyVolumeEvent (
2012-01-22 14:43:53 +00:00
_In_ PFILE_OBJECT FileObject ,
_In_ ULONG EventCode ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlNotifyInitializeSync (
2012-01-22 14:43:53 +00:00
_In_ PNOTIFY_SYNC * NotifySync ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlNotifyUninitializeSync (
2012-01-22 14:43:53 +00:00
_In_ PNOTIFY_SYNC * NotifySync ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( PASSIVE_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlNotifyFullChangeDirectory (
2012-01-22 14:43:53 +00:00
_In_ PNOTIFY_SYNC NotifySync ,
_In_ PLIST_ENTRY NotifyList ,
_In_ PVOID FsContext ,
_In_ PSTRING FullDirectoryName ,
_In_ BOOLEAN WatchTree ,
_In_ BOOLEAN IgnoreBuffer ,
_In_ ULONG CompletionFilter ,
_In_opt_ PIRP NotifyIrp ,
_In_opt_ PCHECK_FOR_TRAVERSE_ACCESS TraverseCallback ,
_In_opt_ PSECURITY_SUBJECT_CONTEXT SubjectContext ) ;
_IRQL_requires_max_ ( PASSIVE_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlNotifyFilterReportChange (
2012-01-22 14:43:53 +00:00
_In_ PNOTIFY_SYNC NotifySync ,
_In_ PLIST_ENTRY NotifyList ,
_In_ PSTRING FullTargetName ,
_In_ USHORT TargetNameOffset ,
_In_opt_ PSTRING StreamName ,
_In_opt_ PSTRING NormalizedParentName ,
_In_ ULONG FilterMatch ,
_In_ ULONG Action ,
_In_opt_ PVOID TargetContext ,
_In_opt_ PVOID FilterContext ) ;
_IRQL_requires_max_ ( PASSIVE_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlNotifyFullReportChange (
2012-01-22 14:43:53 +00:00
_In_ PNOTIFY_SYNC NotifySync ,
_In_ PLIST_ENTRY NotifyList ,
_In_ PSTRING FullTargetName ,
_In_ USHORT TargetNameOffset ,
_In_opt_ PSTRING StreamName ,
_In_opt_ PSTRING NormalizedParentName ,
_In_ ULONG FilterMatch ,
_In_ ULONG Action ,
_In_opt_ PVOID TargetContext ) ;
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlNotifyCleanup (
2012-01-22 14:43:53 +00:00
_In_ PNOTIFY_SYNC NotifySync ,
_In_ PLIST_ENTRY NotifyList ,
_In_ PVOID FsContext ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( PASSIVE_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlDissectName (
2012-01-22 14:43:53 +00:00
_In_ UNICODE_STRING Name ,
_Out_ PUNICODE_STRING FirstPart ,
_Out_ PUNICODE_STRING RemainingPart ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( PASSIVE_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlDoesNameContainWildCards (
2012-01-22 14:43:53 +00:00
_In_ PUNICODE_STRING Name ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( PASSIVE_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlAreNamesEqual (
2012-01-22 14:43:53 +00:00
_In_ PCUNICODE_STRING Name1 ,
_In_ PCUNICODE_STRING Name2 ,
_In_ BOOLEAN IgnoreCase ,
_In_reads_opt_ ( 0x10000 ) PCWCH UpcaseTable ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( PASSIVE_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlIsNameInExpression (
2012-01-22 14:43:53 +00:00
_In_ PUNICODE_STRING Expression ,
_In_ PUNICODE_STRING Name ,
_In_ BOOLEAN IgnoreCase ,
_In_opt_ PWCHAR UpcaseTable ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( DISPATCH_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlPostPagingFileStackOverflow (
2012-01-22 14:43:53 +00:00
_In_ PVOID Context ,
_In_ PKEVENT Event ,
_In_ PFSRTL_STACK_OVERFLOW_ROUTINE StackOverflowRoutine ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( DISPATCH_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlPostStackOverflow (
2012-01-22 14:43:53 +00:00
_In_ PVOID Context ,
_In_ PKEVENT Event ,
_In_ PFSRTL_STACK_OVERFLOW_ROUTINE StackOverflowRoutine ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( PASSIVE_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlRegisterUncProvider (
2012-01-22 14:43:53 +00:00
_Out_ PHANDLE MupHandle ,
_In_ PUNICODE_STRING RedirectorDeviceName ,
_In_ BOOLEAN MailslotsSupported ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( PASSIVE_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlDeregisterUncProvider (
2012-01-22 14:43:53 +00:00
_In_ HANDLE Handle ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlTeardownPerStreamContexts (
2012-01-22 14:43:53 +00:00
_In_ PFSRTL_ADVANCED_FCB_HEADER AdvancedHeader ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlCreateSectionForDataScan (
2012-01-22 14:43:53 +00:00
_Out_ PHANDLE SectionHandle ,
_Outptr_ PVOID * SectionObject ,
_Out_opt_ PLARGE_INTEGER SectionFileSize ,
_In_ PFILE_OBJECT FileObject ,
_In_ ACCESS_MASK DesiredAccess ,
_In_opt_ POBJECT_ATTRIBUTES ObjectAttributes ,
_In_opt_ PLARGE_INTEGER MaximumSize ,
_In_ ULONG SectionPageProtection ,
_In_ ULONG AllocationAttributes ,
_In_ ULONG Flags ) ;
2010-03-27 15:31:25 +00:00
# endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */
# if (NTDDI_VERSION >= NTDDI_WINXP)
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( PASSIVE_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlNotifyFilterChangeDirectory (
2012-01-22 14:43:53 +00:00
_In_ PNOTIFY_SYNC NotifySync ,
_In_ PLIST_ENTRY NotifyList ,
_In_ PVOID FsContext ,
_In_ PSTRING FullDirectoryName ,
_In_ BOOLEAN WatchTree ,
_In_ BOOLEAN IgnoreBuffer ,
_In_ ULONG CompletionFilter ,
_In_opt_ PIRP NotifyIrp ,
_In_opt_ PCHECK_FOR_TRAVERSE_ACCESS TraverseCallback ,
_In_opt_ PSECURITY_SUBJECT_CONTEXT SubjectContext ,
_In_opt_ PFILTER_REPORT_CHANGE FilterCallback ) ;
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlInsertPerStreamContext (
2012-01-22 14:43:53 +00:00
_In_ PFSRTL_ADVANCED_FCB_HEADER PerStreamContext ,
_In_ PFSRTL_PER_STREAM_CONTEXT Ptr ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
PFSRTL_PER_STREAM_CONTEXT
NTAPI
FsRtlLookupPerStreamContextInternal (
2012-01-22 14:43:53 +00:00
_In_ PFSRTL_ADVANCED_FCB_HEADER StreamContext ,
_In_opt_ PVOID OwnerId ,
_In_opt_ PVOID InstanceId ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
PFSRTL_PER_STREAM_CONTEXT
NTAPI
FsRtlRemovePerStreamContext (
2012-01-22 14:43:53 +00:00
_In_ PFSRTL_ADVANCED_FCB_HEADER StreamContext ,
_In_opt_ PVOID OwnerId ,
_In_opt_ PVOID InstanceId ) ;
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlIncrementCcFastReadNotPossible (
VOID ) ;
NTKERNELAPI
VOID
NTAPI
2012-01-22 14:43:53 +00:00
FsRtlIncrementCcFastReadWait ( VOID ) ;
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
2012-01-22 14:43:53 +00:00
FsRtlIncrementCcFastReadNoWait ( VOID ) ;
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
2012-01-22 14:43:53 +00:00
FsRtlIncrementCcFastReadResourceMiss ( VOID ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
LOGICAL
NTAPI
FsRtlIsPagingFile (
2012-01-22 14:43:53 +00:00
_In_ PFILE_OBJECT FileObject ) ;
2010-03-27 15:31:25 +00:00
# endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
# if (NTDDI_VERSION >= NTDDI_WS03)
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlInitializeBaseMcb (
2012-01-22 14:43:53 +00:00
_Out_ PBASE_MCB Mcb ,
_In_ POOL_TYPE PoolType ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlUninitializeBaseMcb (
2012-01-22 14:43:53 +00:00
_In_ PBASE_MCB Mcb ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlResetBaseMcb (
2012-01-22 14:43:53 +00:00
_Out_ PBASE_MCB Mcb ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlTruncateBaseMcb (
2012-01-22 14:43:53 +00:00
_Inout_ PBASE_MCB Mcb ,
_In_ LONGLONG Vbn ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlAddBaseMcbEntry (
2012-01-22 14:43:53 +00:00
_Inout_ PBASE_MCB Mcb ,
_In_ LONGLONG Vbn ,
_In_ LONGLONG Lbn ,
_In_ LONGLONG SectorCount ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlRemoveBaseMcbEntry (
2012-01-22 14:43:53 +00:00
_Inout_ PBASE_MCB Mcb ,
_In_ LONGLONG Vbn ,
_In_ LONGLONG SectorCount ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlLookupBaseMcbEntry (
2012-01-22 14:43:53 +00:00
_In_ PBASE_MCB Mcb ,
_In_ LONGLONG Vbn ,
_Out_opt_ PLONGLONG Lbn ,
_Out_opt_ PLONGLONG SectorCountFromLbn ,
_Out_opt_ PLONGLONG StartingLbn ,
_Out_opt_ PLONGLONG SectorCountFromStartingLbn ,
_Out_opt_ PULONG Index ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlLookupLastBaseMcbEntry (
2012-01-22 14:43:53 +00:00
_In_ PBASE_MCB Mcb ,
_Out_ PLONGLONG Vbn ,
_Out_ PLONGLONG Lbn ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlLookupLastBaseMcbEntryAndIndex (
2012-01-22 14:43:53 +00:00
_In_ PBASE_MCB OpaqueMcb ,
_Inout_ PLONGLONG LargeVbn ,
_Inout_ PLONGLONG LargeLbn ,
_Inout_ PULONG Index ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
ULONG
NTAPI
FsRtlNumberOfRunsInBaseMcb (
2012-01-22 14:43:53 +00:00
_In_ PBASE_MCB Mcb ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlGetNextBaseMcbEntry (
2012-01-22 14:43:53 +00:00
_In_ PBASE_MCB Mcb ,
_In_ ULONG RunIndex ,
_Out_ PLONGLONG Vbn ,
_Out_ PLONGLONG Lbn ,
_Out_ PLONGLONG SectorCount ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlSplitBaseMcb (
2012-01-22 14:43:53 +00:00
_Inout_ PBASE_MCB Mcb ,
_In_ LONGLONG Vbn ,
_In_ LONGLONG Amount ) ;
2010-03-27 15:31:25 +00:00
# endif /* (NTDDI_VERSION >= NTDDI_WS03) */
# if (NTDDI_VERSION >= NTDDI_VISTA)
2012-01-22 14:43:53 +00:00
_When_ ( ! Flags & MCB_FLAG_RAISE_ON_ALLOCATION_FAILURE , _Must_inspect_result_ )
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
BOOLEAN
NTAPI
FsRtlInitializeBaseMcbEx (
2012-01-22 14:43:53 +00:00
_Out_ PBASE_MCB Mcb ,
_In_ POOL_TYPE PoolType ,
_In_ USHORT Flags ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTSTATUS
NTAPI
FsRtlAddBaseMcbEntryEx (
2012-01-22 14:43:53 +00:00
_Inout_ PBASE_MCB Mcb ,
_In_ LONGLONG Vbn ,
_In_ LONGLONG Lbn ,
_In_ LONGLONG SectorCount ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlCurrentOplock (
2012-01-22 14:43:53 +00:00
_In_ POPLOCK Oplock ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlOplockBreakToNone (
2012-01-22 14:43:53 +00:00
_Inout_ POPLOCK Oplock ,
_In_opt_ PIO_STACK_LOCATION IrpSp ,
_In_ PIRP Irp ,
_In_opt_ PVOID Context ,
_In_opt_ POPLOCK_WAIT_COMPLETE_ROUTINE CompletionRoutine ,
_In_opt_ POPLOCK_FS_PREPOST_IRP PostIrpRoutine ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( DISPATCH_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlNotifyVolumeEventEx (
2012-01-22 14:43:53 +00:00
_In_ PFILE_OBJECT FileObject ,
_In_ ULONG EventCode ,
_In_ PTARGET_DEVICE_CUSTOM_NOTIFICATION Event ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlNotifyCleanupAll (
2012-01-22 14:43:53 +00:00
_In_ PNOTIFY_SYNC NotifySync ,
_In_ PLIST_ENTRY NotifyList ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( PASSIVE_LEVEL )
2010-03-27 15:31:25 +00:00
NTSTATUS
NTAPI
FsRtlRegisterUncProviderEx (
2012-01-22 14:43:53 +00:00
_Out_ PHANDLE MupHandle ,
_In_ PUNICODE_STRING RedirDevName ,
_In_ PDEVICE_OBJECT DeviceObject ,
_In_ ULONG Flags ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_When_ ( Irp ! = NULL , _IRQL_requires_max_ ( PASSIVE_LEVEL ) )
_When_ ( Irp = = NULL , _IRQL_requires_max_ ( APC_LEVEL ) )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlCancellableWaitForSingleObject (
2012-01-22 14:43:53 +00:00
_In_ PVOID Object ,
_In_opt_ PLARGE_INTEGER Timeout ,
_In_opt_ PIRP Irp ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_When_ ( Irp ! = NULL , _IRQL_requires_max_ ( PASSIVE_LEVEL ) )
_When_ ( Irp = = NULL , _IRQL_requires_max_ ( APC_LEVEL ) )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlCancellableWaitForMultipleObjects (
2012-01-22 14:43:53 +00:00
_In_ ULONG Count ,
_In_reads_ ( Count ) PVOID ObjectArray [ ] ,
_In_ WAIT_TYPE WaitType ,
_In_opt_ PLARGE_INTEGER Timeout ,
_In_opt_ PKWAIT_BLOCK WaitBlockArray ,
_In_opt_ PIRP Irp ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlMupGetProviderInfoFromFileObject (
2012-01-22 14:43:53 +00:00
_In_ PFILE_OBJECT pFileObject ,
_In_ ULONG Level ,
_Out_writes_bytes_ ( * pBufferSize ) PVOID pBuffer ,
_Inout_ PULONG pBufferSize ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlMupGetProviderIdFromName (
2012-01-22 14:43:53 +00:00
_In_ PUNICODE_STRING pProviderName ,
_Out_ PULONG32 pProviderId ) ;
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
2012-01-22 14:43:53 +00:00
FsRtlIncrementCcFastMdlReadWait ( VOID ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( PASSIVE_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlValidateReparsePointBuffer (
2012-01-22 14:43:53 +00:00
_In_ ULONG BufferLength ,
_In_reads_bytes_ ( BufferLength ) PREPARSE_DATA_BUFFER ReparseBuffer ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( PASSIVE_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlRemoveDotsFromPath (
2012-01-22 14:43:53 +00:00
_Inout_updates_bytes_ ( PathLength ) PWSTR OriginalString ,
_In_ USHORT PathLength ,
_Out_ USHORT * NewLength ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlAllocateExtraCreateParameterList (
2012-01-22 14:43:53 +00:00
_In_ FSRTL_ALLOCATE_ECPLIST_FLAGS Flags ,
_Outptr_ PECP_LIST * EcpList ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlFreeExtraCreateParameterList (
2012-01-22 14:43:53 +00:00
_In_ PECP_LIST EcpList ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlAllocateExtraCreateParameter (
2012-01-22 14:43:53 +00:00
_In_ LPCGUID EcpType ,
_In_ ULONG SizeOfContext ,
_In_ FSRTL_ALLOCATE_ECP_FLAGS Flags ,
_In_opt_ PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK CleanupCallback ,
_In_ ULONG PoolTag ,
_Outptr_result_bytebuffer_ ( SizeOfContext ) PVOID * EcpContext ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlFreeExtraCreateParameter (
2012-01-22 14:43:53 +00:00
_In_ PVOID EcpContext ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_When_ ( Flags | FSRTL_ECP_LOOKASIDE_FLAG_NONPAGED_POOL , _IRQL_requires_max_ ( DISPATCH_LEVEL ) )
_When_ ( ! ( Flags | FSRTL_ECP_LOOKASIDE_FLAG_NONPAGED_POOL ) , _IRQL_requires_max_ ( APC_LEVEL ) )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlInitExtraCreateParameterLookasideList (
2012-01-22 14:43:53 +00:00
_Inout_ PVOID Lookaside ,
_In_ FSRTL_ECP_LOOKASIDE_FLAGS Flags ,
_In_ SIZE_T Size ,
_In_ ULONG Tag ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_When_ ( Flags | FSRTL_ECP_LOOKASIDE_FLAG_NONPAGED_POOL , _IRQL_requires_max_ ( DISPATCH_LEVEL ) )
_When_ ( ! ( Flags | FSRTL_ECP_LOOKASIDE_FLAG_NONPAGED_POOL ) , _IRQL_requires_max_ ( APC_LEVEL ) )
2010-03-27 15:31:25 +00:00
VOID
NTAPI
FsRtlDeleteExtraCreateParameterLookasideList (
2012-01-22 14:43:53 +00:00
_Inout_ PVOID Lookaside ,
_In_ FSRTL_ECP_LOOKASIDE_FLAGS Flags ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlAllocateExtraCreateParameterFromLookasideList (
2012-01-22 14:43:53 +00:00
_In_ LPCGUID EcpType ,
ULONG SizeOfContext ,
_In_ FSRTL_ALLOCATE_ECP_FLAGS Flags ,
_In_opt_ PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK CleanupCallback ,
_Inout_ PVOID LookasideList ,
_Outptr_ PVOID * EcpContext ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlInsertExtraCreateParameter (
2012-01-22 14:43:53 +00:00
_Inout_ PECP_LIST EcpList ,
_Inout_ PVOID EcpContext ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlFindExtraCreateParameter (
2012-01-22 14:43:53 +00:00
_In_ PECP_LIST EcpList ,
_In_ LPCGUID EcpType ,
_Outptr_opt_ PVOID * EcpContext ,
_Out_opt_ ULONG * EcpContextSize ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlRemoveExtraCreateParameter (
2012-01-22 14:43:53 +00:00
_Inout_ PECP_LIST EcpList ,
_In_ LPCGUID EcpType ,
_Outptr_ PVOID * EcpContext ,
_Out_opt_ ULONG * EcpContextSize ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlGetEcpListFromIrp (
2012-01-22 14:43:53 +00:00
_In_ PIRP Irp ,
_Outptr_result_maybenull_ PECP_LIST * EcpList ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlSetEcpListIntoIrp (
2012-01-22 14:43:53 +00:00
_Inout_ PIRP Irp ,
_In_ PECP_LIST EcpList ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlGetNextExtraCreateParameter (
2012-01-22 14:43:53 +00:00
_In_ PECP_LIST EcpList ,
_In_opt_ PVOID CurrentEcpContext ,
_Out_opt_ LPGUID NextEcpType ,
_Outptr_opt_ PVOID * NextEcpContext ,
_Out_opt_ ULONG * NextEcpContextSize ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlAcknowledgeEcp (
2012-01-22 14:43:53 +00:00
_In_ PVOID EcpContext ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlIsEcpAcknowledged (
2012-01-22 14:43:53 +00:00
_In_ PVOID EcpContext ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlIsEcpFromUserMode (
2012-01-22 14:43:53 +00:00
_In_ PVOID EcpContext ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( PASSIVE_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlChangeBackingFileObject (
2012-01-22 14:43:53 +00:00
_In_opt_ PFILE_OBJECT CurrentFileObject ,
_In_ PFILE_OBJECT NewFileObject ,
_In_ FSRTL_CHANGE_BACKING_TYPE ChangeBackingType ,
_In_ ULONG Flags ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlLogCcFlushError (
2012-01-22 14:43:53 +00:00
_In_ PUNICODE_STRING FileName ,
_In_ PDEVICE_OBJECT DeviceObject ,
_In_ PSECTION_OBJECT_POINTERS SectionObjectPointer ,
_In_ NTSTATUS FlushError ,
_In_ ULONG Flags ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
2012-01-22 14:43:53 +00:00
FsRtlAreVolumeStartupApplicationsComplete ( VOID ) ;
2010-03-27 15:31:25 +00:00
NTKERNELAPI
ULONG
NTAPI
2012-01-22 14:43:53 +00:00
FsRtlQueryMaximumVirtualDiskNestingLevel ( VOID ) ;
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlGetVirtualDiskNestingLevel (
2012-01-22 14:43:53 +00:00
_In_ PDEVICE_OBJECT DeviceObject ,
_Out_ PULONG NestingLevel ,
_Out_opt_ PULONG NestingFlags ) ;
2010-03-27 15:31:25 +00:00
# endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
# if (NTDDI_VERSION >= NTDDI_VISTASP1)
2012-01-22 14:43:53 +00:00
_When_ ( Flags | OPLOCK_FLAG_BACK_OUT_ATOMIC_OPLOCK , _Must_inspect_result_ )
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlCheckOplockEx (
2012-01-22 14:43:53 +00:00
_In_ POPLOCK Oplock ,
_In_ PIRP Irp ,
_In_ ULONG Flags ,
_In_opt_ PVOID Context ,
_In_opt_ POPLOCK_WAIT_COMPLETE_ROUTINE CompletionRoutine ,
_In_opt_ POPLOCK_FS_PREPOST_IRP PostIrpRoutine ) ;
2010-03-27 15:31:25 +00:00
# endif
# if (NTDDI_VERSION >= NTDDI_WIN7)
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlAreThereCurrentOrInProgressFileLocks (
2012-01-22 14:43:53 +00:00
_In_ PFILE_LOCK FileLock ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlOplockIsSharedRequest (
2012-01-22 14:43:53 +00:00
_In_ PIRP Irp ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlOplockBreakH (
2012-01-22 14:43:53 +00:00
_In_ POPLOCK Oplock ,
_In_ PIRP Irp ,
_In_ ULONG Flags ,
_In_opt_ PVOID Context ,
_In_opt_ POPLOCK_WAIT_COMPLETE_ROUTINE CompletionRoutine ,
_In_opt_ POPLOCK_FS_PREPOST_IRP PostIrpRoutine ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlCurrentOplockH (
2012-01-22 14:43:53 +00:00
_In_ POPLOCK Oplock ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlOplockBreakToNoneEx (
2012-01-22 14:43:53 +00:00
_Inout_ POPLOCK Oplock ,
_In_ PIRP Irp ,
_In_ ULONG Flags ,
_In_opt_ PVOID Context ,
_In_opt_ POPLOCK_WAIT_COMPLETE_ROUTINE CompletionRoutine ,
_In_opt_ POPLOCK_FS_PREPOST_IRP PostIrpRoutine ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlOplockFsctrlEx (
2012-01-22 14:43:53 +00:00
_In_ POPLOCK Oplock ,
_In_ PIRP Irp ,
_In_ ULONG OpenCount ,
_In_ ULONG Flags ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlOplockKeysEqual (
2012-01-22 14:43:53 +00:00
_In_opt_ PFILE_OBJECT Fo1 ,
_In_opt_ PFILE_OBJECT Fo2 ) ;
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlInitializeExtraCreateParameterList (
2012-01-22 14:43:53 +00:00
_Inout_ PECP_LIST EcpList ) ;
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlInitializeExtraCreateParameter (
2012-01-22 14:43:53 +00:00
_Out_ PECP_HEADER Ecp ,
_In_ ULONG EcpFlags ,
_In_opt_ PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK CleanupCallback ,
_In_ ULONG TotalSize ,
_In_ LPCGUID EcpType ,
_In_opt_ PVOID ListAllocatedFrom ) ;
2010-03-27 15:31:25 +00:00
# endif /* (NTDDI_VERSION >= NTDDI_WIN7) */
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlInsertPerFileContext (
2012-01-22 14:43:53 +00:00
_In_ PVOID * PerFileContextPointer ,
_In_ PFSRTL_PER_FILE_CONTEXT Ptr ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
PFSRTL_PER_FILE_CONTEXT
NTAPI
FsRtlLookupPerFileContext (
2012-01-22 14:43:53 +00:00
_In_ PVOID * PerFileContextPointer ,
_In_opt_ PVOID OwnerId ,
_In_opt_ PVOID InstanceId ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
PFSRTL_PER_FILE_CONTEXT
NTAPI
FsRtlRemovePerFileContext (
2012-01-22 14:43:53 +00:00
_In_ PVOID * PerFileContextPointer ,
_In_opt_ PVOID OwnerId ,
_In_opt_ PVOID InstanceId ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
VOID
NTAPI
FsRtlTeardownPerFileContexts (
2012-01-22 14:43:53 +00:00
_In_ PVOID * PerFileContextPointer ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlInsertPerFileObjectContext (
2012-01-22 14:43:53 +00:00
_In_ PFILE_OBJECT FileObject ,
_In_ PFSRTL_PER_FILEOBJECT_CONTEXT Ptr ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
PFSRTL_PER_FILEOBJECT_CONTEXT
NTAPI
FsRtlLookupPerFileObjectContext (
2012-01-22 14:43:53 +00:00
_In_ PFILE_OBJECT FileObject ,
_In_opt_ PVOID OwnerId ,
_In_opt_ PVOID InstanceId ) ;
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_Must_inspect_result_
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
NTKERNELAPI
PFSRTL_PER_FILEOBJECT_CONTEXT
NTAPI
FsRtlRemovePerFileObjectContext (
2012-01-22 14:43:53 +00:00
_In_ PFILE_OBJECT FileObject ,
_In_opt_ PVOID OwnerId ,
_In_opt_ PVOID InstanceId ) ;
2010-03-27 15:31:25 +00:00
2014-10-03 19:36:22 +00:00
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlRegisterFileSystemFilterCallbacks (
_In_ struct _DRIVER_OBJECT * FilterDriverObject ,
_In_ PFS_FILTER_CALLBACKS Callbacks ) ;
# if (NTDDI_VERSION >= NTDDI_VISTA)
NTKERNELAPI
NTSTATUS
NTAPI
FsRtlNotifyStreamFileObject (
_In_ struct _FILE_OBJECT * StreamFileObject ,
_In_opt_ struct _DEVICE_OBJECT * DeviceObjectHint ,
_In_ FS_FILTER_STREAM_FO_NOTIFICATION_TYPE NotificationType ,
_In_ BOOLEAN SafeToRecurse ) ;
# endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
# define FsRtlFastLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) \
FsRtlPrivateLock ( A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , NULL , A10 , A11 )
# define FsRtlAreThereCurrentFileLocks(FL) \
( ( FL ) - > FastIoIsQuestionable )
# define FsRtlIncrementLockRequestsInProgress(FL) { \
ASSERT ( ( FL ) - > LockRequestsInProgress > = 0 ) ; \
( void ) \
( InterlockedIncrement ( ( LONG volatile * ) & ( ( FL ) - > LockRequestsInProgress ) ) ) ; \
2010-03-27 15:31:25 +00:00
}
2014-10-03 19:36:22 +00:00
# define FsRtlDecrementLockRequestsInProgress(FL) { \
ASSERT ( ( FL ) - > LockRequestsInProgress > 0 ) ; \
( void ) \
( InterlockedDecrement ( ( LONG volatile * ) & ( ( FL ) - > LockRequestsInProgress ) ) ) ; \
2010-03-27 15:31:25 +00:00
}
2014-05-11 23:11:16 +00:00
# ifdef _NTSYSTEM_
extern const UCHAR * const FsRtlLegalAnsiCharacterArray ;
# define LEGAL_ANSI_CHARACTER_ARRAY FsRtlLegalAnsiCharacterArray
# else
__CREATE_NTOS_DATA_IMPORT_ALIAS ( FsRtlLegalAnsiCharacterArray )
2014-09-14 15:49:35 +00:00
extern const UCHAR * const * FsRtlLegalAnsiCharacterArray ;
2014-05-11 23:11:16 +00:00
# define LEGAL_ANSI_CHARACTER_ARRAY (*FsRtlLegalAnsiCharacterArray)
# endif
2010-03-27 15:31:25 +00:00
2014-10-03 19:36:22 +00:00
# define FsRtlIsAnsiCharacterWild(C) \
FlagOn ( LEGAL_ANSI_CHARACTER_ARRAY [ ( UCHAR ) ( C ) ] , FSRTL_WILD_CHARACTER )
# define FsRtlIsAnsiCharacterLegalFat(C, WILD) \
FlagOn ( LEGAL_ANSI_CHARACTER_ARRAY [ ( UCHAR ) ( C ) ] , ( FSRTL_FAT_LEGAL ) | \
( ( WILD ) ? FSRTL_WILD_CHARACTER : 0 ) )
# define FsRtlIsAnsiCharacterLegalHpfs(C, WILD) \
FlagOn ( LEGAL_ANSI_CHARACTER_ARRAY [ ( UCHAR ) ( C ) ] , ( FSRTL_HPFS_LEGAL ) | \
( ( WILD ) ? FSRTL_WILD_CHARACTER : 0 ) )
# define FsRtlIsAnsiCharacterLegalNtfs(C, WILD) \
FlagOn ( LEGAL_ANSI_CHARACTER_ARRAY [ ( UCHAR ) ( C ) ] , ( FSRTL_NTFS_LEGAL ) | \
( ( WILD ) ? FSRTL_WILD_CHARACTER : 0 ) )
# define FsRtlIsAnsiCharacterLegalNtfsStream(C,WILD_OK) \
FsRtlTestAnsiCharacter ( ( C ) , TRUE , ( WILD_OK ) , FSRTL_NTFS_STREAM_LEGAL )
# define FsRtlIsAnsiCharacterLegal(C,FLAGS) \
FsRtlTestAnsiCharacter ( ( C ) , TRUE , FALSE , ( FLAGS ) )
# define FsRtlTestAnsiCharacter(C, DEFAULT_RET, WILD_OK, FLAGS) \
( ( ( SCHAR ) ( C ) < 0 ) ? DEFAULT_RET : \
FlagOn ( LEGAL_ANSI_CHARACTER_ARRAY [ ( C ) ] , \
( FLAGS ) | ( ( WILD_OK ) ? FSRTL_WILD_CHARACTER : 0 ) ) )
# define FsRtlIsLeadDbcsCharacter(DBCS_CHAR) \
( ( BOOLEAN ) ( ( UCHAR ) ( DBCS_CHAR ) < 0x80 ? FALSE : \
( NLS_MB_CODE_PAGE_TAG & & \
( NLS_OEM_LEAD_BYTE_INFO [ ( UCHAR ) ( DBCS_CHAR ) ] ! = 0 ) ) ) )
# define FsRtlIsUnicodeCharacterWild(C) \
( ( ( ( C ) > = 0x40 ) ? FALSE : \
FlagOn ( LEGAL_ANSI_CHARACTER_ARRAY [ ( C ) ] , FSRTL_WILD_CHARACTER ) ) )
# define FsRtlInitPerFileContext(_fc, _owner, _inst, _cb) \
( ( _fc ) - > OwnerId = ( _owner ) , \
( _fc ) - > InstanceId = ( _inst ) , \
2010-03-27 15:31:25 +00:00
( _fc ) - > FreeCallback = ( _cb ) )
2014-10-03 19:36:22 +00:00
# define FsRtlGetPerFileContextPointer(_fo) \
( FsRtlSupportsPerFileContexts ( _fo ) ? \
FsRtlGetPerStreamContextPointer ( _fo ) - > FileContextSupportPointer : NULL )
2010-03-27 15:31:25 +00:00
2014-10-03 19:36:22 +00:00
# define FsRtlSupportsPerFileContexts(_fo) \
( ( FsRtlGetPerStreamContextPointer ( _fo ) ! = NULL ) & & \
( FsRtlGetPerStreamContextPointer ( _fo ) - > Version > = FSRTL_FCB_HEADER_V1 ) & & \
2010-03-27 15:31:25 +00:00
( FsRtlGetPerStreamContextPointer ( _fo ) - > FileContextSupportPointer ! = NULL ) )
2014-10-03 19:36:22 +00:00
# define FsRtlSetupAdvancedHeaderEx(_advhdr, _fmutx, _fctxptr) \
{ \
FsRtlSetupAdvancedHeader ( _advhdr , _fmutx ) ; \
if ( ( _fctxptr ) ! = NULL ) { \
( _advhdr ) - > FileContextSupportPointer = ( _fctxptr ) ; \
} \
2010-03-27 15:31:25 +00:00
}
2014-10-03 19:36:22 +00:00
# define FsRtlGetPerStreamContextPointer(FO) \
( ( PFSRTL_ADVANCED_FCB_HEADER ) ( FO ) - > FsContext )
2010-03-27 15:31:25 +00:00
2014-10-03 19:36:22 +00:00
# define FsRtlInitPerStreamContext(PSC, O, I, FC) \
( ( PSC ) - > OwnerId = ( O ) , \
( PSC ) - > InstanceId = ( I ) , \
( PSC ) - > FreeCallback = ( FC ) )
2010-03-27 15:31:25 +00:00
2014-10-03 19:36:22 +00:00
# define FsRtlSupportsPerStreamContexts(FO) \
( ( BOOLEAN ) ( ( NULL ! = FsRtlGetPerStreamContextPointer ( FO ) & & \
FlagOn ( FsRtlGetPerStreamContextPointer ( FO ) - > Flags2 , \
FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS ) ) )
2010-03-27 15:31:25 +00:00
2014-10-03 19:36:22 +00:00
# define FsRtlLookupPerStreamContext(_sc, _oid, _iid) \
( ( ( NULL ! = ( _sc ) ) & & \
FlagOn ( ( _sc ) - > Flags2 , FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS ) & & \
! IsListEmpty ( & ( _sc ) - > FilterContexts ) ) ? \
FsRtlLookupPerStreamContextInternal ( ( _sc ) , ( _oid ) , ( _iid ) ) : NULL )
2010-03-27 15:31:25 +00:00
2012-01-22 14:43:53 +00:00
_IRQL_requires_max_ ( APC_LEVEL )
2010-03-27 15:31:25 +00:00
FORCEINLINE
2010-07-24 09:20:56 +00:00
VOID
2010-03-27 15:31:25 +00:00
NTAPI
FsRtlSetupAdvancedHeader (
2012-01-22 14:43:53 +00:00
_In_ PVOID AdvHdr ,
_In_ PFAST_MUTEX FMutex )
2010-03-27 15:31:25 +00:00
{
PFSRTL_ADVANCED_FCB_HEADER localAdvHdr = ( PFSRTL_ADVANCED_FCB_HEADER ) AdvHdr ;
localAdvHdr - > Flags | = FSRTL_FLAG_ADVANCED_HEADER ;
localAdvHdr - > Flags2 | = FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS ;
# if (NTDDI_VERSION >= NTDDI_VISTA)
localAdvHdr - > Version = FSRTL_FCB_HEADER_V1 ;
# else
localAdvHdr - > Version = FSRTL_FCB_HEADER_V0 ;
# endif
InitializeListHead ( & localAdvHdr - > FilterContexts ) ;
if ( FMutex ! = NULL ) {
localAdvHdr - > FastMutex = FMutex ;
}
# if (NTDDI_VERSION >= NTDDI_VISTA)
* ( ( PULONG_PTR ) ( & localAdvHdr - > PushLock ) ) = 0 ;
localAdvHdr - > FileContextSupportPointer = NULL ;
# endif
}
2014-10-03 19:36:22 +00:00
# define FsRtlInitPerFileObjectContext(_fc, _owner, _inst) \
2010-03-27 15:31:25 +00:00
( ( _fc ) - > OwnerId = ( _owner ) , ( _fc ) - > InstanceId = ( _inst ) )
2014-10-03 19:36:22 +00:00
# define FsRtlCompleteRequest(IRP, STATUS) { \
( IRP ) - > IoStatus . Status = ( STATUS ) ; \
IoCompleteRequest ( ( IRP ) , IO_DISK_INCREMENT ) ; \
2010-03-27 15:31:25 +00:00
}
$ endif ( _NTIFS_ )