PFLT_TRANSACTION_NOTIFICATION_CALLBACK routine

A minifilter driver can register a routine of type PFLT_TRANSACTION_NOTIFICATION_CALLBACK as its TransactionNotificationCallback routine.

Syntax


PFLT_TRANSACTION_NOTIFICATION_CALLBACK TransactionNotificationCallback;

NTSTATUS TransactionNotificationCallback(
  _In_  PCFLT_RELATED_OBJECTS FltObjects,
  _In_  PFLT_CONTEXT TransactionContext,
  _In_  ULONG NotificationMask
)
{ ... }

Parameters

FltObjects [in]

Pointer to an FLT_RELATED_OBJECTS structure that contains opaque pointers for the objects related to the current operation.

TransactionContext [in]

Pointer to the minifilter driver's transaction context.

NotificationMask [in]

Specifies the type of notifications that the filter manager is sending to the minifilter driver, as one of the following values.

ValueMeaning

TRANSACTION_NOTIFY_COMMIT

This notification is sent when the transaction is being committed.

TRANSACTION_NOTIFY_COMMIT_FINALIZE

For Windows Vista SP1 and later, this notification is sent when the transaction is fully committed (that is, when all of the resource managers associated with the transaction, such as TxF, have committed).

TRANSACTION_NOTIFY_PREPARE

This notification is sent when the transaction enters the prepare for commit phase.

TRANSACTION_NOTIFY_PREPREPARE

This notification is sent when the transaction enters the pre-prepare for commit phase.

TRANSACTION_NOTIFY_ROLLBACK

This notification is sent when the transaction is being rolled back or aborted.

 

Return value

The PFLT_TRANSACTION_NOTIFICATION_CALLBACK routine returns one of the following NTSTATUS values:

Return codeDescription
STATUS_SUCCESS

Returning this status value indicates that the minifilter driver is finished with the transaction. This is a success code.

STATUS_PENDING

Returning this status value indicates that the minifilter driver is not yet finished with the transaction. This is a success code.

 

Remarks

When a minifilter driver registers itself by calling FltRegisterFilter from its DriverEntry routine, it can register a routine of type PFLT_TRANSACTION_NOTIFICATION_CALLBACK as the minifilter's TransactionNotificationCallback routine.

To register the TransactionNotificationCallback routine, the minifilter driver stores the address of a routine of type PFLT_TRANSACTION_NOTIFICATION_CALLBACK in the TransactionNotificationCallback member of the FLT_REGISTRATION structure that the minifilter driver passes as the Registration parameter of FltRegisterFilter.

The filter manager calls this routine to notify the minifilter driver about the status of a transaction that the minifilter driver is enlisted in.

If the minifilter driver returns STATUS_PENDING from this callback routine, it must eventually call one of the following routines to indicate that it has finished processing the notification:

FltCommitComplete

FltPrepareComplete

FltPrePrepareComplete

FltRollbackComplete

Requirements

Version

The PFLT_TRANSACTION_NOTIFICATION_CALLBACK routine is available on Windows Vista and later.

Header

Fltkernel.h (include Fltkernel.h)

IRQL

PASSIVE_LEVEL

See also

FLT_REGISTRATION
FLT_RELATED_OBJECTS
FltCommitComplete
FltPrepareComplete
FltPrePrepareComplete
FltRegisterFilter
FltRollbackComplete

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft