IDashDeviceList
Interface for accessing a list of attached devices.
Contents
Properties
| Property | Description |
|---|---|
| Count | Gets the number of devices in the list. |
Public Methods
| Function | Description |
|---|---|
| NameAt | Gets the name of the device at the given index. |
| SerialNumberAt | Gets the serial number of the device at the given index. |
| DescriptionAt | Gets the description of the device at the given index. |
| UsbVidAt | Gets the USB VID (Vendor ID) of the device at the given index. |
| UsbPidAt | Gets the USB PID (Product ID) of the device at the given index. |
| Get | Gets a representation of the device at the given index. |
| Refresh | Rescan the system for the attached devices and update the list. |
| IsUsbAt | Tests whether the device uses a physical USB connection. |
Properties
Count
Gets the number of devices in the list.
int CountPublic Methods
Method: NameAt
Gets the name of the device at the given index.
HRESULT NameAt([in] int index, [out, retval] BSTR *retval)If the index is invalid, an error will be rasied (E_INVALIDARG).
Method: SerialNumberAt
Gets the serial number of the device at the given index.
HRESULT SerialNumberAt([in] int index, [out, retval] BSTR *retval)If the index is invalid, an error will be rasied (E_INVALIDARG).
Method: DescriptionAt
Gets the description of the device at the given index.
HRESULT DescriptionAt([in] int index, [out, retval] BSTR *retval)If the index is invalid, an error will be rasied (E_INVALIDARG).
Method: UsbVidAt
Gets the USB VID (Vendor ID) of the device at the given index.
HRESULT UsbVidAt([in] int index, [out, retval] int *retval)If the index is invalid, an error will be rasied (E_INVALIDARG).
Method: UsbPidAt
Gets the USB PID (Product ID) of the device at the given index.
HRESULT UsbPidAt([in] int index, [out, retval] int *retval)If the index is invalid, an error will be rasied (E_INVALIDARG).
Method: Get
Gets a representation of the device at the given index.
HRESULT Get([in] int index, [out, retval] IDashDevice **retval)If the index is invalid, an error will be rasied (E_INVALIDARG).
Note that this function will always create a new object.
You cannot compare object pointers for equality to identify devices. Use IDashDevice::DevID
Method: Refresh
Rescan the system for the attached devices and update the list.
HRESULT Refresh(void)Method: IsUsbAt
Tests whether the device uses a physical USB connection.
HRESULT IsUsbAt([in] int index, [out, retval] VARIANT_BOOL *retval)Returns
S_OK on success, E_INVALIDARG for an invalid index. Refresh the list before querying; this does not open the device.