鱼C论坛

 找回密码
 立即注册
查看: 3674|回复: 1

DDK编译时出现错误

[复制链接]
发表于 2012-12-28 13:11:57 | 显示全部楼层 |阅读模式
4鱼币
编译时出现错误
  1. extern "C"
  2. {
  3. #include <ntddk.h>//头文件
  4. }
  5. VOID DDK_delete (IN PDRIVER_OBJECT p) //卸载函数
  6. {
  7. DbgPrint("卸载成功");//调试信息
  8. }
  9. extern "C" int DriverEntry(PDRIVER_OBJECT p,PUNICODE_STRING t)//主函数
  10. {

  11. p->DriverUnload=DDK_delete; //调用卸载函数
  12. return 1;
  13. }
复制代码

错误信息
errors in directory c:\winddk
0.c(1) : error C2059: syntax error : 'string'
3790.1830\inc\ddk\w2k\ntddk.h(2087) : error C2059: syntax error : 'bad suffix on
number'
0.c(5) : error C2146: syntax error : missing ')' before identifier 'p'
0.c(5) : error C2144: syntax error : '<Unknown>' should be preceded by '<Unknown
>'
0.c(5) : error C2144: syntax error : '<Unknown>' should be preceded by '<Unknown
>'
0.c(5) : error C2143: syntax error : missing ')' before 'identifier'
0.c(5) : error C2061: syntax error : identifier 'p'
0.c(5) : error C2059: syntax error : ';'
0.c(5) : error C2059: syntax error : ')'
0.c(6) : error C2449: found '{' at file scope (missing function header?)
0.c(8) : error C2059: syntax error : '}'
BUILD: Compile errors: not linking c:\winddk directory
BUILD: Done
    2 files compiled - 11 Errors

那里错了

小甲鱼最新课程 -> https://ilovefishc.com
发表于 2012-12-28 21:08:20 | 显示全部楼层
我试了,程序并没有错,我想应该是DDK配置出了问题。not linking c:\winddk directory
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-8-10 16:18

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表