FwpmCalloutAdd0 function

The FwpmCalloutAdd0 function adds a callout to the filter engine.

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

Syntax

NTSTATUS FwpmCalloutAdd0(
  HANDLE               engineHandle,
  const FWPM_CALLOUT0  *callout,
  PSECURITY_DESCRIPTOR sd,
  UINT32               *id
);

Parameters

engineHandle

A handle for an open session to the filter engine. A callout driver calls the FwpmEngineOpen0 function to open a session to the filter engine.

callout

A pointer to a constant FWPM_CALLOUT0 structure that contains the data that is required to add the callout to the filter engine.

sd

A pointer to a constant SECURITY_DESCRIPTOR structure that describes the security descriptor for the callout that is being added to the filter engine. This parameter is optional and can be NULL.

id

A pointer to a UINT32-typed variable that receives a run-time identifier that identifies the callout in the filter engine. This is the same identifier that is returned when a callout driver registers the callout driver's callout functions with the filter engine. The callout driver passes this identifier to the FwpmCalloutDeleteById0 function when removing the callout from the filter engine. This parameter is optional and can be NULL.

Return Value

The FwpmCalloutAdd0 function returns one of the following NTSTATUS codes:

Return code Description
STATUS_SUCCESS
The callout was successfully added to the filter engine.
STATUS_FWP_ALREADY_EXISTS
The callout could not be added to the filter engine. A callout already exists in the filter engine with an identifier identical to the GUID specified in the calloutKey member of the FWPM_CALLOUT0 structure pointed to by the callout parameter.
Other status codes
An error occurred.

Remarks

A callout driver calls the FwpmCalloutAdd0 function to add a callout to the filter engine.

Callout drivers do not typically add their callouts to the filter engine. In most situations this is handled by a user-mode Windows Filtering Platform management application.

A callout and filters that specify the callout for the filter's action can be added to the filter engine before a callout driver registers the callout with the filter engine. 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 until the callout is registered with the filter engine.

Requirements

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

See Also

FWPM_CALLOUT0

FwpmCalloutDeleteById0

FwpmCalloutDeleteByKey0

FwpmEngineOpen0

Types of Callouts