PnpObjectWatcher.EnumerationCompleted Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Important
We no longer recommend that you use the types in the Windows.Devices.Enumeration.Pnp namespace. Instead, the types in the Windows.Devices.Enumeration namespace implement a modern, and better maintained, superset of the functionality of Windows.Devices.Enumeration.Pnp.
The alternative to PnpObjectType is the Windows.Devices.Enumeration.DeviceInformationKind enum, which you can pass as a parameter to Windows.Devices.Enumeration APIs. For example, instead of using PnpObjectType when you create a PnpObjectWatcher, use DeviceInformationKind when you create a DeviceWatcher.
Occurs when the enumeration of Pnp device objects has been completed.
// Register
event_token EnumerationCompleted(TypedEventHandler<PnpObjectWatcher, IInspectable const&> const& handler) const;
// Revoke with event_token
void EnumerationCompleted(event_token const* cookie) const;
// Revoke with event_revoker
PnpObjectWatcher::EnumerationCompleted_revoker EnumerationCompleted(auto_revoke_t, TypedEventHandler<PnpObjectWatcher, IInspectable const&> const& handler) const;
public event TypedEventHandler<PnpObjectWatcher,object> EnumerationCompleted;
function onEnumerationCompleted(eventArgs) { /* Your code */ }
pnpObjectWatcher.addEventListener("enumerationcompleted", onEnumerationCompleted);
pnpObjectWatcher.removeEventListener("enumerationcompleted", onEnumerationCompleted);
- or -
pnpObjectWatcher.onenumerationcompleted = onEnumerationCompleted;
Public Custom Event EnumerationCompleted As TypedEventHandler(Of PnpObjectWatcher, Object)
Event Type
TypedEventHandler<PnpObjectWatcher,IInspectable>