FwpmProviderContextSubscribeChanges0 (Compact 2013)
3/26/2014
This function is used to request the delivery of notifications regarding changes in a particular provider context.
Syntax
DWORD WINAPI FwpmProviderContextSubscribeChanges0(
__in HANDLE engineHandle,
__in const FWPM_PROVIDER_CONTEXT_SUBSCRIPTION0* subscription,
__in FWPM_PROVIDER_CONTEXT_CHANGE_CALLBACK0 callback,
__in_opt void* context,
__out HANDLE* changeHandle
);
Parameters
- engineHandle
A handle for an open session to the filter engine. Call FwpmEngineOpen0 to open a session to the filter engine.
- subscription
Pointer to a FWPM_PROVIDER_CONTEXT_SUBSCRIPTION0 structure used to restrict which notifications are delivered.
- callback
The FWPM_PROVIDER_CONTEXT_CHANGE_CALLBACK0 function pointer that is invoked when a notification is ready for delivery.
- context
Optional context pointer. This pointer is passed to the callback function along with details of the change.
- changeHandle
Address of a HANDLE variable. On function return, the HANDLE variable will contain a handle to the newly created subscription.
Return Value
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 topic 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.
The caller needs FWPM_ACTRL_SUBSCRIBE access to the provider context's container and FWPM_ACTRL_READ access to the provider context. The subscriber will only get notifications for provider contexts to which it has FWPM_ACTRL_READ access. See WFP Access Right Identifiers for more information.
Requirements
Header |
fwpmu.h |
Library |
fwpuclnt.dll |
See Also
Reference
WFP Provider Context Management
WFP Functions
WFP Management Functions
FwpmProviderContextAdd0
FwpmProviderContextCreateEnumHandle0
FwpmProviderContextDeleteById0
FwpmProviderContextDeleteByKey0
FwpmProviderContextDestroyEnumHandle0
FwpmProviderContextEnum0
FwpmProviderContextGetById0
FwpmProviderContextGetByKey0