/// <summary> /// Requests to stop receiving notification messages when a device in an /// interface class is attached or removed. /// </summary> /// /// <param name="deviceNotificationHandle"> handle returned previously by /// RegisterDeviceNotification. </param> internal void StopReceivingDeviceNotifications(IntPtr deviceNotificationHandle) { try { // *** // API function // summary // Stop receiving notification messages. // parameters // Handle returned previously by RegisterDeviceNotification. // returns // True on success. // *** // Ignore failures. DeviceManagement.UnregisterDeviceNotification(deviceNotificationHandle); } catch (Exception ex) { throw; } }
/// <summary> /// Requests to stop receiving notification messages when a device in an /// interface class is attached or removed. /// </summary> /// /// <param name="deviceNotificationHandle"> handle returned previously by /// RegisterDeviceNotification. </param> internal void StopReceivingDeviceNotifications(IntPtr deviceNotificationHandle) { try { // Ignore failures. DeviceManagement.UnregisterDeviceNotification(deviceNotificationHandle); } #pragma warning disable 0168 catch (Exception ex) #pragma warning restore 0168 { throw; } }