다음을 통해 공유


PnpObjectWatcher.Removed 이벤트

정의

중요

더 이상 Windows.Devices.Enumeration.Pnp 네임스페이스에서 형식을 사용하지 않는 것이 좋습니다. 대신 Windows.Devices.Enumeration 네임스페이스의 형식은 Windows.Devices.Enumeration.Pnp 기능의 최신 및 더 나은 유지 관리 상위 집합을 구현합니다.

PnpObjectType의 대안은 Windows.Devices.Enumeration.DeviceInformationKind 열거형으로, Windows.Devices.Enumeration API에 매개 변수로 전달할 수 있습니다. 예를 들어 PnpObjectWatcher를 만들 때 PnpObjectType을 사용하는 대신 DeviceWatcher를 만들 때 DeviceInformationKind를 사용합니다.

PnpObjectWatcher가 열거한 컬렉션에서 PnpObject를 제거할 때 발생합니다.

// Register
event_token Removed(TypedEventHandler<PnpObjectWatcher, PnpObjectUpdate const&> const& handler) const;

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

// Revoke with event_revoker
PnpObjectWatcher::Removed_revoker Removed(auto_revoke_t, TypedEventHandler<PnpObjectWatcher, PnpObjectUpdate const&> const& handler) const;
public event TypedEventHandler<PnpObjectWatcher,PnpObjectUpdate> Removed;
function onRemoved(eventArgs) { /* Your code */ }
pnpObjectWatcher.addEventListener("removed", onRemoved);
pnpObjectWatcher.removeEventListener("removed", onRemoved);
- or -
pnpObjectWatcher.onremoved = onRemoved;
Public Custom Event Removed As TypedEventHandler(Of PnpObjectWatcher, PnpObjectUpdate) 

이벤트 유형

적용 대상