PFLT_COMPLETE_LOCK_CALLBACK_DATA_ROUTINE callback function (fltkernel.h)

A minifilter driver can register a routine of type PFLT_COMPLETE_LOCK_CALLBACK_DATA_ROUTINE as the minifilter driver's CompleteLockCallbackDataRoutine callback routine for a FILE_LOCK structure.

Syntax

PFLT_COMPLETE_LOCK_CALLBACK_DATA_ROUTINE PfltCompleteLockCallbackDataRoutine;

NTSTATUS PfltCompleteLockCallbackDataRoutine(
  [in, optional] PVOID Context,
  [in]           PFLT_CALLBACK_DATA CallbackData
)
{...}

Parameters

[in, optional] Context

Context pointer that was passed to FltProcessFileLock.

[in] CallbackData

Pointer to the callback data (FLT_CALLBACK_DATA) structure for the IRP_MJ_LOCK_CONTROL operation that is being completed. The lock request type will be one of the following:

  • IRP_MN_LOCK
  • IRP_MN_UNLOCK_ALL
  • IRP_MN_UNLOCK_ALL_BY_KEY
  • IRP_MN_UNLOCK_SINGLE

Return value

This routine returns STATUS_SUCCESS or an appropriate NTSTATUS value. If it returns an NTSTATUS value that is not a success code, the file lock is removed from the file.

Remarks

A minifilter driver can optionally specify a routine of type PFLT_COMPLETE_LOCK_CALLBACK_DATA_ROUTINE as the minifilter driver's CompleteLockCallbackDataRoutine routine for a byte-range file lock. To specify this routine, the minifilter driver passes a pointer to the routine as the CompleteLockCallbackDataRoutine parameter for FltAllocateFileLock.

When completing an IRP_MJ_LOCK_CONTROL operation for the file lock, filter manager calls this routine, if specified, as a notification to the minifilter.

Requirements

Requirement Value
Minimum supported client Windows XP SP2
Minimum supported server Windows Server 2003 SP1
Target Platform Desktop
Header fltkernel.h (include Fltkernel.h)
IRQL <=APC_LEVEL

See also

FILE_LOCK

FltAllocateFileLock

FltCheckLockForReadAccess

FltCheckLockForWriteAccess

FltFreeFileLock

FltInitializeFileLock

FltProcessFileLock

FltUninitializeFileLock

IRP_MJ_LOCK_CONTROL

PUNLOCK_ROUTINE