Книга: Microsoft Windows Embedded CE 6.0 Exam Preparation Kit

Lesson 3: Configuring and Loading a Driver

In general, you have two options to load a stream driver under Windows Embedded CE 6.0. You can instruct Device Manager to load the driver automatically during the boot sequence by configuring driver settings in the HKEY_LOCAL_MACHINEDriversBuiltIn registry key, or you can load the driver dynamically through a direct call to ActivateDeviceEx. Either way, Device Manager can load the device driver with the same registry flags and settings. The key difference is that you receive a handle to the driver when using ActivateDeviceEx, which you can use later in a call to DeactivateDevice. Especially during the development stage, it might be advantageous to load a driver dynamically through ActivateDeviceEx so that you can unload the driver, install an updated version, and then reload the driver without having to restart the operating system. You can also use DeactivateDevice to unload drivers loaded automatically based on entries under the BuiltIn registry key, but you cannot reload them without calling ActivateDeviceEx directly.

After this lesson, you will be able to:

? Identify the mandatory registry settings for a device driver.

? Access the registry settings from within a driver.

? Load a driver at startup or on demand in an application.

? Load a driver in user space or kernel space.

Estimated lesson time: 25 minutes.

Оглавление книги


Генерация: 1.105. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз