FwpsFlowRemoveContext0 function (fwpsk.h)

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(
  [in] UINT64 flowId,
  [in] UINT16 layerId,
  [in] UINT32 calloutId
);

Parameters

[in] 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.

[in] 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.

[in] 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.
STATUS_PENDING
An active callout classification is in progress.
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

Requirement Value
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