FwpmNetEventSubscribe1 function (fwpmu.h)
The FwpmNetEventSubscribe1 function is used to request the delivery of notifications regarding a particular net event.
DWORD FwpmNetEventSubscribe1( HANDLE engineHandle, const FWPM_NET_EVENT_SUBSCRIPTION0 *subscription, FWPM_NET_EVENT_CALLBACK1 callback, void *context, HANDLE *eventsHandle );
Handle for an open session to the filter engine. Call FwpmEngineOpen0 to open a session to the filter engine.
The notifications which will be delivered.
Function pointer that will be invoked when a notification is ready for delivery.
Optional context pointer. This pointer is passed to the callback function along with details of the event.
Handle to the newly created subscription.
||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.|
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 net event's container.
|Minimum supported client||Windows 8 [desktop apps only]|
|Minimum supported server||Windows Server 2012 [desktop apps only]|