Compartilhar via


Bus-Based Driver Names (Compact 2013)

3/26/2014

When a device driver is a stream driver that manages hardware on a bus such as PCMCIA or USB, applications access the device through a bus name. Bus names provide a way to perform operations on a device that are different from normal device operations such as read and write. Applications and other device drivers communicate with the driver’s parent bus driver for services such as loading, unloading, and power management.

Bus names derive from the bus type, bus number, and other bus-specific identifiers such as device number and function number. This bus naming convention assumes that all buses of a particular type are uniquely numbered. When this combination of identifiers is unique, no name collisions occur.

Each bus name begins with the prefix \$bus and uses the following format:

\$bus\<bus_name>_<bus_number>_<device_number>_<function_number>

\$bus\ is the namespace identifier that indicates that this is a bus name, bus name refers to the name or type of the bus, and bus number, device number, and function number are bus-specific identifiers. For example, the device name for function 0 (zero) on the second device on the first PCI bus is \$bus\PCI_0_1_0. If you have a serial port that is the third function number on the first device of a single PCMCIA bus, it has the bus name \$bus\PCMCIA_0_0_2. An application opens the device in the first example by passing this bus name to CreateFile.

CreateFile(L"\$bus\PCI_0_1_0", …)

Bus names are created by the bus driver for a particular bus. Therefore, unlike legacy or device-based names, bus names must correspond to the underlying structure of the bus. Bus drivers for different types of buses may create bus names differently, depending on how those buses are structured.

For more about bus-based driver names, see Bus Drivers.

See Also

Concepts

Device Driver Access