PFLT_COMPLETE_LOCK_CALLBACK_DATA_ROUTINE callback function

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(
  PVOID Context,
  PFLT_CALLBACK_DATA CallbackData
)
{...}

Parameters

Context

Context pointer that was passed to FltProcessFileLock.

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 the an IRP_MJ_LOCK_CONTROL operation for the file lock, filter manager calls this routine, if specified, as a notification to the minifilter.

Requirements

   
Windows version Available starting with Windows XP with SP2 or Windows Server 2003 with 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