FwpsFlowRemoveContext0 function

The FwpsFlowRemoveContext0 function removes a previously associated context from a data flow.

Note  FwpsFlowRemoveContext0 is a specific version of FwpsFlowRemoveContext. See WFP Version-Independent Names and Targeting Specific Versions of Windows for more information.
 

Syntax

NTSTATUS FwpsFlowRemoveContext0(
  UINT64 flowId,
  UINT16 layerId,
  UINT32 calloutId
);

Parameters

flowId

A run-time identifier that specifies the data flow from which to remove the context. The run-time identifier for a data flow is provided to a callout driver through the FWPS_METADATA_FIELD_FLOW_HANDLE metadata value that was passed to the callout driver's classifyFn callout function.

layerId

The run-time identifier for the filtering layer from which the context is being removed. For more information, see Run-time Filtering Layer Identifiers. A callout driver should specify the same identifier that it specified when it called the FwpsFlowAssociateContext0 function to associate the context with the data flow.

calloutId

The run-time identifier for the callout in the filter engine. This identifier was returned when the callout driver called either the FwpsCalloutRegister0 or FwpsCalloutRegister1 functions to register the callout with the filter engine.

Return Value

The FwpsFlowRemoveContext0 function returns one of the following NTSTATUS codes.

Return code Description
STATUS_SUCCESS
The context was successfully removed from the data flow.
STATUS_UNSUCCESSFUL
There is no context currently associated with the data flow.
Other status codes
An error occurred.

Remarks

If the FwpsFlowRemoveContext0 function returns STATUS_SUCCESS, FwpsFlowRemoveContext0 calls the flowDeleteFn callout function synchronously. If FwpsFlowRemoveContext0 returns STATUS_PENDING, FwpsFlowRemoveContext0 calls flowDeleteFn asynchronously because an active callout classification is in progress.

Requirements

   
Minimum supported client Available starting with Windows Vista.
Target Platform Universal
Header fwpsk.h (include Fwpsk.h)
Library Fwpkclnt.lib
IRQL "<= DISPATCH_LEVEL"

See Also

FwpsCalloutRegister0

FwpsCalloutRegister1

FwpsFlowAssociateContext0

classifyFn

flowDeleteFn