Windows Mobile 6.5 Device Driver Architecture

Windows Mobile 6.5, built upon the Windows CE 5.2 kernel, primarily utilized the Windows CE Stream Interface Driver model for peripheral hardware. This article examines the framework of the stream driver model, the operational role of the Device Manager, and how input/output operations were processed to enable communication between the operating system and connected peripheral devices.

The foundation of peripheral support in Windows Mobile 6.5 was the Stream Interface Driver architecture. Implemented as dynamic-link libraries (DLLs), stream drivers presented hardware peripherals to the operating system as standard files. This allowed applications and system services to interact with diverse hardware—such as serial adapters, GPS receivers, external sensors, and storage controllers—using standard Win32 file-system APIs including CreateFile, ReadFile, WriteFile, and DeviceIoControl.

Under this model, the Device Manager (device.exe) was the core user-mode process responsible for managing peripheral drivers. Upon system startup or hardware detection (such as a USB plug-and-play event), the Device Manager read configuration data from the system registry under the HKEY_LOCAL_MACHINE\Drivers\BuiltIn or active bus keys. It loaded the driver DLL into memory, assigned it a unique three-letter prefix followed by an index (such as COM1:, DSK2:, or WAV1:), and registered the device interface within the global namespace.

Stream drivers required a standardized set of exported functions, typically prefixed with the designated three-character identifier:

  • XXX_Init: Initializes the peripheral and allocates necessary hardware resources.
  • XXX_Deinit: Releases hardware resources and prepares the driver for unloading.
  • XXX_Open and XXX_Close: Open and close handles for communication sessions.
  • XXX_Read and XXX_Write: Transfer data between the peripheral and user buffers.
  • XXX_Seek: Repositions the data pointer for block-based devices.
  • XXX_IOControl: Processes custom I/O control codes (IOCTLs) for device-specific commands.
  • XXX_PowerUp and XXX_PowerDown: Handle power management transitions to conserve battery life.

In addition to standard stream drivers, Windows Mobile 6.5 supported native drivers for tightly integrated hardware like display controllers and touch panels, which directly interfaced with the Graphics, Windowing, and Events Subsystem (GWES). However, for external and modular peripherals connected via USB, SDIO, Bluetooth, SPI, or UART, the Stream Interface Driver model remained the standard mechanism for hardware abstraction and peripheral control throughout the operating system's lifecycle.