FsRtlAllocateFileLock function (ntifs.h)
The FsRtlAllocateFileLock routine allocates and initializes a new FILE_LOCK structure.
Syntax
PFILE_LOCK FsRtlAllocateFileLock(
[in, optional] PCOMPLETE_LOCK_IRP_ROUTINE CompleteLockIrpRoutine,
[in, optional] PUNLOCK_ROUTINE UnlockRoutine
);
Parameters
[in, optional] CompleteLockIrpRoutine
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.
[in, optional] UnlockRoutine
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.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 |
Target Platform | Universal |
Header | ntifs.h (include Ntifs.h) |
Library | NtosKrnl.lib |
DLL | NtosKrnl.exe |
IRQL | <= APC_LEVEL |
DDI compliance rules | HwStorPortProhibitedDDIs(storport), SpNoWait(storport), StorPortStartIo(storport) |