kangfucat
驱动牛犊
驱动牛犊
  • 注册日期2007-03-17
  • 最后登录2007-04-10
  • 粉丝0
  • 关注0
  • 积分80分
  • 威望9点
  • 贡献值0点
  • 好评度8点
  • 原创分0分
  • 专家分0分
阅读:1432回复:1

filemon编译出错

楼主#
更多 发布于:2007-03-27 21:20
  小弟刚刚接触文件过滤驱动开发,下载filemon用vc6.0编译后出现以下错误,麻烦各位大哥帮忙看一下,寻求解决方案,感激~~~~
Compiling...
FILEMON.C
c:\tddownload\filemon\exe\filemon.c(1988) : error C2220: warning treated as error - no object file generated
c:\tddownload\filemon\exe\filemon.c(1988) : warning C4013: 'SetWindowLongPtr' undefined; assuming extern returning int
c:\tddownload\filemon\exe\filemon.c(1989) : error C2065: 'GWLP_WNDPROC' : undeclared identifier
c:\tddownload\filemon\exe\filemon.c(1990) : error C2065: 'LONG_PTR' : undeclared identifier
c:\tddownload\filemon\exe\filemon.c(1990) : error C2146: syntax error : missing ')' before identifier 'ListViewSubclass'
c:\tddownload\filemon\exe\filemon.c(1990) : error C2059: syntax error : ')'
Error executing cl.exe.

Filemon.exe - 5 error(s), 1 warning(s)
出错的代码在这一行:
    // Sub-class
    ListViewWinMain = (WNDPROC) SetWindowLongPtr(hWndList,
                                                 GWLP_WNDPROC,
                                                 (LONG_PTR) ListViewSubclass);
kangfucat
驱动牛犊
驱动牛犊
  • 注册日期2007-03-17
  • 最后登录2007-04-10
  • 粉丝0
  • 关注0
  • 积分80分
  • 威望9点
  • 贡献值0点
  • 好评度8点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2007-03-28 00:07
在以前的帖子上找到了答案,在32位机器上用函数SetWindowLong函数即可,相应的参数改为:
    ListViewWinMain = (WNDPROC) SetWindowLong(hWndList,
                                                 GWL_ID,
                                                 (LONG) ListViewSubclass);

编译通过
游客

返回顶部