mengyy
驱动牛犊
驱动牛犊
  • 注册日期2001-09-20
  • 最后登录2002-02-19
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1611回复:5

为什么我用MFC创建的工程不能调用DDK函数?

楼主#
更多 发布于:2002-02-01 10:03
DDK函数CM_LOCATE_DEVNODE在cfgmgr32.lib中,我在工程中包括了这个lib,可是还是出现link错误,找不到这个函数.甚至我把这个lib拷贝到工程目录下,还是找不到,不知这是怎么回事?
注:在98下使用. :(
blue
驱动大牛
驱动大牛
  • 注册日期2001-04-25
  • 最后登录2010-10-15
  • 粉丝0
  • 关注0
  • 积分55分
  • 威望12点
  • 贡献值0点
  • 好评度4点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2002-02-01 10:25
拜托:
MFC创建的是应用程序,是运行在应用层,Ring-3;
而DDK是开发驱动程序的,是运行在Kernel Mode,Ring-0。
建议你先把这里的内容看一遍。
WindThruEars
驱动老牛
驱动老牛
  • 注册日期2002-11-17
  • 最后登录2004-07-10
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2002-02-01 10:43
heihei, I FU LE you!

CM_Locate_DevNode is of course a Win32 API instead of Kernel API. It\'s blue instead of poor mengyy who should read more documentation.

I onced used cfgmgr32 API. SDK and DDK all ship cfgmgr32 API but they are different. Usually should use the API shipped with DDK. But it\'s trouble to build it by VC++ with DDK provided cfgmgr32, because it includes some DDK headers. What I did before is built it with DDK build.exe.

heihei, blue, will you delete this post?
我是假耳朵
WindThruEars
驱动老牛
驱动老牛
  • 注册日期2002-11-17
  • 最后登录2004-07-10
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地板#
发布于:2002-02-01 10:43
heihei, I FU LE you!

CM_Locate_DevNode is of course a Win32 API instead of Kernel API. It\'s blue instead of poor mengyy who should read more documentation.

I onced used cfgmgr32 API. SDK and DDK all ship cfgmgr32 API but they are different. Usually you should use the API shipped with DDK. But it\'s trouble to build it by VC++ with DDK provided cfgmgr32, because it includes some DDK headers. What I did before is built it with DDK build.exe.

heihei, blue, will you delete this post?
我是假耳朵
mengyy
驱动牛犊
驱动牛犊
  • 注册日期2001-09-20
  • 最后登录2002-02-19
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2002-02-01 10:46
可是我在dos应用程序中调用,在DDK环境下编译,就可以通过,这是怎么回事?望指教.
chenx
驱动牛犊
驱动牛犊
  • 注册日期2002-02-19
  • 最后登录2003-06-04
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
5楼#
发布于:2002-03-02 21:12
要开发驱动程序
游客

返回顶部