引用 1 楼 guopeixin 的回复:
1. 注册表中flags的配置是多少?
2. 驱动放到windows下再重新尝试一下
3. Error ID 1意思是ERROR_INVALID_FUNCTION
用dumpbin工具查一下驱动的导出函数,方法是到pb或者vs的release目录下dumpbin /exports {驱动名}看一下导出函数是不是有***_Init
我查了一下Init没有导出,是我拼写错误,改正之后,用dumpbin查看如下
Dump of file c:\gio_drv.dll
File Type: DLL
Section contains the following exports for GIO_DRV.dll
00000000 characteristics
4B4BDBBC time date stamp Tue Jan 12 10:17:32 2010
0.00 version
1 ordinal base
10 number of functions
10 number of names
ordinal hint RVA name
1 0 0000156C ?GIO_Close@@YAHK@Z
2 1 000014BC ?GIO_Deinit@@YAHK@Z
3 2 000015AC ?GIO_IOControl@@YAHKKPAEK0KPAK@Z
4 3 00001484 ?GIO_Init@@YAKPBGPBX@Z
5 4 00001528 ?GIO_Open@@YAKKKK@Z
6 5 00001628 ?GIO_PowerDown@@YAXK@Z
7 6 000015EC ?GIO_PowerUp@@YAXK@Z
8 7 00001664 ?GIO_Read@@YAKKPAEK@Z
9 8 000016E4 ?GIO_Seek@@YAKKJG@Z
10 9 000016A4 ?GIO_Write@@YAKKPAEK@Z
Summary
1000 .data
1000 .pdata
1000 .reloc
1000 .text
Init已经出来了,可是在DM里还是无法激活dll,还有哪里不对呢?
|