Notifies the HID class driver that an application needs to use a device.
The input and output buffer pointers and lengths must be identical. The buffer must contain a SHiddiAttach structure which is used for both input and output. The device to attach may be specified by ID or by type. If the structure's dwId member is zero, then the device is being specified by type. Otherwise, the dwId member contains the device's ID. If the device is being specified by type, then the actual device attached will be the first one that the HID class driver finds of the correct type. Before returning, the HID class driver must modify the SHiddiAttach structure to reflect the actual ID and type of the attached device.
This I/O control code is also used to detach an attached device, when the bAttaching field of the SHiddiAttach structure is set to FALSE. Devices can only be detached by ID; the dwDevType field is ignored when detaching. After a successful detach, the HID class driver shouldn't modify the SHiddiAttach structure and should return a zero-byte output length.