FwpmProviderContextSubscribeChanges0 function
The FwpmProviderContextSubscribeChanges0 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 [in]
-
Type: HANDLE
Handle for an open session to the filter engine. Call FwpmEngineOpen0 to open a session to the filter engine.
- subscription [in]
-
Type: const FWPM_PROVIDER_CONTEXT_SUBSCRIPTION0*
The notifications to be delivered.
- callback [in]
-
Type: FWPM_PROVIDER_CONTEXT_CHANGE_CALLBACK0
Function pointer that will be invoked when a notification is ready for delivery.
- context [in, optional]
-
Type: void*
Optional context pointer. This pointer is passed to the callback function along with details of the change.
- changeHandle [out]
-
Type: HANDLE*
Handle to the newly created subscription.
Return value
Type: DWORD
| Return code/value | Description |
|---|---|
|
The subscription was created successfully. |
|
A Windows Filtering Platform (WFP) specific error. See WFP Error Codes for details. |
|
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 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 Access Control for more information.
FwpmProviderContextSubscribeChanges0 is a specific implementation of FwpmProviderContextSubscribeChanges. See WFP Version-Independent Names and Targeting Specific Versions of Windows for more information.
Requirements
|
Minimum supported client | Windows Vista [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2008 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 11/14/2012