FwpmSystemPortsSubscribe0 function

The FwpmSystemPortsSubscribe0 function is used to request the delivery of notifications regarding a particular system port.

Syntax

DWORD FwpmSystemPortsSubscribe0(
  HANDLE                      engineHandle,
  void                        *reserved,
  FWPM_SYSTEM_PORTS_CALLBACK0 callback,
  void                        *context,
  HANDLE                      *sysPortsHandle
);

Parameters

engineHandle

Type: HANDLE

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

reserved

Type: void*

Reserved.

callback

Type: FWPM_SYSTEM_PORTS_CALLBACK0

Function pointer that will be invoked when a notification is ready for delivery.

context

Type: void*

Optional context pointer. This pointer is passed to the callback function along with details of the system port.

sysPortsHandle

Type: HANDLE*

Handle to the newly created subscription.

Return Value

Type: DWORD

Return code/value Description
ERROR_SUCCESS
0
The subscription was created successfully.
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

This function cannot be called from within a transaction. It will fail with FWP_E_TXN_IN_PROGRESS. See Object Management for more information about transactions.

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

Requirements

   
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header fwpmu.h
Library Fwpuclnt.lib
DLL Fwpuclnt.dll

See Also

FWPM_SYSTEM_PORTS_CALLBACK0

FwpmSystemPortsUnsubscribe0