[英]Windows Filtering Platform error
I am Very New to Windows Filtering Platform.. I am trying learn this.. I started with msdn website's code.. as here . 我是Windows过滤平台的新手。我正在尝试学习这个...我开始使用msdn网站的代码..就像这里一样 。 I tried to compile the code and I got 13 errors which were in header file "fwptypes.h" .
我试图编译代码,我得到13个错误,这些错误在头文件“fwptypes.h”中。 I dont know how to resolve this .. Any Suggestion.. Here is the error IMG
我不知道如何解决这个..任何建议..这是错误IMG
For eliminating the first error (precompiled header), there are three ways: 为消除第一个错误(预编译头),有三种方法:
Or 2. Copying the demo code into a header file instead of cpp file. 或2.将演示代码复制到头文件而不是cpp文件中。
Or 3. Add "stdafx.h" in front of demo code. 或3.在演示代码前添加“stdafx.h”。
For other compile errors, try this (this solution comes from http://social.msdn.microsoft.com/Forums/en-US/wfp/thread/8fd93a3d-a794-4233-9ff7-09b89eed6b1f , I tested, it works): 对于其他编译错误,试试这个(此解决方案来自http://social.msdn.microsoft.com/Forums/en-US/wfp/thread/8fd93a3d-a794-4233-9ff7-09b89eed6b1f ,我测试过,它的工作原理) :
There is a bug in the header files (extra line spaces). 头文件中有一个错误(额外的行空格)。 You can modify your copies directly:
您可以直接修改副本:
FwpTypes.h @ line 275: FwpTypes.h @第275行:
#define FWP_ACTION_BLOCK \
(0x00000001 | FWP_ACTION_FLAG_TERMINATING)
#define FWP_ACTION_PERMIT \
(0x00000002 | FWP_ACTION_FLAG_TERMINATING)
#define FWP_ACTION_CALLOUT_TERMINATING \
(0x00000003 | FWP_ACTION_FLAG_CALLOUT | FWP_ACTION_FLAG_TERMINATING)
#define FWP_ACTION_CALLOUT_INSPECTION \
(0x00000004 | FWP_ACTION_FLAG_CALLOUT | FWP_ACTION_FLAG_NON_TERMINATING)
#define FWP_ACTION_CALLOUT_UNKNOWN \
(0x00000005 | FWP_ACTION_FLAG_CALLOUT)
#define FWP_ACTION_CONTINUE \
(0x00000006 | FWP_ACTION_FLAG_NON_TERMINATING)
#define FWP_ACTION_NONE \
(0x00000007)
#define FWP_ACTION_NONE_NO_MATCH \
(0x00000008)
FwpTypes.h @ line 343 FwpTypes.h @第343行
#define FWP_FILTER_ENUM_VALID_FLAGS \
(FWP_FILTER_ENUM_FLAG_BEST_TERMINATING_MATCH | \
FWP_FILTER_ENUM_FLAG_SORTED)
IkeTypes.h @ line 367 IkeTypes.h @第367行
#define IKEEXT_ERROR_CODE_COUNT \
(ERROR_IPSEC_IKE_NEG_STATUS_END - ERROR_IPSEC_IKE_NEG_STATUS_BEGIN)
You can use WinDivert open source WFP callout driver . 您可以使用WinDivert开源WFP标注驱动程序。
WinDivert essentially passes the packets to the underlying Windows Filtering Platform (WFP) packet injection functions. WinDivert本质上将数据包传递给基础Windows过滤平台(WFP)数据包注入功能。
check out this link for more information .. http://reqrypt.org/windivert.html 查看此链接以获取更多信息.. http://reqrypt.org/windivert.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.