当前位置: 代码迷 >> 驱动开发 >> win7 miniflter 门类定义
  详细解决方案

win7 miniflter 门类定义

热度:47   发布时间:2016-04-28 10:42:22.0
win7 miniflter 类型定义
C/C++ code
typedef struct _MINI_NOTIFICATION{    bool  isFile;    char file_name[260];}SCANNER_NOTIFICATION,*PSCANNER_NOTIFICATION;

错误如下:
1>h:\sys\filterstruct.h(6) : error C2016: C requires that a struct or union has at least one member
1>h:\sys\filterstruct.h(6) : error C2061: syntax error : identifier 'bool'
1>h:\sys\filterstruct.h(8) : error C2059: syntax error : '}'

如果将isFile改成其它类型(int)就没有错误

文件中凡是有bool的地方都有错误 如:
C/C++ code
BOOL GetFileName(PFLT_FILE_NAME_INFORMATION *fileInfo,ANSI_STRING **ansiFile);

C/C++ code
1>h:\sys\minifilter.c(16) : error C2061: syntax error : identifier 'GetFileName'1>h:\sys\minifilter.c(16) : error C2059: syntax error : ';'1>h:\sys\minifilter.c(16) : error C2059: syntax error : 'type'1>h:\sys\minifilter.c(17) : error C2146: syntax error : missing ')' before identifier 'isFile'1>h:\sys\minifilter.c(17) : error C2081: 'bool' : name in formal parameter listillegal1>h:\sys\minifilter.c(17) : error C2061: syntax error : identifier 'isFile'1>h:\sys\minifilter.c(17) : error C2059: syntax error : ';'1>h:\sys\minifilter.c(17) : error C2059: syntax error : ','1>h:\sys\minifilter.c(17) : error C2059: syntax error : ')'
  相关解决方案