NtUnlockFile - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTIOAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
NtUnlockFile(
    _In_ HANDLE FileHandle,
    _Out_ PIO_STATUS_BLOCK IoStatusBlock,
    _In_ PLARGE_INTEGER ByteOffset,
    _In_ PLARGE_INTEGER Length,
    _In_ ULONG Key
    );

#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwUnlockFile(
    _In_ HANDLE FileHandle,
    _Out_ PIO_STATUS_BLOCK IoStatusBlock,
    _In_ PLARGE_INTEGER ByteOffset,
    _In_ PLARGE_INTEGER Length,
    _In_ ULONG Key
    );

#endif

View code on GitHub

This function is documented in Windows Driver Kit here and here.


FileHandle

HANDLE to File Object with locked region.

IoStatusBlock

IO result of function call.

ByteOffset

Offset in file where unlock region begins.

Length

Length of region to unlock.

Key

Pointer to 4-bytes key associated with lock. See NtLockFile for additional information about locking by key usage.

Documented by

See also