DeviceWatcher.Removed DeviceWatcher.Removed DeviceWatcher.Removed DeviceWatcher.Removed DeviceWatcher.Removed Event

Definition

Event that is raised when a device is removed from the collection of enumerated devices.

public : event TypedEventHandler<DeviceWatcher, DeviceInformationUpdate> Removed
// Register
event_token Removed(TypedEventHandler<DeviceWatcher, DeviceInformationUpdate> const& handler) const;

// Revoke with event_token
void Removed(event_token const& cookie) const;

// Revoke with event_revoker
Removed_revoker Removed(auto_revoke_t, TypedEventHandler<DeviceWatcher, DeviceInformationUpdate> const& handler) const;
public event TypedEventHandler<DeviceWatcher, DeviceInformationUpdate> Removed
Public Event Removed As TypedEventHandler (Of DeviceWatcher, DeviceInformationUpdate)
function onRemoved(eventArgs){/* Your code */}


deviceWatcher.addEventListener("removed", onRemoved);
deviceWatcher.removeEventListener("removed", onRemoved);

Remarks

Note

An app must subscribe to all of the added, removed, and updated events to be notified when there are device additions, removals or updates. If an app handles only the added event, it will not receive an update if a device is added to the system after the initial device enumeration completes.

See also