Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
3/26/2014
This function registers a callout with theWFP Filter Engine. A callout driver can register a callout with the filter engine at any time, even if the filter engine is currently not running.
Syntax
NTSTATUS NTAPI
FwpsCalloutRegister0(
IN OUT void *deviceObject,
IN const FWPS_CALLOUT0 *callout,
OUT OPTIONAL UINT32 *calloutId
);
Parameters
- deviceObject
A pointer to a device object that was previously created by the callout driver.
- callout
A pointer to a constant FWPS_CALLOUT0 structure that contains the data required to register the callout with the WFP Filter Engine
- calloutId
A pointer to a UINT32-typed variable that receives a run-time identifier. This identifies the callout in the filter engine. The callout driver passes this identifier to the FwpsCalloutUnregisterById0 function when unregistering the callout from the filter engine. The filter engine also passes this identifier to the callout's flowDeleteFn callout function. This parameter is optional and can be NULL
Return Value
The FwpsCalloutRegister0 function returns one of the following NTSTATUS codes:
Value |
Description |
|---|---|
STATUS_SUCCESS |
The callback function was successfully registered by using the filter engine. |
STATUS_FWP_ALREADY_EXISTS |
The callout could not be registered by using the filter engine because a callout is already registered in the filter engine that has the same GUID. The GUID is specified in the calloutKey member of the FWPS_CALLOUT0 structure pointed to by the callout parameter. |
Other status codes |
An error occurred. |
Remarks
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 case, filters with an action type of FWP_ACTION_CALLOUT_TERMINATING or FWP_ACTION_CALLOUT_UNKNOWN are treated as FWP_ACTION_BLOCK. Filters with an action type of FWP_ACTION_CALLOUT_INSPECTION are ignored until the callout is registered by using the filter engine.
A callout driver unregisters a callout from the filter engine by calling either the FwpsCalloutUnregisterById0 function or the FwpsCalloutUnregisterByKey0 function. A callout driver cannot be unloaded until all callouts that were previously registered by using the filter engine are successfully unregistered.
Requirements
Header |
fwpsk.h |
See Also
Reference
Functions Called by Callout Drivers
FWPS_CALLOUT0
FwpsCalloutUnregisterById0
FwpsCalloutUnregisterByKey0
FwpsFlowAssociateContext0
FwpsFlowRemoveContext0
FwpsStreamInjectAsync0
flowDeleteFn
WFP Callout Driver Functions