FltInitializeFileLock routine

The FltInitializeFileLock routine initializes an opaque FILE_LOCK structure that the caller has allocated from paged pool.

Syntax


VOID FltInitializeFileLock(
  _Out_ PFILE_LOCK FileLock
);

Parameters

FileLock [out]

Pointer to an uninitialized FILE_LOCK structure.

Return value

None

Remarks

The FILE_LOCK structure is opaque: that is, its members are reserved for system use.

Once initialized, the FILE_LOCK structure can be used to lock a byte range in a file by calling FltProcessFileLock.

It is a programming error to call FltInitializeFileLock for a FILE_LOCK structure that has already been initialized by FltInitializeFileLock or FltAllocateFileLock, unless the structure has been uninitialized by a subsequent call to FltUninitializeFileLock.

When the FILE_LOCK structure is no longer needed, it can be uninitialized by calling FltUninitializeFileLock. The uninitialized FILE_LOCK structure can then be initialized for reuse by calling FltInitializeFileLock.

To allocate and initialize a new opaque FILE_LOCK structure, call FltAllocateFileLock.

To free an initialized FILE_LOCK structure, call FltFreeFileLock.

Requirements

Target platform

Universal

Version

Available starting with Windows XP with SP2 or Windows Server 2003 with SP1.

Header

Fltkernel.h (include Fltkernel.h)

Library

FltMgr.lib

DLL

Fltmgr.sys

IRQL

<= APC_LEVEL

See also

FILE_LOCK
FltAllocateFileLock
FltCheckLockForReadAccess
FltCheckLockForWriteAccess
FltFreeFileLock
FltProcessFileLock
FltUninitializeFileLock
FsRtlInitializeFileLock

 

 

Send comments about this topic to Microsoft

Show: