FwpsvSwitchEventsSubscribe0 function

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 NTAPI FwpsvSwitchEventsSubscribe0(
   _In_opt_ const GUID                          *providerGuid,
   _In_opt_ void                                *notifyContext,
   _In_ _Reserved_ UINT32                       flags,
   _In_ _Reserved_ void                         *reserved,
   _In_ const FWPS_VSWITCH_EVENT_DISPATCH_TABLE *eventDispatchTable,
   _Out_ 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 codeDescription
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

Target platform

Universal

Version

Available starting with Windows 8.

Header

Fwpsk.h (include Fwpsk.h)

Library

Fwpkclnt.lib

IRQL

<= PASSIVE_LEVEL

See also

FWPS_VSWITCH_EVENT_DISPATCH_TABLE0
FwpsvSwitchEventsUnsubscribe0

 

 

Send comments about this topic to Microsoft

Show: