FwpmCalloutAdd0 function (fwpmu.h)
The FwpmCalloutAdd0 function adds a new callout object to the system.
DWORD FwpmCalloutAdd0( [in] HANDLE engineHandle, [in] const FWPM_CALLOUT0 *callout, [in, optional] PSECURITY_DESCRIPTOR sd, [out, optional] UINT32 *id );
Handle for an open session to the filter engine. Call FwpmEngineOpen0 to open a session to the filter engine.
The callout object to be added.
[in, optional] sd
The security information associated with the callout.
[out, optional] id
Runtime identifier for this callout.
||The callout was successfully added.|
||FWPM_TUNNEL_FLAG_POINT_TO_POINT was not set and conditions other than local/remote address were specified.|
||A Windows Filtering Platform (WFP) specific error. See WFP Error Codes for details.|
||Failure to communicate with the remote or local firewall engine.|
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.
FwpmCalloutAdd0 is a specific implementation of FwpmCalloutAdd. See WFP Version-Independent Names and Targeting Specific Versions of Windows for more information.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|