ControlDevice: Add method for device descriptor retrieval
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
This commit is contained in:
parent
50a1e5058d
commit
4f1bec2125
2 changed files with 14 additions and 0 deletions
|
|
@ -337,6 +337,17 @@ bool CUsbDkControlDevice::UsbDeviceExists(const USB_DK_DEVICE_ID &ID)
|
|||
return !EnumUsbDevicesByID(ID, ConstFalse);
|
||||
}
|
||||
|
||||
bool CUsbDkControlDevice::GetDeviceDescriptor(const USB_DK_DEVICE_ID &DeviceID,
|
||||
USB_DEVICE_DESCRIPTOR &Descriptor)
|
||||
{
|
||||
return !EnumUsbDevicesByID(DeviceID,
|
||||
[&Descriptor](CUsbDkChildDevice *Child) -> bool
|
||||
{
|
||||
Descriptor = Child->DeviceDescriptor();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
PDEVICE_OBJECT CUsbDkControlDevice::GetPDOByDeviceID(const USB_DK_DEVICE_ID &DeviceID)
|
||||
{
|
||||
PDEVICE_OBJECT PDO = nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue