RemoteSystemWatcher.ErrorOccurred Событие

Определение

Это событие возникает при возникновении ошибки во время обнаружения. Процесс обнаружения будет продолжен, если это возможно. Например, если ошибка возникает со значением RemoteSystemWatcherError.InternetNotAvailable (см . раздел RemoteSystemWatcherError), то проксимальное обнаружение продолжится, так как ошибка применяется только к облачному обнаружению (см. RemoteSystemDiscoveryType).

// Register
event_token ErrorOccurred(TypedEventHandler<RemoteSystemWatcher, RemoteSystemWatcherErrorOccurredEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
RemoteSystemWatcher::ErrorOccurred_revoker ErrorOccurred(auto_revoke_t, TypedEventHandler<RemoteSystemWatcher, RemoteSystemWatcherErrorOccurredEventArgs const&> const& handler) const;
public event TypedEventHandler<RemoteSystemWatcher,RemoteSystemWatcherErrorOccurredEventArgs> ErrorOccurred;
function onErrorOccurred(eventArgs) { /* Your code */ }
remoteSystemWatcher.addEventListener("erroroccurred", onErrorOccurred);
remoteSystemWatcher.removeEventListener("erroroccurred", onErrorOccurred);
- or -
remoteSystemWatcher.onerroroccurred = onErrorOccurred;
Public Custom Event ErrorOccurred As TypedEventHandler(Of RemoteSystemWatcher, RemoteSystemWatcherErrorOccurredEventArgs) 

Тип события

Требования к Windows

Семейство устройств
Windows 10, version 1803 (появилось в 10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (появилось в v6.0)

Комментарии

Прослушиватель для этого события должен уведомить пользователя о типе обнаруженной ошибки. Дополнительные сведения см. в перечислении RemoteSystemWatcherError .

Применяется к