引用fwpsk.h 异常解决方式

来源:互联网 发布:域名代理平台 编辑:程序博客网 时间:2024/05/16 19:50


1>C:\WinDDK\7600.16385.1\inc\api\fwpsk.h(1693): error C2065: “NET_BUFFER_LIST”: 未声明的标识符
1>C:\WinDDK\7600.16385.1\inc\api\fwpsk.h(1693): error C2065: “packetList”: 未声明的标识符
1>C:\WinDDK\7600.16385.1\inc\api\fwpsk.h(1694): error C2275: “UINT32”: 将此类型用作表达式非法
1>          C:\WinDDK\7600.16385.1\inc\api\basetsd.h(82) : 参见“UINT32”的声明
1>C:\WinDDK\7600.16385.1\inc\api\fwpsk.h(1694): error C2146: 语法错误: 缺少“)”(在标识符“queryFlags”的前面)
1>C:\WinDDK\7600.16385.1\inc\api\fwpsk.h(1694): warning C4229: 使用了记时错误: 忽略数据上的修饰符
1>          C:\WinDDK\7600.16385.1\inc\api\basetsd.h(82) : 参见“UINT32”的声明
1>C:\WinDDK\7600.16385.1\inc\api\fwpsk.h(1696): error C2059: 语法错误:“)”
1>C:\WinDDK\7600.16385.1\inc\api\fwpsk.h(1717): error C2061: 语法错误: 标识符“PNET_BUFFER_LIST”
1>C:\WinDDK\7600.16385.1\inc\api\fwpsk.h(1902): error C2061: 语法错误: 标识符“NET_BUFFER_LIST”
1>C:\WinDDK\7600.16385.1\inc\api\fwpsk.h(1916): error C2061: 语法错误: 标识符“NET_BUFFER_LIST”
1>C:\WinDDK\7600.16385.1\inc\api\fwpsk.h(1923): error C2065: “NET_BUFFER_LIST”: 未声明的标识符
1>C:\WinDDK\7600.16385.1\inc\api\fwpsk.h(1924): error C2065: “netBufferList”: 未声明的标识符
1>C:\WinDDK\7600.16385.1\inc\api\fwpsk.h(1924): warning C4229: 使用了记时错误: 忽略数据上的修饰符
1>C:\WinDDK\7600.16385.1\inc\api\fwpsk.h(1924): error C2182: “FwpsFreeNetBufferList0”: 非法使用“void”类型
1>C:\WinDDK\7600.16385.1\inc\api\fwpsk.h(1930): error C2065: “NET_BUFFER_LIST”: 未声明的标识符


解决方式:


参见定义:

// 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



通常是NDIS5 升NDIS6 时定义错误或没有定义 “预处理器” NDISxxx

例如使用NDIS6时 在 “预处理器” 加入 NDIS60即可


1 0