From f5f105587497a0bf5b753aa9c6b86e6edb6c7b45 Mon Sep 17 00:00:00 2001 From: gb <741021719@qq.com> Date: Wed, 8 Jun 2022 09:31:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E9=94=99=E8=AF=AF=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hgdriver/wrapper/hg_log.cpp | 6 +++++- hgdriver/wrapper/hg_log.h | 1 + hgdriver/wrapper/huagaoxxx_warraper_ex.cpp | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/hgdriver/wrapper/hg_log.cpp b/hgdriver/wrapper/hg_log.cpp index db4ab0a..2f48875 100644 --- a/hgdriver/wrapper/hg_log.cpp +++ b/hgdriver/wrapper/hg_log.cpp @@ -523,6 +523,10 @@ extern "C" return home; } + std::string temporary_path(void) + { + return simple_ini::temporary_path(); + } int init(void) { @@ -534,7 +538,7 @@ extern "C" if (type == LOG_TYPE_FILE) { std::string name(""), - paths[] = { local_data_path(), pe_path(&name), get_scanner_path(), simple_ini::temporary_path()}; + paths[] = { local_data_path(), pe_path(&name), get_scanner_path(), temporary_path()}; int ind = 0; if (!path.empty() && create_folder(path.c_str())) diff --git a/hgdriver/wrapper/hg_log.h b/hgdriver/wrapper/hg_log.h index 7d123ef..9ad0e90 100644 --- a/hgdriver/wrapper/hg_log.h +++ b/hgdriver/wrapper/hg_log.h @@ -50,6 +50,7 @@ extern "C" std::string get_module_full_path(const char* module_part_name); std::string get_scanner_path(void); std::string local_data_path(void); + std::string temporary_path(void); unsigned int get_page_size(void); unsigned long long available_memory(void); void str_tolower(std::string& str); diff --git a/hgdriver/wrapper/huagaoxxx_warraper_ex.cpp b/hgdriver/wrapper/huagaoxxx_warraper_ex.cpp index eec4c1f..253ed73 100644 --- a/hgdriver/wrapper/huagaoxxx_warraper_ex.cpp +++ b/hgdriver/wrapper/huagaoxxx_warraper_ex.cpp @@ -169,6 +169,7 @@ extern "C" RETURN_IF(err, SCANNER_ERR_CREATE_FILE_FAILED); RETURN_IF(err, SCANNER_ERR_WRITE_FILE_FAILED); RETURN_IF(err, SCANNER_ERR_DATA_DAMAGED); + RETURN_IF(err, SCANNER_ERR_OPENED_BY_OTHER_PROCESS); RETURN_IF(err, SCANNER_ERR_USB_INIT_FAILED); RETURN_IF(err, SCANNER_ERR_USB_REGISTER_PNP_FAILED); RETURN_IF(err, SCANNER_ERR_USB_CLAIM_INTERFACE_FAILED); @@ -229,6 +230,7 @@ extern "C" RETURN_DESC_IF(err, SCANNER_ERR_CREATE_FILE_FAILED); RETURN_DESC_IF(err, SCANNER_ERR_WRITE_FILE_FAILED); RETURN_DESC_IF(err, SCANNER_ERR_DATA_DAMAGED); + RETURN_DESC_IF(err, SCANNER_ERR_OPENED_BY_OTHER_PROCESS); RETURN_DESC_IF(err, SCANNER_ERR_USB_INIT_FAILED); RETURN_DESC_IF(err, SCANNER_ERR_USB_REGISTER_PNP_FAILED); RETURN_DESC_IF(err, SCANNER_ERR_USB_CLAIM_INTERFACE_FAILED);