Share via


Device-Based Driver Names (Compact 7)

3/12/2014

The device namespace is similar to the legacy namespace but it supports driver instance index values with multiple digits. Device names are constructed by adding the device namespace \$device to the device prefix and the instance index. Unlike legacy device names, this instance index value can be greater than 9 (nine). Device names use the following format:

\$device\XXX[index]

Where XXX is the three-letter prefix that represents the driver name, followed by one or more digits that specify an index. Note that device-based names do not use a terminating colon.

For example, the twelfth port on the COM serial driver has the device name \$device\COM12. If the first storage device is accessed through the name \$device\DSK1, an application opens the stream driver for this storage device by passing its name to CreateFile.

CreateFile(L"\$device\DSK1", …)

Because the index is not restricted to a single digit, more than 10 device names with the same driver prefix can be accessed through the device-based driver namespace.

See Also

Concepts

Device Driver Access