PFLT_COMPLETE_LOCK_CALLBACK_DATA_ROUTINE routine

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 CompleteLockCallbackDataRoutine;

NTSTATUS CompleteLockCallbackDataRoutine(
  _In_opt_  PVOID Context,
  _In_      PFLT_CALLBACK_DATA CallbackData
)
{ ... }

Parameters

Context [in, optional]

Context pointer that was passed to FltProcessFileLock.

CallbackData [in]

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

Version

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

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

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft