启动时无法加载设备驱动程序的问题-WM6.1 [英] Problems getting a device driver to load at startup - WM6.1

查看:151
本文介绍了启动时无法加载设备驱动程序的问题-WM6.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的嵌入式系统程序员为我们的移动硬件开发了虚拟串行端口驱动程序的外壳,并且我一直在填写使它工作的方法。该驱动程序确实按预期方式工作,它为正在喷出NMEA字符串(GPS数据)的USB设备模拟了COM端口。

Our embedded systems programmer has developed the shell of a virtual serial port driver for our mobile hardware, and I have been filling in the methods to get it to work. The driver does work as expected, it simulates a COM port for a USB device that is spewing out NMEA strings (GPS data).

我简称为WM6,但是如果有任何区别,操作系统就是WM6.1。

I type WM6 for short, but the OS is WM6.1 if it makes any difference.

我遇到的问题是,驱动程序仅在WM6上启动设备时才加载。该驱动程序是为CE5和WM6开发的,但是在CE5上,驱动程序在启动时加载,这使我想到了WM6配置问题。
此时可能需要注意,驱动程序将使用ActivateDevice()方法在WM6和CE5中加载,这是我到目前为止一直在使用的WM6(用于启动驱动程序的小型测试应用程序)所能使用的

The problem I am having is that the driver does not load at start up of the device on WM6 only. The driver was developed for both CE5 and WM6, but on CE5 the driver "does" load at boot, which is pointing me to a WM6 configuration issue. It maybe worth noting at this point that the driver will load in WM6 and CE5 using ActivateDevice() method, this is what I have been using so far for WM6, a small test app to launch the driver so I can at least test the driver is working on WM6.

注册表中已经装有启动驱动程序所需的密钥。因此,驱动程序应该在启动时加载,没有任何问题。 HKEY_LOCAL_MACHINE\Drivers\BuiltIn包含一个子项A36D_GPS_COM,并且其中包含该子项。

The registry is already populated with the required keys for the startup of the driver. So the driver should load at startup without any issues. HKEY_LOCAL_MACHINE\Drivers\BuiltIn contains a sub key A36D_GPS_COM, and in that key is contained.

DeviceArrayIndex:0

DeviceArrayIndex: 0

DeviceType:0

DeviceType: 0

Dll:A36D.dll

Dll: A36D.dll

标记:0

友好名称:A36D GPS COM端口

Friendly Name: A36D GPS COM Port

索引:8

命令:3

前缀:COM

优先级:0

优先级:256

根据我的判断,对于这个问题,我通常已经调查了2个常见答案。这些想法是由嵌入式程序员提供给我的,但是我自己研究了如何实现。

From what I can tell there are generally 2 common answers to this issue which I have already investigated. These ideas were given to me by the embedded programmer but I researched how to do them myself.

1)当驱动程序尝试加载时,COM端口已经在使用中,即使该COM端口最终在设备加载后是空闲的。我已将注册表中的Index值从1更改为20,并重新启动了设备,并且驱动程序未加载到指定的COM端口上。因此,为了更彻底地测试它,我将另一台设备从COM9移至COM8,并将驱动程序移至COM9(使用上述注册表设置)。另一个设备驱动程序在启动时很愉快地在COM8上加载,但是我的设备驱动程序无法在COM9上启动。我什至尝试调整其他设置,但仍然无法在启动时加载。

1) The COM port is already in use when the driver tries to load, even if that COM port is eventually free once the device is loaded. I have changed the Index value in the registry from between 1 to 20 and rebooted the device, and the driver does not load onto a specified COM port. So to try and test this more thoroughly, I have moved another device to from COM9 to COM8 and moved my driver to COM9 (using the above registry settings). The other device driver loads at startup on COM8 quite happily but my device driver will not boot up on COM9. I have even tried tweaking the other settings but still it doesn't load the at boot.

2)CE5和WM6之间的另一个可能的问题和区别是安全性。因此,使用MSDN文章 http://msdn.microsoft.com/zh-CN /library/bb737570.aspx 我已经进行过签名和XML设置。使用特权密钥(未过期),在Visual Studio中对A36D.dll进行签名,并且还使用相同的密钥对创建的安装CAB文件进行签名。将创建_setup.xml文件并将其附加到cab文件,以便将签名的密钥添加到证书存储中。使用相同的密钥再次对CAB文件进行签名以确保其仍然有效。此外,_setup.xml打包到其自己的.CPF文件中。 CAB和CPF文件都将密钥添加到证书存储 HKEY_LOCAL_MACHINE\Comm\Security\SystemCertificates,因此知道这是可行的。为谨慎起见,我已将其安装到特权,非特权,ROOT和SPC证书存储区。但是,当移动设备启动时,设备驱动程序仍然不会加载到device.exe中。

2) Another possible issues and difference between CE5 and WM6 is security. So using the MSDN article http://msdn.microsoft.com/en-us/library/bb737570.aspx I have worked on signing and XML provisioning. Using a privileged key (not expired), The A36D.dll is signed in visual studio and the created installation CAB file is also signed with the same key. A _setup.xml file is created and appended to the cab file so that the signed key is added to the certificate store. The CAB file is signed again with the same key to ensure it is still valid. In addition the _setup.xml is packaged into its own .CPF file. Both the CAB and CPF files do add the key to the certificate stores "HKEY_LOCAL_MACHINE\Comm\Security\SystemCertificates" so know this is working. As a matter of caution I have installed it to the Privileged, Unprivileged, ROOT and SPC certificate stores. But the device driver still does not load into device.exe when the mobile device boots.

除了在启动应用程序上调用ActivateDevice()的变通方法之外,驱动程序,我对如何在启动时加载该驱动程序感到困惑。

Other than a workaround of a start-up application that calls ActivateDevice() on the driver, I am stumped on how to get this driver to load at start-up.

我发现它在CE5中有效,但在WM6中却无法正常工作,我只是不知道

I find it very odd it works in CE5 but not in WM6, I just don't know of anything else that could be causing issues.

有人有其他可以尝试的建议吗?

Does anyone have any further suggestions that can be tried.

感谢所有帮助。

推荐答案

我对Windows CE更为熟悉,但这有两件事:

I am more familiar with Windows CE, but here are a couple of things:


  • 是否在DllMain函数中添加了调试打印以查看是否被调用?

  • 您是否检查依赖项中断。难道是由于某种原因,您有在CE 5下可用的Dll在WM6下没有?

这篇关于启动时无法加载设备驱动程序的问题-WM6.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆