Device Manager
This section discusses the Device Manager, its position within the Windows CE operating system, and its management of stream interface drivers. Developers do not need in-depth knowledge of the Device Manager to write stream interface drivers, but a broad understanding of the Device Manager and its role within Windows CE is useful.
The Device Manager, a user-level process, typically runs continuously on a Windows CE–based platform. The Device Manager is not part of the kernel, but is a separate application that interacts with the kernel, with the registry, and with stream interface driver DLLs. More specifically, the Device Manager performs the following tasks:
- Initiating the loading of a driver at system startup or when it receives notification that a user has attached a peripheral to the platform. For example, when a user inserts a PC Card, the Device Manager attempts to locate and load a device driver for that PC Card.
- Registering special file names with the kernel that map the stream I/O functions used by applications to the implementations of those functions within a stream interface driver.
- Finding the appropriate device driver for a peripheral by obtaining a Plug and Play identifier from the peripheral device or by invoking a detection routine to find a driver that can handle the device.
- Loading and tracking drivers by reading and writing registry values.
- Unloading drivers when their devices are no longer needed. For example, the Device Manager unloads a PC Card device driver when a user removes the card.