diff --git a/libusbK/src/lusbk_bknd_libusb0.c b/libusbK/src/lusbk_bknd_libusb0.c index 57333bd..6bac2a4 100644 --- a/libusbK/src/lusbk_bknd_libusb0.c +++ b/libusbK/src/lusbk_bknd_libusb0.c @@ -50,8 +50,6 @@ KUSB_EXP BOOL KUSB_API LUsb0_ControlTransfer( int ret; PKUSB_HANDLE_INTERNAL handle; - UNUSED(Overlapped); - Pub_To_Priv_UsbK(InterfaceHandle, handle, return FALSE); ErrorSetAction(!PoolHandle_Inc_UsbK(handle), ERROR_RESOURCE_NOT_AVAILABLE, return FALSE, "->PoolHandle_Inc_UsbK"); @@ -73,6 +71,9 @@ KUSB_EXP BOOL KUSB_API LUsb0_ControlTransfer( PoolHandle_Dec_UsbK(handle); + if (Overlapped && Overlapped.hEvent) + return SetEvent(Overlapped.hEvent); + return success; } @@ -310,4 +311,4 @@ int _usb_io_sync(HANDLE dev, unsigned int code, void *out, int out_size, CloseHandle(ol.hEvent); return FALSE; -} \ No newline at end of file +}