Export (0) Print
Expand All
Expand Minimize

FltDeleteTransactionContext routine

The FltDeleteTransactionContext routine removes a context from a given transaction and marks the context for deletion.

Syntax


NTSTATUS FltDeleteTransactionContext(
  _In_       PFLT_INSTANCE Instance,
  _In_       PKTRANSACTION Transaction,
  _Out_opt_  PFLT_CONTEXT *OldContext
);

Parameters

Instance [in]

Opaque instance pointer for the caller.

Transaction [in]

Opaque transaction pointer for the transaction whose context is being deleted.

OldContext [out, optional]

Pointer to a caller-allocated variable that receives the address of the deleted context. This parameter is optional and can be NULL. If OldContext is not NULL and does not point to NULL_CONTEXT, the caller is responsible for calling FltReleaseContext to release this context when it is no longer needed.

Return value

FltDeleteTransactionContext returns STATUS_SUCCESS or an appropriate NTSTATUS value such as the following:

Return codeDescription
STATUS_NOT_FOUND

No matching context was found. This is an error code.

 

Remarks

This routine is available on Windows Vista and later.

Because contexts are reference-counted, it is not usually necessary for a minifilter driver to call a routine such as FltDeleteTransactionContext to explicitly delete a context.

A minifilter driver calls FltDeleteTransactionContext to remove a context from a transaction and mark the context for deletion. The context is usually freed immediately unless there is an outstanding reference on it (for example, because the context is still being used by another thread).

To allocate a new transaction context, call FltAllocateContext.

To retrieve a transaction context, call FltGetTransactionContext.

To set a transaction context, call FltSetTransactionContext.

Requirements

Header

Fltkernel.h (include Fltkernel.h)

Library

FltMgr.lib

IRQL

<= APC_LEVEL

See also

FltAllocateContext
FltCommitComplete
FltDeleteContext
FltEnlistInTransaction
FltGetTransactionContext
FltPrepareComplete
FltPrePrepareComplete
FltReleaseContext
FltRollbackComplete
FltRollbackEnlistment
FltSetTransactionContext

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft