FsRtlAllocateFileLock - NtDoc

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

PFILE_LOCK FsRtlAllocateFileLock(
  [in, optional] PCOMPLETE_LOCK_IRP_ROUTINE CompleteLockIrpRoutine,
  [in, optional] PUNLOCK_ROUTINE            UnlockRoutine
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

FsRtlAllocateFileLock function

Description

The FsRtlAllocateFileLock routine allocates and initializes a new FILE_LOCK structure.

Parameters

CompleteLockIrpRoutine [in, optional]

A pointer to a PCOMPLETE_LOCK_IRP_ROUTINE-typed callback routine to be called when an IRP_MJ_LOCK_CONTROL request is completed. This parameter is optional and can be NULL.

UnlockRoutine [in, optional]

A pointer to a PUNLOCK_ROUTINE-typed callback routine to be called when the byte range is unlocked. This parameter is optional and can be NULL.

Return value

FsRtlAllocateFileLock returns a pointer to the newly allocated FILE_LOCK structure.

Remarks

FsRtlAllocateFileLock allocates a new FILE_LOCK structure from paged pool and initializes it.

Minifilters should call FltAllocateFileLock instead of FsRtlAllocateFileLock.

See also

FltAllocateFileLock

FsRtlAreThereCurrentFileLocks

FsRtlCheckLockForReadAccess

FsRtlCheckLockForWriteAccess

FsRtlFastCheckLockForRead

FsRtlFastCheckLockForWrite

FsRtlFastLock

FsRtlFastUnlockAll

FsRtlFastUnlockAllByKey

FsRtlFastUnlockSingle

FsRtlGetNextFileLock

FsRtlInitializeFileLock

FsRtlProcessFileLock

FsRtlUninitializeFileLock

IRP_MJ_LOCK_CONTROL

PCOMPLETE_LOCK_IRP_ROUTINE

PUNLOCK_ROUTINE