Developing a Device Driver (Windows Embedded CE 6.0)

1/6/2010

A device driver is software that abstracts the functionality of a physical or virtual device. A device driver manages the operation of these devices. Examples of physical devices are network adapters, timers, and universal asynchronous receiver-transmitters (UARTs). An example of a virtual device is a file system. Implementing a device driver allows the functionality of your device to be exposed to applications and other parts of the operating system (OS). While developing a device driver, take advantage of the services provided by the OS. Although Windows Embedded CE device drivers are privileged modules, they do not have to run in kernel mode.

Important

This topic applies to an older product version. See documentation for the most current version of Windows Embedded Compact. Or visit Windows Embedded Products & Solutions for the latest information about intelligent systems powered by Microsoft.

Many Windows Embedded CE device drivers implement the stream interface. The core stream interface entry points are XXX_Open (Device Manager), XXX_Close (Device Manager), XXX_Read (Device Manager), and XXX_Write (Device Manager). For more information, see Stream Interface Drivers.

Network adapters, display adapters, mouse devices, keyboards, and other special-purpose devices do not use the stream interface. These devices use an interface that suits the device's functionality.

Regardless of the interface that your device driver exposes, you might have to implement an interrupt service routine (ISR). For more information about interrupts and ISRs, see Interrupts.

Different processes load different drivers. The following table shows the processes that load drivers and what drivers each process loads.**

Process Drivers

File System (FileSys.dll)

FileSys.dll loads file system drivers. For more information, see File Systems.

Device Manager (Device.dll)

Device.dll loads audio drivers, battery drivers, keyboard drivers, mouse drivers, NDIS drivers, notification LED drivers, serial drivers, PC Card drivers, USB drivers, and any other driver that exposes the stream interface. Device.dll loads most of its drivers with ActivateDeviceEx, and these drivers expose a stream interface. For more information, see Device Manager.

Graphics, Windowing, and Events Subsystem (GWES.dll)

GWES.dll loads a device driver if GWES is the only client of a driver. Device drivers loaded by GWES present a standard set of functionality for all similar devices. Drivers that GWES loads might expose the stream interface or they might expose other interfaces. Having alternatives make accessing the drivers much faster. GWES loads display drivers, printer drivers, and touch screen drivers. For more information, see Shell, GWES, and User Interface.

In This Section

  • Device Driver Development Overview
    Provides links to topics describing the source code for device drivers, the tools provided for device driver development, and where to obtain and certify third-party device drivers and board support packages.
  • Best Practices for Developing a Device Driver
    Describes best practices for developing more secure, reliable, power manageable, portable, and maintainable device drivers. Provides information about the production-quality device drivers that Windows Embedded CE provides.
  • Device Manager
    Describes Device Manager, device file names, and the I/O Resource Manager.
  • **
  • **
  • Catalog Item Management
    Explains how to manipulate device drivers and other Catalog items in the Platform Builder IDE.
  • **