驱动dll的问题
在编译一个驱动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,也能成功。请问为什么就打不开呢?希望各位仁兄指教,谢谢~~~~