STREAM DRIVER CONFIGURATION
A Stream Driver is configured in terms of its registry entries and BIB file entry. The registry entry can include, amongst other things, a specification of the name to use for the driver in terms of its prefix.
Driver Naming Conventions
Stream Drivers are typically named by their legacy name, which is the prefix with the instance name post-pended:
XXXN: where XXX is the driver prefix as in its registry key and N is the device instance index. Note the colon on the end.
For example, serial ports would be named COM1:, COM2: and so on. The instance index can range from 0 to 9 with Compact 7, which limits the number of instances of a driver to 10. When a driver is opened by an application it calls CreateFile with this name as a parameter. For example CreateFile(_T("COM1:", ...).
Alternatively, because Stream Drivers are loaded by the Device Manager, they can be referenced with respect to \$device. The format follows:
\$device\XXXN where XXX is the prefix and N is the index.
N can be greater than 9. For example CreateFile(_T("\$device\COM11...) would open COM11. There is no colon in this syntax.
Remember that in C/C++ code, which is what is used for device driver code, the backslashes are implemented as the escape sequence \.
Stream Drivers loaded on a bus have the following format for their names on the system: