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"