Serial Port Drivers

With Windows CE, you can use two different methods to create drivers for serial devices. You can either create a stream interface driver dynamic-link library (DLL) that presents high-level information from the device to user applications, or you can have the applications that use the serial device interpret the device data directly.

These two methods are possible because users always access serial devices through built-in communications (COM) ports, generally COM1: through COM3:.

With the first method, you implement a serial device driver to present a new device file name to applications, such as COM4:, or another file name specific to the function of the serial device. A device driver uses the services of the built-in COM port to access the peripheral device. With the second method, you enable user applications to open a built-in COM port to access the peripheral device directly.

The following table shows the factors you should consider before you decide between these two driver development methods.

Factor Strategy
Single access or multiple access If the peripheral can support simultaneous access by multiple applications, implement a stream interface driver. This greatly simplifies the user-level applications.
Complexity of the incoming data stream If the incoming data stream from the peripheral is complicated and requires considerable processing to yield usable information, write a stream interface driver.
Speed of the incoming data stream If data comes from the peripheral at a very high rate, there might not be enough processing time available to support the overhead that is required for a stream interface driver. If this is the case, use an installable interrupt service routine (ISR) for a serial driver that captures data at a high rate. For more information, see High Speed Serial Port Driver.

See Also

Power Management in Serial Port Drivers | Automatic Detection of Docking for Serial Ports | Serial Port Driver Architecture | Serial Port Driver Samples | Serial Port Driver Registry Settings

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.