Windows SDK 10.0.18362.0 adds a new error code ERROR_NO_SUCH_DEVICE
which is returned when the device is disconnected.
Closes #721, Closes #722
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
break;
case ERROR_FILE_NOT_FOUND:
case ERROR_DEVICE_NOT_CONNECTED:
+ case ERROR_NO_SUCH_DEVICE:
usbi_dbg("detected device removed");
status = LIBUSB_TRANSFER_NO_DEVICE;
break;
#define USBD_STATUS_CANCELED ((USBD_STATUS)0xC0010000L)
#endif
+// error code added with Windows SDK 10.0.18362
+#ifndef ERROR_NO_SUCH_DEVICE
+#define ERROR_NO_SUCH_DEVICE 433L
+#endif
+
/* Windows versions */
enum windows_version {
WINDOWS_UNDEFINED,
-#define LIBUSB_NANO 11515
+#define LIBUSB_NANO 11516