wfp 驱动编译报错 解决方案.

37 篇文章 0 订阅
C:\Program Files (x86)\Windows Kits\8.0\Include\KM\fwpsk.h(2075): error C2065: “NET_BUFFER_LIST”: 未声明的标识符
1>C:\Program Files (x86)\Windows Kits\8.0\Include\KM\fwpsk.h(2075): error C2065: “packetList”: 未声明的标识符
1>C:\Program Files (x86)\Windows Kits\8.0\Include\KM\fwpsk.h(2076): error C2275: “UINT32”: 将此类型用作表达式非法
1>          C:\Program Files (x86)\Windows Kits\8.0\Include\shared\basetsd.h(76) : 参见“UINT32”的声明
1>C:\Program Files (x86)\Windows Kits\8.0\Include\KM\fwpsk.h(2076): error C2146: 语法错误: 缺少“)”(在标识符“queryFlags”的前面)
1>C:\Program Files (x86)\Windows Kits\8.0\Include\KM\fwpsk.h(2076): warning C4229: 使用了记时错误: 忽略数据上的修饰符
1>C:\Program Files (x86)\Windows Kits\8.0\Include\KM\fwpsk.h(2076): error C2078: 初始值设定项太多
1>          C:\Program Files (x86)\Windows Kits\8.0\Include\shared\basetsd.h(76) : 参见“UINT32”的声明
1>C:\Program Files (x86)\Windows Kits\8.0\Include\KM\fwpsk.h(2078): error C2059: 语法错误:“)”
1>C:\Program Files (x86)\Windows Kits\8.0\Include\KM\fwpsk.h(2099): error C2061: 语法错误: 标识符“PNET_BUFFER_LIST”
1>C:\Program Files (x86)\Windows Kits\8.0\Include\KM\fwpsk.h(2299): error C2061: 语法错误: 标识符“NET_BUFFER_LIST”
1>C:\Program Files (x86)\Windows Kits\8.0\Include\KM\fwpsk.h(2313): error C2061: 语法错误: 标识符“NET_BUFFER_LIST”
1>C:\Program Files (x86)\Windows Kits\8.0\Include\KM\fwpsk.h(2320): error C2065: “NET_BUFFER_LIST”: 未声明的标识符
1>C:\Program Files (x86)\Windows Kits\8.0\Include\KM\fwpsk.h(2321): error C2065: “netBufferList”: 未声明的标识符
1>C:\Program Files (x86)\Windows Kits\8.0\Include\KM\fwpsk.h(2321): warning C4229: 使用了记时错误: 忽略数据上的修饰符
1>C:\Program Files (x86)\Windows Kits\8.0\Include\KM\fwpsk.h(2321): error C2182: “FwpsFreeNetBufferList0”: 非法使用“void”类型

1>C:\Program Files (x86)\Windows Kits\8.0\Include\KM\fwpsk.h(2321): fatal error C1903: 无法从以前的错误中恢复;正在停止编译



解决办法:





// TODO: Specify which version of the NDIS contract you will use here.
// In many cases, 6.0 is the best choice.  You only need to select a later
// version if you need a feature that is not available in 6.0.
//
// Legal values include:
//    6.0  Available starting with Windows Vista RTM
//    6.1  Available starting with Windows Vista SP1 / Windows Server 2008
//    6.20 Available starting with Windows 7 / Windows Server 2008 R2
//    6.30 Available starting with Windows 8 / Windows Server "8"

#define FILTER_MAJOR_NDIS_VERSION   6

#if defined(NDIS60)
#define FILTER_MINOR_NDIS_VERSION   0
#elif defined(NDIS620)
#define FILTER_MINOR_NDIS_VERSION   20
#elif defined(NDIS630)
#define FILTER_MINOR_NDIS_VERSION   30
#endif



然后在 项目 属性 预定义处理器 中 定义  NDISxxx






// TODO: Specify which version of the NDIS contract you will use here.
// In many cases, 6.0 is the best choice.  You only need to select a later
// version if you need a feature that is not available in 6.0.
//
// Legal values include:
//    6.0  Available starting with Windows Vista RTM
//    6.1  Available starting with Windows Vista SP1 / Windows Server 2008
//    6.20 Available starting with Windows 7 / Windows Server 2008 R2
//    6.30 Available starting with Windows 8 / Windows Server "8"
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值