FwpsvSwitchEventsSubscribe0 function (fwpsk.h)

The FwpsvSwitchEventsSubscribe0 function registers callback entry points for virtual switch layer events such as virtual port creation and deletion.

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

 

Syntax

NTSTATUS FwpsvSwitchEventsSubscribe0(
  const GUID                              *providerGuid,
  void                                    *notifyContext,
  UINT32                                  flags,
  void                                    *reserved,
  const FWPS_VSWITCH_EVENT_DISPATCH_TABLE *eventDispatchTable,
  UINT32                                  *subscriptionId
);

Parameters

providerGuid

The provider GUID.

notifyContext

An optional pointer to a callout driver–supplied context. Event notification functions pass this parameter back to the driver.

flags

Reserved. Set to zero.

reserved

Reserved. Set to zero.

eventDispatchTable

A pointer to an FWPS_VSWITCH_EVENT_DISPATCH_TABLE structure that defines the callback entry points for virtual switch layer events.

subscriptionId

A pointer to a variable that contains a unique identifier that WFP assigns to the subscription. The caller must return the subscription identifier to WFP with the FwpsvSwitchEventsUnsubscribe0 function.

Return value

The FwpsvSwitchEventsSubscribe0 function returns one of the following NTSTATUS codes.

Return code Description
STATUS_SUCCESS
A handle to the classify request was successfully returned. The variable that the classifyHandle parameter points to contains the handle for the classify request.
Other status codes
An error occurred.

Remarks

A callout driver calls the FwpsvSwitchEventsSubscribe0 function to register callback entry points for virtual switch layer events.

The entry points for the callback notification functions are specified in and FWPS_VSWITCH_EVENT_DISPATCH_TABLE0 structure.

The callout driver must later call FwpsvSwitchEventsUnsubscribe0 to free the system resources.

Requirements

Requirement Value
Minimum supported client Available starting with Windows 8.
Target Platform Universal
Header fwpsk.h (include Fwpsk.h)
Library Fwpkclnt.lib
IRQL <= PASSIVE_LEVEL

See also

FWPS_VSWITCH_EVENT_DISPATCH_TABLE0

FwpsvSwitchEventsUnsubscribe0