Platform SDK: Hardware |
Device drivers provide a uniform and extensible way for applications and the system to interact with them programmatically, known as a device interface. Drivers expose, register, and enable device interfaces. A driver can expose zero, one, or more than one interface for a particular device. A device interface is represented by a GUID.
Each device interface is a member of a device interface class. A device interface class is a group of device interfaces with the same functionality. For example, all the joysticks on a system could be members of the joystick device interface class. A device interface class is identified by a class GUID.
When an application must communicate with a device, it searches for a device that exports the required interface. To perform the search, use the following steps.
To communicate with the device, call the SetupDiGetDeviceInterfaceDetail function. This function returns device information in an SP_DEVICE_INTERFACE_DETAIL_DATA structure. The DevicePath member provides the symbolic link name, which can be used in the CreateFile function to access the device.