Public Attributes

# IUSBDeviceStateChangedEvent Interface Reference

Notification when a USB device is attached to or detached from the virtual USB controller. More...

Inheritance diagram for IUSBDeviceStateChangedEvent:

List of all members.

## Public Attributes
readonly attribute IUSBDevice | device
| Device that is subject to state change.
readonly attribute boolean | attached
| `true` if the device was attached and `false` otherwise.
readonly attribute IVirtualBoxErrorInfo | error
| `null` on success or an error message object on failure.

## Detailed Description

Notification when a USB device is attached to or detached from the virtual USB controller.

This notification is sent as a result of the indirect request to attach the device because it matches one of the machine USB filters, or as a result of the direct request issued by IConsole::attachUSBDevice or IConsole::detachUSBDevice.

This notification is sent in case of both a succeeded and a failed request completion. When the request succeeds, the error parameter is `null`, and the given device has been already added to (when attached is `true`) or removed from (when attached is `false`) the collection represented by IConsole::USBDevices. On failure, the collection doesn't change and the error parameter represents the error message describing the failure.

Interface ID:
  `{806DA61B-6679-422A-B629-51B06B0C6D93}`

## Member Data Documentation

readonly attribute IUSBDevice IUSBDeviceStateChangedEvent::device

Device that is subject to state change.

readonly attribute boolean IUSBDeviceStateChangedEvent::attached

`true` if the device was attached and `false` otherwise.

readonly attribute IVirtualBoxErrorInfo IUSBDeviceStateChangedEvent::error

`null` on success or an error message object on failure.