How to apply filter rules using WFP Api in case of a service restart

Prokash Sinha 81 Reputation points
2022-04-04T14:37:40.33+00:00

If the service executable restarts due to exception or other error, and it restarts while Filter rules are being programmed, How to add the rules that are already programmed. ?

Or does it have to start from the beginning. Restarting from scratch looks like an option, but it will populate duplicate rules.

Thanks,
Prokash

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,470 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jeanine Zhang-MSFT 9,346 Reputation points Microsoft Vendor
    2022-04-05T02:04:59.307+00:00

    Hi,

    Welcome to Microsoft Q&A!

    As far as I'm concerned, you should start from the beginning.

    About the components into which the Windows Filtering Platform (WFP) API is divided, I suggest you could refer to the Doc: https://learn.microsoft.com/en-us/windows/win32/fwp/api-sets

    If you want to add the rules that are already programmed when the service executable restarts due to exception or other error via WFP API, as far as I'm concerned it is impossible.

    Best Regards,

    Jeanine


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.