FsRtlAllocateFileLock routine

The FsRtlAllocateFileLock routine allocates and initializes a new FILE_LOCK structure.

Syntax


PFILE_LOCK FsRtlAllocateFileLock(
  _In_opt_ PCOMPLETE_LOCK_IRP_ROUTINE CompleteLockIrpRoutine,
  _In_opt_ PUNLOCK_ROUTINE            UnlockRoutine
);

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.

Requirements

Target platform

Universal

Version

This routine is available on Microsoft Windows 2000 and later.

Header

Ntifs.h (include Ntifs.h)

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

IRQL

<= APC_LEVEL

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

 

 

Send comments about this topic to Microsoft

Show: