Export (0) Print
Expand All
Expand Minimize

FltEnlistInTransaction routine

The FltEnlistInTransaction routine enlists a minifilter driver in a given transaction.

Syntax


NTSTATUS FltEnlistInTransaction(
  _In_  PFLT_INSTANCE Instance,
  _In_  PKTRANSACTION Transaction,
  _In_  PFLT_CONTEXT TransactionContext,
  _In_  NOTIFICATION_MASK NotificationMask
);

Parameters

Instance [in]

An opaque instance pointer for the caller. This parameter is required and cannot be NULL.

Transaction [in]

An opaque transaction pointer for the transaction.

TransactionContext [in]

A pointer to the minifilter driver's transaction context. This parameter is required and cannot be NULL.

NotificationMask [in]

Specifies the type of notifications that the filter manager is to send to the minifilter driver, as one or more of the values listed in the following table. This parameter is required and cannot be zero.

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 has entered the prepare for commit phase.

TRANSACTION_NOTIFY_PREPREPARE

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

TRANSACTION_NOTIFY_ROLLBACK

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

FLT_MAX_TRANSACTION_NOTIFICATIONS

TRANSACTION_NOTIFY_COMMIT | TRANSACTION_NOTIFY_PREPARE | TRANSACTION_NOTIFY_PREPREPARE | TRANSACTION_NOTIFY_ROLLBACK

 

Return value

FltEnlistInTransaction returns STATUS_SUCCESS or an appropriate NTSTATUS value such as one of the following:

Return codeDescription
STATUS_FLT_ALREADY_ENLISTED

The caller is already enlisted in the transaction. This is an error code.

STATUS_FLT_DELETING_OBJECT

The instance specified in the Instance parameter is being torn down. This is an error code.

STATUS_INSUFFICIENT_RESOURCES

FltEnlistInTransaction encountered a pool allocation error. This is an error code.

STATUS_INVALID_PARAMETER

The caller did not register a TransactionNotificationCallback routine. This is an error code.

STATUS_INVALID_PARAMETER_4

The caller specified an invalid value for the NotificationMask parameter. This is an error code.

 

Remarks

A minifilter driver calls FltEnlistInTransaction to enlist in a transaction. Before calling FltEnlistInTransaction, the minifilter driver must have registered a TransactionNotificationCallback routine. Otherwise, the call to FltEnlistInTransaction will fail.

To register a TransactionNotificationCallback routine, a 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.

To roll back or abort a transaction, call FltRollbackEnlistment.

To allocate a new transaction context, call FltAllocateContext.

To retrieve a transaction context, call FltGetTransactionContext.

To delete a transaction context, call FltDeleteTransactionContext or FltDeleteContext.

To set a transaction context, call FltSetTransactionContext.

Requirements

Version

This routine is available on Windows Vista and later versions of Windows.

Header

Fltkernel.h (include Fltkernel.h)

Library

FltMgr.lib

IRQL

<= APC_LEVEL

See also

FltAllocateContext
FltCommitComplete
FltDeleteContext
FltDeleteTransactionContext
FltGetTransactionContext
FltPrepareComplete
FltPrePrepareComplete
FltRegisterFilter
FltReleaseContext
FltRollbackComplete
FltRollbackEnlistment
FltSetTransactionContext
PFLT_TRANSACTION_NOTIFICATION_CALLBACK

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft