在进行Windows Embedded CE(Wince)开发,使用华为 3G Modem EM 770W的时候,发现其驱动有点问题,需要延时加载。后来发现了一个简单的方法来延时驱动的加载。
需要做的是在驱动设备的注册表中加入Flags项,该项的值为4. 表示这个驱动不会自动加载。
DEVFLAGS_NOLOAD 0x00000004
- Allows you to have the registry settings, but not actually have the driver loaded.
You can use this to keep the driver from loading until you call ActivateDeviceEx() you can set this flag,
but you must clear it before calling ActivateDeviceEx()
在需要用到该驱动的程序调用ActivateDeviceEx() 来加载这个驱动。
参考Windows CE: Stream Interface Driver Registry Settings
本文转自Jake Lin博客园博客,原文链接:http://www.cnblogs.com/procoder/archive/2010/01/18/Windows-Embedded-CE-Load-Driver.html,如需转载请自行联系原作者