FsRtlCheckLockForWriteAccess - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ntifs.h

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

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ntifs-_fsrtl_advanced_fcb_header-fsrtlchecklockforwriteaccess)

FsRtlCheckLockForWriteAccess function

Description

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

Parameters

FileLock [in]

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

Irp [in]

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

Return value

FsRtlCheckLockForWriteAccess returns TRUE if the process has write access, FALSE otherwise.

Remarks

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

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

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

FsRtlCheckLockForWriteAccess does not complete the IRP specified by Irp.

Minifilters must call FltCheckLockForWriteAccess instead of FsRtlCheckLockForWriteAccess.

See also

FltCheckLockForWriteAccess

FsRtlAllocateFileLock

FsRtlCheckLockForReadAccess

FsRtlFastCheckLockForWrite

FsRtlInitializeFileLock

FsRtlProcessFileLock