FltRetainSwappedBufferMdlAddress - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// fltkernel.h

VOID FltRetainSwappedBufferMdlAddress(
  [in] PFLT_CALLBACK_DATA CallbackData
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-fltkernel-fltretainswappedbuffermdladdress)

FltRetainSwappedBufferMdlAddress function

Description

FltRetainSwappedBufferMdlAddress prevents the Filter Manager from freeing the memory descriptor list (MDL) for a buffer that was swapped in by a minifilter driver.

Parameters

CallbackData [in]

Pointer to the callback data structure for the operation.

Remarks

When a minifilter driver swaps in a new buffer in a preoperation callback (PFLT_PRE_OPERATION_CALLBACK) routine, the Filter Manager automatically frees the buffer's MDL when the corresponding postoperation (PFLT_POST_OPERATION_CALLBACK) callback routine returns.

The minifilter driver can prevent the Filter Manager from freeing the MDL by calling FltRetainSwappedBufferMdlAddress from the postoperation callback routine.

After calling FltRetainSwappedBufferMdlAddress, the caller is responsible for freeing the MDL by calling a routine such as IoFreeMdl.

FltRetainSwappedBufferMdlAddress can only be called from a postoperation callback routine.

See also

FltDecodeParameters

FltGetSwappedBufferMdlAddress

IoFreeMdl

PFLT_POST_OPERATION_CALLBACK

PFLT_PRE_OPERATION_CALLBACK