CreateFile(L'$deviceXXX1'…). Note that this value is optional. If you do not define it, Device Manager assigns the next available index value to the driver.
Order REG_DWORD This is the order in which Device Manger loads the driver. If this value is not specified, the driver will be loaded last, at the same time as other drivers with no order specified. Drivers with the same Order value start concurrently. You should only configure this value to enforce a sequential load order. For example, a Global Positioning System (GPS) driver might require a Universal Asynchronous Receiver/Transmitter (UART) driver to get access to the GPS data through a serial port. In this case, it is important to assign the UART driver a lower Order value than the GPS driver so that the UART driver starts first. This will enable the GPS driver to access the UART driver during its initialization.
IClass REG_MULTI_SZ This value can specify predefined device interface globally unique identifiers (GUIDs). To advertise an interface to Device Manager, such as to support the Plug and Play notification system and power management capabilities, add the corresponding interface GUIDs to the IClass value or call AdvertiseInterface in the driver.
Flags REG_DWORD This value can contain the following flags:
¦ DEVFLAGS_UNLOAD (0x0000 0001) The driver unloads after a call to XXX_Init.
¦ DEVFLAGS_NOLOAD (0x0000 0004) The driver cannot be loaded.
¦ DEVFLAGS_NAKEDENTRIES (0x0000 0008) The entry points of the driver are Init, Open, IOControl, and so forth, without any prefixes.
¦ DEVFLAGS_BOOTPHASE_1 (0x0000 1000) The driver is loaded during system phase 1 for systems with multiple boot phases. This prevents the driver from being loaded more than one time during the boot process.
¦ DEVFLAGS_IRQ_EXCLUSIVE (0x0000 0100) The bus driver loads this driver only when it has exclusive access to the interrupt request (IRQ) specified by the IRQ value.
¦ DEVFLAGS_LOAD_AS_USERPROC (0x0000 0010) Loads the driver in user mode.
UserProcGroup REG_DWORD Associates a driver marked with the DEVFLAGS_LOAD_AS_USERPROC (0x0000 0010) flag to load in user mode with a user-mode driver host process group. User-mode drivers that belong to the same group are loaded by Device Manager in the same host process instance. If this registry entry does not exist, Device Manager loads the user-mode driver into a new host process instance.
NOTE Flags

For details about the Flags registry value, see the section 'ActivateDeviceEx' in the Windows Embedded CE 6.0 Documentation, available on the Microsoft MSDN Web site at http://msdn2.microsoft.com/en- us/library/aa929596.aspx.

Registry Keys Related to Loaded Device Drivers

Apart from configurable registry entries in driver-specific subkeys, Device Manager also maintains dynamic registry information in subkeys for loaded drivers under the HKEY_LOCAL_MACHINEDriversActive key. The subkeys correspond to numerical values that the operating system assigns dynamically and increments for each driver until the system is restarted. The number does not signify a particular driver. For example, if you unload and reload a device driver, the operating system assigns the next number to the driver and does not reuse the previous subkey. Because you cannot ensure a reliable association between the subkey number and a particular device driver, you should not edit the driver entries in the HKEY_LOCAL_MACHINEDriversActive key manually. However, you can create, read, and write driver-specific registry keys at load time in a driver's XXX_Init function because Device Manager passes the path to the current DriversActive subkey to the stream driver as the first parameter. The driver can open this registry key using OpenDeviceKey.

Table 6-4 lists typical entries that the subkeys under DriversActive can contain.

Table 6-4 Registry entries for device drivers under the HKEY_LOCAL_MACHINEDriversActive key

Registry Entry Type Description
Hnd REG_DWORD The handle value for the loaded device driver. You can obtain this DWORD value from the registry and pass it in a call to DeactivateDevice in order to unload the driver.
Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату