Share via


FwpmCalloutAdd0 (Compact 2013)

3/26/2014

This function adds a new callout object to the system.

Syntax

DWORD WINAPI FwpmCalloutAdd0(
  __in       HANDLE engineHandle,
  __in       const FWPM_CALLOUT0* callout,
  __in_opt   PSECURITY_DESCRIPTOR sd,
  __out_opt  UINT32* id
);

Parameters

  • engineHandle
    Handle for an open session to the filter engine. Call the FwpmEngineOpen0 function to open a session to the filter engine.
  • callout
    Address of an FWPM_CALLOUT0 structure that describes the callout object to be added
  • sd
    Pointer to a SECURITY_DESCRIPTOR structure
  • id
    Pointer to a variable that receives a runtime identifier for this callout

Return Value

Return code / value

Description

ERROR_SUCCESS

0

The callout was successfully added

FWP_E_INVALID_PARAMETER

0x80320035

FWPM_TUNNEL_FLAG_POINT_TO_POINT was not set and conditions other than local/remote address were specified

FWP_E_* error code

0x80320001-0x80320039

A Windows Filtering Platform (WFP)-specific error. See WFP Error Codes for details.

RPC_* error code

0x80010001-0x80010122

Failure to communicate with the remote or local firewall engine

Remarks

Some fields in the FWPM_CALLOUT0 structure are assigned by the system, not the caller, and are ignored in the call to FwpmCalloutAdd0. If the caller supplies a null security descriptor, the system will assign a default security descriptor.

This function cannot be called from within a read-only transaction. It will fail with FWP_E_INCOMPATIBLE_TXN.

The caller needs FWPM_ACTRL_ADD access to the callout's container, FWPM_ACTRL_ADD_LINK access to the provider (if any), and FWPM_ACTRL_ADD_LINK access to the applicable layer. See WFP Access Right Identifiers for more information.

To add a filter that references a callout, invoke the functions in the following order.

  1. Call FwpsCalloutRegister (documented in the Windows Driver Kit), to register the callout with the filter engine.
  2. Call FwpmCalloutAdd0 to add the callout to the system.
  3. Call FwpmFilterAdd0 to add the filter that references the callout to the system.

By default, filters that reference callouts that have been added but have not yet registered with the filter engine are treated as Block filters.

Requirements

Header

fwpmu.h

Library

fwpuclnt.dll

See Also

Reference

WFP Callout Management
WFP Management Functions

Other Resources

Windows Filtering Platform