FwpsCalloutUnregisterByKey0 function

The FwpsCalloutUnregisterByKey0 function unregisters a callout from the filter engine.

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

Syntax

NTSTATUS FwpsCalloutUnregisterByKey0(
  const GUID *calloutKey
);

Parameters

calloutKey

A pointer to a GUID that uniquely identifies the callout that is being unregistered from the filter engine. This must be a pointer to the same GUID that was specified when the callout driver called either the FwpsCalloutRegister0 or FwpsCalloutRegister1 functions to register the callout with the filter engine.

Return Value

The FwpsCalloutUnregisterByKey0 function returns one of the following NTSTATUS codes.

Return code Description
STATUS_SUCCESS
The callout was successfully unregistered from the filter engine.
STATUS_DEVICE_BUSY
There are one or more data flows being processed by the callout that have an outstanding context associated with the data flow. A callout driver must call the FwpsFlowRemoveContext0 function for each of these data flows to remove the associated context. After the context has been successfully removed from each of these data flows, the callout driver must call the FwpsCalloutUnregisterByKey0 function again to finish unregistering the callout from the filter engine.
STATUS_FWP_CALLOUT_NOT_FOUND
There is not a callout registered with the filter engine that matches the GUID specified in the calloutKey parameter.
STATUS_FWP_IN_USE
The callout is already in the process of being registered or unregistered in another thread.
Other status codes
An error occurred.

Remarks

A callout driver calls the FwpsCalloutUnregisterByKey0 function to unregister a callout from the filter engine, using the GUID key to identify the callout to be unregistered. This function succeeds even if there are filters in the filter engine that specify the callout for the filter's action. In this situation, filters with an action type of FWP_ACTION_CALLOUT_TERMINATING or FWP_ACTION_CALLOUT_UNKNOWN are treated as FWP_ACTION_BLOCK, and filters with an action type of FWP_ACTION_CALLOUT_INSPECTION are ignored after the callout has been deregistered from the filter engine.

A callout driver cannot be unloaded until all of the callouts that were previously registered with the filter engine have been successfully unregistered.

Requirements

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

See Also

FwpsCalloutRegister0

FwpsCalloutRegister1

FwpsCalloutUnregisterById0

FwpsFlowRemoveContext0

Types of Callouts