From 2a4418284dc60c805e60ef187322a1ebc2cf84b1 Mon Sep 17 00:00:00 2001 From: gb <741021719@qq.com> Date: Sun, 6 Nov 2022 14:21:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0ERR=5FIO=E6=97=A5=E5=BF=97?= =?UTF-8?q?=EF=BC=9B=E4=BF=AE=E6=94=B9sane.vcxproj=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E6=97=B6=E7=94=9F=E6=88=90=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- device/win_usb/win_usb.cpp | 13 +++++++++++++ sane/sane.vcxproj | 2 ++ 2 files changed, 15 insertions(+) diff --git a/device/win_usb/win_usb.cpp b/device/win_usb/win_usb.cpp index 7bf95ab..f3af35d 100644 --- a/device/win_usb/win_usb.cpp +++ b/device/win_usb/win_usb.cpp @@ -666,7 +666,17 @@ int usb_device::transfer_bulk(unsigned endpoint, unsigned char* data, int* lengt ret = LIBUSB_ERROR_TIMEOUT; } else + { + if (endpoint & BULKIN_FLAG) + { + VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "Read-bulk = %d, set error as LIBUSB_ERROR_PIPE\r\n", io); + } + else + { + VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "Write-bulk = %d, set error as LIBUSB_ERROR_PIPE\r\n", io); + } ret = LIBUSB_ERROR_PIPE; + } } oc->release(); } @@ -758,7 +768,10 @@ int usb_device::transfer_interrupt(unsigned endpoint, unsigned char* data, int* } } else + { + VLOG_MINI_1(LOG_LEVEL_DEBUG_INFO, "DeviceIoControl(INT-EP) = %d, set error as LIBUSB_ERROR_PIPE\r\n", io); ret = LIBUSB_ERROR_PIPE; + } } oc->release(); } diff --git a/sane/sane.vcxproj b/sane/sane.vcxproj index dca9fca..44f813e 100644 --- a/sane/sane.vcxproj +++ b/sane/sane.vcxproj @@ -147,6 +147,7 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%" true %(AdditionalDependencies) $(ProjectDir)sane.def + UseLinkTimeCodeGeneration set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)\..\oem\huagao @@ -200,6 +201,7 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%" true scanner.lib;%(AdditionalDependencies) $(ProjectDir)sane.def + UseLinkTimeCodeGeneration set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)\..\oem\huagao