USB_DK_DEVICE_INFO info;
PUSB_CONFIGURATION_DESCRIPTOR *config_descriptors;
HANDLE redirector_handle;
+ HANDLE system_handle;
uint8_t active_configuration;
};
return LIBUSB_ERROR_OTHER;
}
+ priv->system_handle = usbdk_helper.GetRedirectorSystemHandle(priv->redirector_handle);
+
return LIBUSB_SUCCESS;
}
struct winfd wfd;
ULONG Length;
TransferResult transResult;
- HANDLE sysHandle;
- sysHandle = usbdk_helper.GetRedirectorSystemHandle(priv->redirector_handle);
- wfd = usbi_create_fd(sysHandle, RW_READ, NULL, NULL);
+ wfd = usbi_create_fd(priv->system_handle, RW_READ, NULL, NULL);
// Always use the handle returned from usbi_create_fd (wfd.handle)
if (wfd.fd < 0)
return LIBUSB_ERROR_NO_MEM;
struct libusb_context *ctx = TRANSFER_CTX(transfer);
struct winfd wfd;
TransferResult transferRes;
- HANDLE sysHandle;
transfer_priv->request.Buffer = (PVOID64)transfer->buffer;
transfer_priv->request.BufferLength = transfer->length;
transfer_priv->pollable_fd = INVALID_WINFD;
- sysHandle = usbdk_helper.GetRedirectorSystemHandle(priv->redirector_handle);
-
- wfd = usbi_create_fd(sysHandle, IS_XFERIN(transfer) ? RW_READ : RW_WRITE, NULL, NULL);
+ wfd = usbi_create_fd(priv->system_handle, IS_XFERIN(transfer) ? RW_READ : RW_WRITE, NULL, NULL);
// Always use the handle returned from usbi_create_fd (wfd.handle)
if (wfd.fd < 0)
return LIBUSB_ERROR_NO_MEM;
struct winfd wfd;
TransferResult transferRes;
int i;
- HANDLE sysHandle;
transfer_priv->request.Buffer = (PVOID64)transfer->buffer;
transfer_priv->request.BufferLength = transfer->length;
transfer_priv->pollable_fd = INVALID_WINFD;
- sysHandle = usbdk_helper.GetRedirectorSystemHandle(priv->redirector_handle);
-
- wfd = usbi_create_fd(sysHandle, IS_XFERIN(transfer) ? RW_READ : RW_WRITE, NULL, NULL);
+ wfd = usbi_create_fd(priv->system_handle, IS_XFERIN(transfer) ? RW_READ : RW_WRITE, NULL, NULL);
// Always use the handle returned from usbi_create_fd (wfd.handle)
if (wfd.fd < 0) {
free(transfer_priv->IsochronousPacketsArray);