Microsoft Windows CE 3.0  

Device File Name Indexes

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

In a special device file name, the index is the digit that follows the prefix. The index differentiates devices that are managed by a stream interface driver. By default, the Device Manager numbers indexes logically from 1 through 9, with 1 corresponding to the first device file name. If you require a tenth device file name, use 0 as the index.

If you need to number your device file names starting at an index other than 1, specify a starting index in a registry value called Indexwithin the registry key for your driver. This is often necessary if your stream interface driver serves a device that should use a common prefix, such as COM. For example, on many Windows CE–based platforms, COM1:, COM2:, and COM3: correspond to built-in serial port hardware. If your driver is for a serial device, such as a packet-radio modem, it should appear as a COM port because modem software often assumes that modems are connected to COM ports. You could specify an Indexvalue of 4 to differentiate your serial device from the ones that are built into the hardware.

If you specify an index, rather than letting the Device Manager assign indexes as needed, by default your driver supports only one device because the Device Manager can register only one device file name. If you need to specify an index but need more than one device file name, you have two options: the XXX_Initfunction can register additional device file names with the ActivateDevicefunction, or the setup utility can create additional sets of registry keys, each with a different index, when your driver is installed.



 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.