FsRtlCheckLockForReadAccess function (ntifs.h)

The FsRtlCheckLockForReadAccess routine determines whether the process associated with a given IRP has read access to a locked region of a file.

Syntax

BOOLEAN FsRtlCheckLockForReadAccess(
  [in] PFILE_LOCK FileLock,
  [in] PIRP       Irp
);

Parameters

[in] FileLock

Pointer to the FILE_LOCK structure for the file. This structure must have been initialized by a previous call to FsRtlAllocateFileLock or FsRtlInitializeFileLock.

[in] Irp

Pointer to the IRP. Must be an IRP for a read operation.

Return value

FsRtlCheckLockForReadAccess returns TRUE if the process has read access, FALSE otherwise.

Remarks

On Microsoft Windows XP and later, FsRtlCheckLockForReadAccess checks the process to which the thread that requested the read operation is currently attached.

On Microsoft Windows 2000 and earlier, FsRtlCheckLockForReadAccess checks the process that created the thread.

FsRtlCheckLockForReadAccess checks to see if there are any conflicting locks in the byte range that is to be read.

FsRtlCheckLockForReadAccess does not complete the IRP specified by Irp.

Minifilters must call FltCheckLockForReadAccess instead of FsRtlCheckLockForReadAccess.

Requirements

Requirement Value
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= APC_LEVEL
DDI compliance rules HwStorPortProhibitedDDIs(storport)

See also

FltCheckLockForReadAccess

FsRtlAllocateFileLock

FsRtlCheckLockForWriteAccess

FsRtlFastCheckLockForRead

FsRtlInitializeFileLock

FsRtlProcessFileLock