Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

FltDeleteInstanceContext function

FltDeleteInstanceContext removes a context from a given instance and marks the context for deletion.

Syntax


NTSTATUS FltDeleteInstanceContext(
  _In_   PFLT_INSTANCE Instance,
  _Out_  PFLT_CONTEXT *OldContext
);

Parameters

Instance [in]

Opaque instance pointer for the instance.

OldContext [out]

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

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

Return codeDescription
STATUS_FLT_DELETING_OBJECT

The specified Instance is being torn down. This is an error code.

STATUS_NOT_FOUND

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

 

Remarks

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

A minifilter driver calls FltDeleteInstanceContext to remove a context from an instance 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 context, call FltAllocateContext.

To get an instance context, call FltGetInstanceContext.

To set an instance context, call FltSetInstanceContext.

Requirements

Header

Fltkernel.h (include Fltkernel.h)

Library

FltMgr.lib

IRQL

<= APC_LEVEL

See also

FltAllocateContext
FltDeleteContext
FltGetInstanceContext
FltReleaseContext
FltSetInstanceContext

 

 

Send comments about this topic to Microsoft

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.