FwpmFilterSubscribeChanges0 function (fwpmu.h)

The FwpmFilterSubscribeChanges0 function is used to request the delivery of notifications regarding changes in a particular filter.

Syntax

DWORD FwpmFilterSubscribeChanges0(
  [in]           HANDLE                          engineHandle,
  [in]           const FWPM_FILTER_SUBSCRIPTION0 *subscription,
  [in]           FWPM_FILTER_CHANGE_CALLBACK0    callback,
  [in, optional] void                            *context,
  [out]          HANDLE                          *changeHandle
);

Parameters

[in] engineHandle

Type: HANDLE

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

[in] subscription

Type: FWPM_FILTER_SUBSCRIPTION0*

The notifications to be delivered.

[in] callback

Type: FWPM_FILTER_CHANGE_CALLBACK0

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

[in, optional] context

Type: void*

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

[out] changeHandle

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

Subscribers do not receive notifications for changes made with the same session handle used to subscribe. This is because subscribers only need to see changes made by others since they already know which changes they made themselves.

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.

The caller needs FWPM_ACTRL_SUBSCRIBE access to the filter's container and FWPM_ACTRL_READ access to the filter. The subscriber will only get notifications for filters to which it has FWPM_ACTRL_READ access. See Access Control for more information.

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

Requirements

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

See also

FWPM_FILTER_CHANGE_CALLBACK0

FWPM_FILTER_SUBSCRIPTION0

FwpmFilterUnsubscribeChanges0