FsRtlCheckLockForWriteAccess function (ntifs.h)
The FsRtlCheckLockForWriteAccess routine determines whether the process associated with a given IRP has write access to a locked region of a file.
Syntax
BOOLEAN FsRtlCheckLockForWriteAccess(
[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 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.
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) |