I copied the sample program from WFP documentation.
https://learn.microsoft.com/en-us/windows/win32/api/fwpmu/nf-fwpmu-fwpmtransactionbegin0
I am using VS 2015.
Here is the output:
Opening filter engine.
Adding filter to permit traffic for Application 1.
FwpmFilterAdd0 failed (-2144206813).
Press any key to continue . . .
Can somebody help figure out the reason?
I just found the answer:
fwpFilter.displayData.name = L"some data";
This line was missing in the documentation.