驱动dll的问题

leo_bin 2009-02-17 09:15:47
在编译一个驱动dll后按照如下方法绑定到nb0中:
在project.reg中添加:
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MyDriver]
"Dll"="MyDriver.dll"
"Prefix"="XXX"
"Index"=dword:1
"Order"=dword:0
"Ioctl"=dword:0
在project.bib中添加:
MODULES
; Name Path Memory Type
; -------------- --------------------------------------------- -----------
MyDriver.dll $(_FLATRELEASEDIR)\MyDriver.dll NK SH

在makeimage时出现如下信息:
Windows CE ROM Image Builder v4.0.000 Copyright (c) Microsoft Corporation
Built: Aug 19 2003 11:01:23
Warning: Found duplicate entry 'MyDriver.dll NK E:\WINCE420\PUBLIC\newboard\TERM24~1\MyDriver\SAMSUNG_SMDK2440__ARMV4IRel\MyDriver.dll 00000007' ... skipping
Warning: Found duplicate entry 'MyDriver.dll NK E:\WINCE420\PUBLIC\newboard\Term2440I\RelDir\SAMSUN~1\MyDriver.dll 00000007' ... skipping
Warning: Found duplicate entry 'ndis.dll NK E:\WINCE420\PUBLIC\newboard\Term2440I\RelDir\SAMSUN~1\ndis.dll 00000007' ... skipping
Copying E:\WINCE420\PUBLIC\newboard\Term2440I\RelDir\SAMSUN~1\kern.exe to E:\WINCE420\PUBLIC\newboard\Term2440I\RelDir\SAMSUN~1\nk.exe for debugger
Copying E:\WINCE420\PUBLIC\newboard\Term2440I\RelDir\SAMSUN~1\KbdNopUs.dll to E:\WINCE420\PUBLIC\newboard\Term2440I\RelDir\SAMSUN~1\kbdmouse.dll for debugger
Pass 1...
Warning: .rel files are required to load the code section of modules into slot 1
and therefor freeing up more virtual memory space in slot 0.
Warning: No .rel file found for module MyDriver.dll, using old fixup style.
Warning: No .rel file found for module dm9000.dll, using old fixup style.
Warning: No .rel file found for module SDBusDriver.dll, using old fixup style.
Warning: No .rel file found for module SDCSDCard.DLL, using old fixup style.
Warning: No .rel file found for module SDMemory.dll, using old fixup style.
Warning: Unable to do imports from atapi.dll to PCIbus.dll - will late bind
Pass 2...

makeimage 也能通过,但在应用程序中使用HINSTANCE hDllInst = LoadLibrary( L"MyDriver.dll ")却不能打开该dll,GetLastError()的返回值是126,表示没有找到该模块;我也是过打开其他的dll,例如ndis.dll,也能成功。请问为什么就打不开呢?希望各位仁兄指教,谢谢~~~~
...全文
385 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
gooogleman 2009-02-17
  • 打赏
  • 举报
回复
你的注册表直接在PB下改的吧?

这里改是不行的,

要拷贝或者直接在你工程的release目录下改动,然后打包即可。
leo_bin 2009-02-17
  • 打赏
  • 举报
回复
楼上可不可再说清楚点呢?怎么查看一个dll所信赖的dll呢?

后来我换了一个dll,使用LoadLibrary就可以打开了,但是使用CreateFile就不行,GetLastError()的返回值是55,这又是何解呢?
beyondma 2009-02-17
  • 打赏
  • 举报
回复
这种情况的话如果能保证那个DLL存在就要看看那个DLL信赖的DLL是不是存在了。
leo_bin 2009-02-17
  • 打赏
  • 举报
回复
楼上的大哥,我是先把dll文件拷贝到release目录下再做上述改动的,这样也不行啊?
你所说的拷贝或者直接在你工程的release目录下改动具体应该怎么做呢?

21,600

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 驱动开发/核心开发
社区管理员
  • 驱动开发/核心开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧