vs2010 + DDK + 开发驱动入门

来源:互联网 发布:软件项目质量管理体系 编辑:程序博客网 时间:2024/06/06 10:59

http://bbs.csdn.net/topics/360205984

http://www.programmingnotes.org/post/2012-11-05/40041741872  这个不错,

http://blog.csdn.net/skyseacsn/article/details/7814663    这个也讲得不错

 

http://blog.csdn.net/spiderlily/article/details/8223181

.此外在#include “ntddk.h"时,会报一个这样的错"No target architecture defined" wdm.h,这个查wdm.h这个文件,有如下的定义:

#if !(defined(_X86_) || defined(_AMD64_) || defined(_IA64_))

#error "No target architecture defined"

#endif

所以我就在#include "ntddk.h"之前加上了如下几行代码:

#if !(defined(_X86_) || defined(_AMD64_) || defined(_IA64_))
#define _X86_ // Intel公司提供的 X86系列CPU
#endif

http://bbs.csdn.net/topics/360205984

 

 

注意: msvcrt.lib 这个库别忘了在链接器的输入那里包含进去,否则 会出现

1>Driver.obj : warning LNK4075: 忽略“/EDITANDCONTINUE”(由于“/DRIVER”规范)
1>Driver.obj : error LNK2019: 无法解析的外部符号 __RTC_CheckEsp,该符号在函数 _DriverEntry@8 中被引用
1>Driver.obj : error LNK2001: 无法解析的外部符号 __RTC_Shutdown
1>Driver.obj : error LNK2001: 无法解析的外部符号 __RTC_InitBase
1>Driver.obj : error LNK2019: 无法解析的外部符号 @_RTC_CheckStackVars@8,该符号在函数 "long __stdcall CreateDevice(struct _DRIVER_OBJECT *)" (?CreateDevice@@YGJPAU_DRIVER_OBJECT@@@Z) 中被引用
1>c:\users\benben_wsx\documents\visual studio 2010\Projects\DriverDev_2\Debug\DriverDev_2.sys : fatal error LNK1120: 4 个无法解析的外部命令

 

 

原创粉丝点击