阅读:1611回复:5
为什么我用MFC创建的工程不能调用DDK函数?
DDK函数CM_LOCATE_DEVNODE在cfgmgr32.lib中,我在工程中包括了这个lib,可是还是出现link错误,找不到这个函数.甚至我把这个lib拷贝到工程目录下,还是找不到,不知这是怎么回事?
注:在98下使用. :( |
|
沙发#
发布于:2002-02-01 10:25
拜托:
MFC创建的是应用程序,是运行在应用层,Ring-3; 而DDK是开发驱动程序的,是运行在Kernel Mode,Ring-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? |
|
|
地板#
发布于: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? |
|
|
地下室#
发布于:2002-02-01 10:46
可是我在dos应用程序中调用,在DDK环境下编译,就可以通过,这是怎么回事?望指教.
|
|
5楼#
发布于:2002-03-02 21:12
要开发驱动程序
|
|