Expand Minimize

FsRtlCheckLockForWriteAccess routine

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

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.

Requirements

Target platform

Universal

Header

Ntifs.h (include Ntifs.h)

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

IRQL

<= APC_LEVEL

See also

FltCheckLockForWriteAccess
FsRtlAllocateFileLock
FsRtlCheckLockForReadAccess
FsRtlFastCheckLockForWrite
FsRtlInitializeFileLock
FsRtlProcessFileLock

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft