FsRtlFreeFileLock function (ntifs.h)

The FsRtlFreeFileLock routine uninitializes and frees a file lock structure.

Syntax

void FsRtlFreeFileLock(
  [in] PFILE_LOCK FileLock
);

Parameters

[in] FileLock

Pointer to the FILE_LOCK structure. This structure must have been allocated by a previous call to FsRtlAllocateFileLock.

Return value

None

Remarks

FsRtlFreeFileLock should be used only for file locks that were allocated and initialized by FsRtlAllocateFileLock.

It is a programming error to call FsRtlFreeFileLock for a FILE_LOCK structure that has already been uninitialized by a call to FsRtlUninitializeFileLock.

Minifilters must call FltFreeFileLock instead of FsRtlFreeFileLock.

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)

See also

FltFreeFileLock

FsRtlAreThereCurrentFileLocks

FsRtlCheckLockForReadAccess

FsRtlCheckLockForWriteAccess

FsRtlFastCheckLockForRead

FsRtlFastCheckLockForWrite

FsRtlFastLock

FsRtlFastUnlockAll

FsRtlFastUnlockAllByKey

FsRtlFastUnlockSingle

FsRtlGetNextFileLock

FsRtlInitializeFileLock

FsRtlProcessFileLock

FsRtlUninitializeFileLock