diff --git a/build_base.bat b/build_base.bat
index 6f27143..1f55f27 100644
--- a/build_base.bat
+++ b/build_base.bat
@@ -100,18 +100,18 @@ rem ----------------------------------------------------------------------------
mkdir %LIB_PATH%
mkdir %COMMON_LIB_PATH%
-MSBuild.exe "%~dp0\lang\lang.vcxproj" /p:Configuration=Release /p:Platform=%CPU% /p:IntDir=%TMP_PATH%\lang\ /p:OutDir=%BIN_PATH%\
+MSBuild.exe "%~dp0\lang\yuyanbao.vcxproj" /p:Configuration=Release /p:Platform=%CPU% /p:IntDir=%TMP_PATH%\lang\ /p:OutDir=%BIN_PATH%\
if %ERRORLEVEL% neq 0 goto end
-call :move_libs %BIN_PATH% lang %LIB_PATH%
-copy /y %LIB_PATH%\lang.lib %COMMON_LIB_PATH%
-MSBuild.exe "%~dp0\device\scanner.vcxproj" /p:Configuration=Release /p:Platform=%CPU% /p:IntDir=%TMP_PATH%\scanner\ /p:OutDir=%BIN_PATH%\
+call :move_libs %BIN_PATH% yuyanbao %LIB_PATH%
+copy /y %LIB_PATH%\yuyanbao.lib %COMMON_LIB_PATH%
+MSBuild.exe "%~dp0\device\scannerqd.vcxproj" /p:Configuration=Release /p:Platform=%CPU% /p:IntDir=%TMP_PATH%\scanner\ /p:OutDir=%BIN_PATH%\
if %ERRORLEVEL% neq 0 goto end
-call :move_libs %BIN_PATH% scanner %LIB_PATH%
-copy /y %LIB_PATH%\scanner.lib %COMMON_LIB_PATH%
-MSBuild.exe "%~dp0\sane\sane.vcxproj" /p:Configuration=Release /p:Platform=%CPU% /p:IntDir=%TMP_PATH%\sane\ /p:OutDir=%BIN_PATH%\
+call :move_libs %BIN_PATH% scannerqd %LIB_PATH%
+copy /y %LIB_PATH%\scannerqd.lib %COMMON_LIB_PATH%
+MSBuild.exe "%~dp0\sane\sanexy.vcxproj" /p:Configuration=Release /p:Platform=%CPU% /p:IntDir=%TMP_PATH%\sane\ /p:OutDir=%BIN_PATH%\
if %ERRORLEVEL% neq 0 goto end
-call :move_libs %BIN_PATH% sane %LIB_PATH%
-copy /y %LIB_PATH%\sane.lib %COMMON_LIB_PATH%
+call :move_libs %BIN_PATH% sanexy %LIB_PATH%
+copy /y %LIB_PATH%\sanexy.lib %COMMON_LIB_PATH%
goto end
REM move_libs src_dir src_name dst_dir
diff --git a/device/device.def b/device/device.def
index 08c38d1..d38e125 100644
--- a/device/device.def
+++ b/device/device.def
@@ -1,4 +1,4 @@
-LIBRARY scanner
+LIBRARY scannerqd
EXPORTS
hg_scanner_initialize
hg_scanner_uninitialize
diff --git a/device/resource.h b/device/resource.h
index ac4a468..645babf 100644
--- a/device/resource.h
+++ b/device/resource.h
@@ -1,8 +1,9 @@
//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by scanner.rc
+// Microsoft Visual C++ 生成的包含文件。
+// 供 scannerqd.rc 使用
+//
-// 新对象的下一组默认值
+// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
diff --git a/device/scanner.vcxproj.user b/device/scanner.vcxproj.user
deleted file mode 100644
index 52fecfc..0000000
--- a/device/scanner.vcxproj.user
+++ /dev/null
@@ -1,7 +0,0 @@
-锘
-
-
- C:\Program Files\HuaGoScan\HuaGoScan.exe
- WindowsLocalDebugger
-
-
\ No newline at end of file
diff --git a/device/scanner.rc b/device/scannerqd.rc
similarity index 95%
rename from device/scanner.rc
rename to device/scannerqd.rc
index dbb9e78..a58efd0 100644
--- a/device/scanner.rc
+++ b/device/scannerqd.rc
@@ -70,9 +70,9 @@ BEGIN
VALUE "CompanyName", "宁波华高信息科技有限公司"
VALUE "FileDescription", "华高扫描仪应用程序"
VALUE "FileVersion", "4.40.17100.23069"
- VALUE "InternalName", "scanner.dll"
+ VALUE "InternalName", "scannerqd.dll"
VALUE "LegalCopyright", "Copyright (C) HUAGOScan 2023"
- VALUE "OriginalFilename", "scanner.dll"
+ VALUE "OriginalFilename", "scannerqd.dll"
VALUE "ProductName", "HUAGOScan"
VALUE "ProductVersion", "4.40.17100.23069"
END
diff --git a/device/scanner.vcxproj b/device/scannerqd.vcxproj
similarity index 99%
rename from device/scanner.vcxproj
rename to device/scannerqd.vcxproj
index 8bff037..09f0085 100644
--- a/device/scanner.vcxproj
+++ b/device/scannerqd.vcxproj
@@ -22,7 +22,7 @@
16.0
Win32Proj
{9ed4b425-73e0-423e-9712-455e777481b4}
- scanner
+ scannerqd
10.0
@@ -118,7 +118,8 @@
- copy "$(TargetPath)" C:\Windows\twain_32\HuagoTwain\ /Y
+ copy "$(TargetPath)" C:\Windows\twain_32\HuagoTwain\ /Y
+$(SolutionDir)movlib.bat $(TargetName) $(PlatformTarget) huagao
@@ -347,7 +348,7 @@
-
+
diff --git a/device/scanner.vcxproj.filters b/device/scannerqd.vcxproj.filters
similarity index 99%
rename from device/scanner.vcxproj.filters
rename to device/scannerqd.vcxproj.filters
index 0d1b377..74ac08b 100644
--- a/device/scanner.vcxproj.filters
+++ b/device/scannerqd.vcxproj.filters
@@ -453,7 +453,7 @@
-
+
璧勬簮鏂囦欢
diff --git a/lang/lang.def b/lang/yuyanbao.def
similarity index 94%
rename from lang/lang.def
rename to lang/yuyanbao.def
index a53cdd5..236842d 100644
--- a/lang/lang.def
+++ b/lang/yuyanbao.def
@@ -1,4 +1,4 @@
-LIBRARY lang
+LIBRARY yuyanbao
EXPORTS
lang_initialize
lang_get_supported_languages
diff --git a/lang/lang.vcxproj b/lang/yuyanbao.vcxproj
similarity index 94%
rename from lang/lang.vcxproj
rename to lang/yuyanbao.vcxproj
index 060a9cf..c89688e 100644
--- a/lang/lang.vcxproj
+++ b/lang/yuyanbao.vcxproj
@@ -22,14 +22,14 @@
16.0
Win32Proj
{7776ab6d-6296-4f7a-a6ed-e9a4d6290dd9}
- lang
+ yuyanbao
10.0
DynamicLibrary
true
- v143
+ v142
Unicode
@@ -42,7 +42,7 @@
DynamicLibrary
true
- v143
+ v142
Unicode
@@ -103,11 +103,11 @@
Windows
true
false
- lang.def
+ yuyanbao.def
-
-
+ copy "$(TargetPath)" C:\Windows\twain_32\HuagoTwain\ /Y
+$(SolutionDir)movlib.bat $(TargetName) $(PlatformTarget) huagao
@@ -128,7 +128,7 @@
true
true
false
- lang.def
+ yuyanbao.def
@@ -148,7 +148,7 @@
Windows
true
false
- lang.def
+ yuyanbao.def
@@ -173,7 +173,7 @@
true
true
false
- lang.def
+ yuyanbao.def
@@ -202,7 +202,7 @@
-
+
diff --git a/lang/lang.vcxproj.filters b/lang/yuyanbao.vcxproj.filters
similarity index 97%
rename from lang/lang.vcxproj.filters
rename to lang/yuyanbao.vcxproj.filters
index aed7fe8..289ff8c 100644
--- a/lang/lang.vcxproj.filters
+++ b/lang/yuyanbao.vcxproj.filters
@@ -43,7 +43,7 @@
-
+
婧愭枃浠
diff --git a/sane/resource.h b/sane/resource.h
index f67dbaa..1b48766 100644
--- a/sane/resource.h
+++ b/sane/resource.h
@@ -1,6 +1,6 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ 生成的包含文件。
-// 供 sane.rc 使用
+// 供 sanexy.rc 使用
//
#define IDCANCEL2 3
#define IDD_INDICATOR 101
diff --git a/sane/sane.vcxproj.user b/sane/sane.vcxproj.user
deleted file mode 100644
index 88a5509..0000000
--- a/sane/sane.vcxproj.user
+++ /dev/null
@@ -1,4 +0,0 @@
-锘
-
-
-
\ No newline at end of file
diff --git a/sane/sane_option_trans.cpp b/sane/sane_option_trans.cpp
index 4fc7979..8027002 100644
--- a/sane/sane_option_trans.cpp
+++ b/sane/sane_option_trans.cpp
@@ -214,6 +214,15 @@ namespace sane_opt_trans
{
VALUE_TO_TWAIN(g_paper_map, val);
+ std::string lat("\xe6\xa8\xaa\xe5\x90\x91"), // 妯悜
+ v(to_default_language(val, nullptr));
+ size_t pos = v.find(lat);
+ if (pos != std::string::npos)
+ {
+ v.erase(pos, lat.length());
+ VALUE_TO_TWAIN(g_paper_map, v.c_str());
+ }
+
return -1;
}
const char* switch_paper_lateral(const char* val)
diff --git a/sane/sane.def b/sane/sanexy.def
similarity index 100%
rename from sane/sane.def
rename to sane/sanexy.def
diff --git a/sane/sane.rc b/sane/sanexy.rc
similarity index 99%
rename from sane/sane.rc
rename to sane/sanexy.rc
index 47ade48..253f075 100644
--- a/sane/sane.rc
+++ b/sane/sanexy.rc
@@ -367,9 +367,9 @@ BEGIN
VALUE "CompanyName", "上海中晶科技有限公司"
VALUE "FileDescription", "中晶扫描仪应用程序"
VALUE "FileVersion", "4.37.20000.23034"
- VALUE "InternalName", "sane.dll"
+ VALUE "InternalName", "sanexy.dll"
VALUE "LegalCopyright", "Copyright (C) MICROTEKScan 2023"
- VALUE "OriginalFilename", "sane.dll"
+ VALUE "OriginalFilename", "sanexy.dll"
VALUE "ProductName", "MICROTEKScan"
VALUE "ProductVersion", "4.37.20000.23034"
END
diff --git a/sane/sane.vcxproj b/sane/sanexy.vcxproj
similarity index 94%
rename from sane/sane.vcxproj
rename to sane/sanexy.vcxproj
index 8be8fd2..94a4024 100644
--- a/sane/sane.vcxproj
+++ b/sane/sanexy.vcxproj
@@ -22,9 +22,9 @@
16.0
Win32Proj
{6eec8a02-7f98-4422-8ed6-2434d43bd1e1}
- sane
+ sanexy
10.0
- sane
+ sanexy
@@ -113,12 +113,13 @@
Console
true
%(AdditionalDependencies)
- $(ProjectDir)sane.def
+ $(ProjectDir)sanexy.def
- copy "$(TargetPath)" C:\Windows\twain_32\HuagoTwain\$(TargetName) /y
+ copy "$(TargetPath)" C:\Windows\twain_32\HuagoTwain\ /Y
+$(SolutionDir)movlib.bat $(TargetName) $(PlatformTarget) huagao
@@ -139,7 +140,7 @@
true
true
%(AdditionalDependencies)
- $(ProjectDir)sane.def
+ $(ProjectDir)sanexy.def
UseLinkTimeCodeGeneration
@@ -159,8 +160,8 @@
Console
true
- scanner.lib;%(AdditionalDependencies)
- $(ProjectDir)sane.def
+ %(AdditionalDependencies)
+ $(ProjectDir)sanexy.def
@@ -183,8 +184,8 @@
true
true
true
- scanner.lib;%(AdditionalDependencies)
- $(ProjectDir)sane.def
+ %(AdditionalDependencies)
+ $(ProjectDir)sanexy.def
UseLinkTimeCodeGeneration
@@ -243,13 +244,13 @@
-
+
-
+
diff --git a/sane/sane.vcxproj.filters b/sane/sanexy.vcxproj.filters
similarity index 98%
rename from sane/sane.vcxproj.filters
rename to sane/sanexy.vcxproj.filters
index 73d0df0..d1fe46f 100644
--- a/sane/sane.vcxproj.filters
+++ b/sane/sanexy.vcxproj.filters
@@ -163,7 +163,7 @@
-
+
婧愭枃浠
@@ -171,7 +171,7 @@
-
+
璧勬簮鏂囦欢
diff --git a/sane/scanner.cpp b/sane/scanner.cpp
index 9095c6a..2b68b65 100644
--- a/sane/scanner.cpp
+++ b/sane/scanner.cpp
@@ -1588,6 +1588,7 @@ int scanner::set_is_multiout(bool enable)
int scanner::thread_start(void)
{
scan_over_ = false;
+ double_handle_ = DOUBLE_FEED_NEED_UI;
int ret = hg_sane_middleware::instance()->start(handle_, NULL);
@@ -1949,6 +1950,7 @@ EX_OPTION_HANDLER_IMPL(paper)
int now = sane_opt_trans::paper_to_twain(buf),
init = sane_opt_trans::paper_to_twain(def),
val = 0;
+ std::vector exists;
local_utility::free_memory(def);
do
@@ -1959,8 +1961,10 @@ EX_OPTION_HANDLER_IMPL(paper)
{
value_role role = VAL_ROLE_NONE;
val = sane_opt_trans::paper_to_twain(desc->constraint.string_list[i]);
- if (val == -1)
+ if (val == -1 || std::find(exists.begin(), exists.end(), val) != exists.end())
continue;
+
+ exists.push_back(val);
if (val == now)
role = VAL_ROLE_CURRENT;
if (val == init)
@@ -3576,15 +3580,23 @@ int scanner::handle_device_event(int ev_code, void* data, unsigned int* len)
if (simg->flag.statu && callback::abnormal_image)
{
- if (callback::abnormal_image(simg) == SANE_Abnormal_Image_Discard)
+ if (double_handle_ == DOUBLE_FEED_NEED_UI)
{
- wchar_t info[128] = { 0 };
+ if (callback::abnormal_image(simg) == SANE_Abnormal_Image_Discard)
+ {
+ wchar_t info[128] = { 0 };
- swprintf_s(info, _countof(info) - 1, L"Discard image %d for the status is: %d\r\n", simg->src_id, simg->flag.statu);
- log_info(info, LOG_LEVEL_DEBUG_INFO);
+ swprintf_s(info, _countof(info) - 1, L"Discard image %d for the status is: %d\r\n", simg->src_id, simg->flag.statu);
+ log_info(info, LOG_LEVEL_DEBUG_INFO);
- return 0;
+ double_handle_ = DOUBLE_FEED_DISCARD;
+ }
+ else
+ double_handle_ = DOUBLE_FEED_KEEP;
}
+
+ if (double_handle_ == DOUBLE_FEED_DISCARD)
+ return 0;
}
swprintf_s(name, _countof(name) - 1, L"img_%05u.bmp", ++img_ind_);
diff --git a/sane/scanner.h b/sane/scanner.h
index 203f239..1cf6b5f 100644
--- a/sane/scanner.h
+++ b/sane/scanner.h
@@ -40,6 +40,13 @@ class scanner : public ISaneInvoker, virtual public refer
int bytes;
}SIMPLEOPT;
+ enum
+ {
+ DOUBLE_FEED_NEED_UI = 0, // 闇瑕佺敤鎴锋妷鎷
+ DOUBLE_FEED_KEEP, // 鐢ㄦ埛閫夋嫨淇濆瓨
+ DOUBLE_FEED_DISCARD, // 鐢ㄦ埛閫夋嫨涓㈠純
+ };
+
SANE_Handle handle_;
SCANNERID id_;
int err_;
@@ -47,6 +54,7 @@ class scanner : public ISaneInvoker, virtual public refer
int prev_start_result_;
int dpi_;
int fetch_imgs_ = 0; // count for images has fetched by APP
+ int double_handle_ = DOUBLE_FEED_NEED_UI; //
bool is_bIndicator;
bool is_show_setting_;
unsigned int img_ind_;
diff --git a/sln/Release/hgsetver.exe b/sln/Release/hgsetver.exe
index d0a612a..f3eacc5 100644
Binary files a/sln/Release/hgsetver.exe and b/sln/Release/hgsetver.exe differ
diff --git a/sln/hgscanner.sln b/sln/hgscanner.sln
index 9b65298..c34f734 100644
--- a/sln/hgscanner.sln
+++ b/sln/hgscanner.sln
@@ -3,17 +3,26 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.33214.272
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sane", "..\sane\sane.vcxproj", "{6EEC8A02-7F98-4422-8ED6-2434D43BD1E1}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sanexy", "..\sane\sanexy.vcxproj", "{6EEC8A02-7F98-4422-8ED6-2434D43BD1E1}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9ED4B425-73E0-423E-9712-455E777481B4} = {9ED4B425-73E0-423E-9712-455E777481B4}
+ EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scanner", "..\device\scanner.vcxproj", "{9ED4B425-73E0-423E-9712-455E777481B4}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scannerqd", "..\device\scannerqd.vcxproj", "{9ED4B425-73E0-423E-9712-455E777481B4}"
+ ProjectSection(ProjectDependencies) = postProject
+ {7776AB6D-6296-4F7A-A6ED-E9A4D6290DD9} = {7776AB6D-6296-4F7A-A6ED-E9A4D6290DD9}
+ EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "twain", "..\twain\twain.vcxproj", "{C3B47CE2-27CE-4509-AB59-3C0F194F0FCE}"
+ ProjectSection(ProjectDependencies) = postProject
+ {6EEC8A02-7F98-4422-8ED6-2434D43BD1E1} = {6EEC8A02-7F98-4422-8ED6-2434D43BD1E1}
+ EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "setup", "setup", "{F6774650-403F-476C-8373-2EA8D4AF06FF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hgsetver", "hgsetver\hgsetver.vcxproj", "{A7528596-FBA2-4FFF-8649-C8D0EEBC6554}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lang", "..\lang\lang.vcxproj", "{7776AB6D-6296-4F7A-A6ED-E9A4D6290DD9}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yuyanbao", "..\lang\yuyanbao.vcxproj", "{7776AB6D-6296-4F7A-A6ED-E9A4D6290DD9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/sln/hgsetver/hgsetver.cpp b/sln/hgsetver/hgsetver.cpp
index 8d68f93..80fda1e 100644
--- a/sln/hgsetver/hgsetver.cpp
+++ b/sln/hgsetver/hgsetver.cpp
@@ -1373,12 +1373,12 @@ static bool set_ver(const wchar_t* file, oem vendor, bool x86, int pid, int main
//if (!rc::change_vcxproj_predefine(rcf.c_str(), vendor))
// std::wcout << "change predefines failed: " << rcf.c_str() << std::endl;
- rcf = base + L"\\..\\sane\\sane.rc";
+ rcf = base + L"\\..\\sane\\sanexy.rc";
STR_SIMPLIFY_PATH(rcf);
if (!rc::set_rc_ver(rcf.c_str(), main, sub, build, patch, cn.c_str(), scn.c_str(), vs.c_str()))
std::wcout << "change version failed: " << rcf.c_str() << std::endl;
- rcf = base + L"\\..\\sane\\sane.def";
+ rcf = base + L"\\..\\sane\\sanexy.def";
STR_SIMPLIFY_PATH(rcf);
if (!rc::change_file(rcf.c_str(), ¶m, rc::change_sane_def))
std::wcout << "change exporting-definition failed: " << rcf.c_str() << std::endl;
@@ -1388,7 +1388,7 @@ static bool set_ver(const wchar_t* file, oem vendor, bool x86, int pid, int main
//if (!rc::change_vcxproj_predefine(rcf.c_str(), vendor))
// std::wcout << "change predefines failed: " << rcf.c_str() << std::endl;
- rcf = base + L"\\..\\device\\scanner.rc";
+ rcf = base + L"\\..\\device\\scannerqd.rc";
STR_SIMPLIFY_PATH(rcf);
if (!rc::set_rc_ver(rcf.c_str(), main, sub, build, patch, cn.c_str(), scn.c_str(), vs.c_str()))
std::wcout << "change version failed: " << rcf.c_str() << std::endl;
diff --git a/sln/movlib.bat b/sln/movlib.bat
new file mode 100644
index 0000000..f5aa63d
--- /dev/null
+++ b/sln/movlib.bat
@@ -0,0 +1,12 @@
+# movlib proj-name cpu oem
+
+set NAME=%1
+set CPU=%2
+set OEM=%3
+set SRCDIR=%~dp0\..\..\release\win\%CPU%\OEM\%OEM%\
+set DSTDIR=%~dp0\..\..\sdk\lib\win\%CPU%\OEM\%OEM%\
+
+mkdir "%DSTDIR%"
+move /y "%SRCDIR%\%NAME%.exp" "%DSTDIR%"
+move /y "%SRCDIR%\%NAME%.lib" "%DSTDIR%"
+move /y "%SRCDIR%\%NAME%.pdb" "%DSTDIR%"
diff --git a/twain/load_sane.cpp b/twain/load_sane.cpp
index a82595a..c9327a1 100644
--- a/twain/load_sane.cpp
+++ b/twain/load_sane.cpp
@@ -147,7 +147,7 @@ namespace load_sane_util
sane_path = reg_get_app_installing_path(®_path);
if (!sane_path.empty())
{
- sane_path += L"\\sane.dll";
+ sane_path += /*L"\\sane.dll";*/ L"\\" + m2u(MODULE_NAME_SANE, CP_UTF8);
load_dll(sane_path.c_str(), &sane_module);
if (sane_module)
{
diff --git a/twain/twain/huagaods.cpp b/twain/twain/huagaods.cpp
index f7605d8..2da7abb 100644
--- a/twain/twain/huagaods.cpp
+++ b/twain/twain/huagaods.cpp
@@ -601,6 +601,20 @@ static void copy_type(std::string& to, Str64 from)
{
to = load_sane_util::ansi2utf8(from.data());
}
+static std::wstring scanner_status_desc(int ss)
+{
+#define RETURN_IF_MATCH(v) \
+ if(ss == v) \
+ return L###v;
+
+ RETURN_IF_MATCH(SCANNER_STATUS_NOT_INIT);
+ RETURN_IF_MATCH(SCANNER_STATUS_READY);
+ RETURN_IF_MATCH(SCANNER_STATUS_SCAN_1);
+ RETURN_IF_MATCH(SCANNER_STATUS_SCANNING);
+ RETURN_IF_MATCH(SCANNER_STATUS_STOPPED);
+
+ return std::move(L"unknown statu " + std::to_wstring(ss));
+}
template
bool list_value_at(std::list& lst, int ind, T& t)
@@ -1060,6 +1074,8 @@ Result huagao_ds::identityOpenDs(const Identity& id)
}
Result huagao_ds::identityCloseDs(const Identity&)
{
+ load_sane_util::to_log(1, L"identityCloseDs, scanner status is '%s'\r\n", scanner_status_desc(scanner_status_).c_str());
+
if (notify_close_thread_.get() && notify_close_thread_->joinable())
notify_close_thread_->join();
@@ -2576,13 +2592,13 @@ void huagao_ds::init_support_caps(void)
if (Msg::Set == msg) {
auto autodetectborder = data.currentItem();
int ret = SCANNER_ERR_OK;
- SET_SANE_OPT_EX(ret, scanner_, is_size_check, (bool*)&autodetectborder);
+ SET_SANE_OPT_EX(ret, scanner_, ex_auto_paper_size, (bool*)&autodetectborder);
return ret == SCANNER_ERR_OK ? success() : badValue();
}
Bool init = false,
erase = false;
std::vector all;
- GET_SANE_OPT_EX(bool, scanner_, is_size_check, NULL, &all);
+ GET_SANE_OPT_EX(bool, scanner_, ex_auto_paper_size, NULL, &all);
init = (bool)all[sane_opts::RANGE_POS_DEFAULT];
erase = (bool)all[sane_opts::RANGE_POS_CURRENT];
return CapSupGetAllReset(msg, data, { false,true }, erase, init, erase ? 1 : 0, 0);