FwpmCalloutAdd0 function

The FwpmCalloutAdd0 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 [in]

Type: HANDLE

Handle for an open session to the filter engine. Call FwpmEngineOpen0 to open a session to the filter engine.

callout [in]

Type: const FWPM_CALLOUT0*

The callout object to be added.

sd [in, optional]

Type: PSECURITY_DESCRIPTOR

The security information associated with the callout.

id [out, optional]

Type: UINT32*

Runtime identifier for this callout.

Return value

Type: DWORD

Return code/valueDescription
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. See Object Management for more information about transactions.

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 Access Control for more information.

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

  • Call FwpsCalloutRegister (documented in the Windows Driver Kit (WDK)), to register the callout with the filter engine.
  • Call FwpmCalloutAdd0 to add the callout to the system.
  • 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.

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

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Fwpmu.h

Library

Fwpuclnt.lib

DLL

Fwpuclnt.dll

See also

Kernel-Mode FwpmCalloutAdd0
FWPM_CALLOUT0

 

 

Show: