From 02e9a1b5ec8313478b52fb5535ed01db065392fe Mon Sep 17 00:00:00 2001 From: yangjiaxuan <171295266@qq.com> Date: Wed, 17 May 2023 18:29:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=BE=E5=A4=87=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E5=92=8C=E9=A9=B1=E5=8A=A8=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scanner/Scanner_zh_CN.qm | Bin 35931 -> 36373 bytes app/scanner/Scanner_zh_CN.ts | 302 +++++++++++++------------- app/scanner/Scanner_zh_EN.qm | Bin 46506 -> 47190 bytes app/scanner/Scanner_zh_EN.ts | 302 +++++++++++++------------- app/scanner/device_user.cpp | 22 +- app/scanner/device_user.h | 4 +- app/scanner/mainwindow.cpp | 4 +- build2/qt/HGTwainUser/HGTwainUser.def | 4 +- modules/twain_user/HGTwain.cpp | 8 +- modules/twain_user/HGTwain.h | 4 +- modules/twain_user/HGTwainImpl.cpp | 70 ++++-- modules/twain_user/HGTwainImpl.hpp | 4 +- 12 files changed, 397 insertions(+), 327 deletions(-) diff --git a/app/scanner/Scanner_zh_CN.qm b/app/scanner/Scanner_zh_CN.qm index 3236039d9db7b500f28c0cd0afc299b79ae04c3c..b24effd82a240b83cfc0d23a8cb09984f30e453d 100644 GIT binary patch delta 2007 zcmZuxZBSI_6@K=@y}NsN@2(=C!H-!$Rz(X&1S=vM1XQXbA}9*D%kBl1k6qYZJ`{m5 z#tC6j>%3w`1)~w-SB!>$ngEGa+t`X4BUnFT8xvb?gCW*xGn27BnVmY5nf|!*-1pr3 zKIb{-Iq!RCH`lz63y3>o9rK6p_BHnhkNd=Qp!drJV1!{uz&5VtpF7%fxs9!iS7dS( z!z@QJfvb*XwF;x(hEVtpZUt&;ytwg?tV@v@yY3g@k3R)MUk88TeZq$j9=-**VxgR# z1cVhpSug<9u7J{Wh}P$!J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=QCy2?s43VqpYO(<8G&PK_4ue8+~-!1h-zEl$+5_zvtgha+$tr;Ij%`S*! zOJ%)}!CMpKPseIQ59UT_Vm99aMkH(IuY3vwKGqlx&jq4&tX+;WTH0hc(|BO=B)R`Y zYAM|;e{!$@kgm#}^Ul&Bo#mmXGLm+$?DKa6FtbMXi#L$hjI#f#Wpw{ij!0ig@7~Lk z&YFPuf8;4VQ66?ojxkdk#;@2?ZLHA{Cm)I+Uli|=PkSYh(yel91u5a`C3ik~0~BqL ze{-d@IS1tD%Sfr@Jo&%2nY16?Jy`6ZbqH=GzYW*w7SjIo`k)=Tt(punRy(e53n{B% zqjXcF(>d+A@;;Q_q`h&5s+;4q9VfKpuX=6w1S+4CujBW%1F}`8iM0R&r|Vpu!|3@0 z-PF#@fP1QLdPD#X<}JIV%ixwwvIRR;C9#a0)wU_QSG26e;%uuZvny<6%fHe559op9 A*Z=?k diff --git a/app/scanner/Scanner_zh_CN.ts b/app/scanner/Scanner_zh_CN.ts index 7273c194..8e54c4af 100644 --- a/app/scanner/Scanner_zh_CN.ts +++ b/app/scanner/Scanner_zh_CN.ts @@ -2065,7 +2065,7 @@ bug description: - + act_acquireInto 扫描至... @@ -2295,48 +2295,48 @@ bug description: 选择设备源... - + HuaGoScan 华高扫描软件 - + Grid 多列显示 - + Move To... 移动到... - + Insert files 插入文件 - - + + nodevice 没有发现扫描仪 - - - - - + + + + + Question 询问 - + modified, save it? 图像已被修改。 是否保存修改? - + file lost, remove it? 文件已丢失,是否删除? @@ -2361,17 +2361,17 @@ bug description: 扫描完成 - + Clear, then start scan 清空并启动扫描 - + Do NOT clear, then start scan 不清空并启动扫描 - + Already exist images in image list. Do you want to clear? 图像列表中已存在图像。 @@ -2386,12 +2386,12 @@ Do you want to clear? 磁盘空间不足,请删除不需要的文件,以保证有足够的空间 - + Open images 打开图片 - + Insert images 插入图片 @@ -2404,17 +2404,17 @@ Do you want to clear? 保存失败 - + binary 黑白 - + gray 256级灰度 - + rgb 24位彩色 @@ -2423,200 +2423,200 @@ Do you want to clear? 请手动唤醒设备 - + UniScan 紫光扫描软件 - + Scan 扫描软件 - - + + default scheme 默认配置方案 - + thumbnailBar enabled 显示缩略图栏 - + thumbnailBar hidden 隐藏缩略图栏 - + cancel 取消 - - - + + + save succeed 保存成功 - - + + find savePath in thumbnail 图片名在列表中已存在 - + Please select at least one picture before export 请至少选中一张图片再进行导出 - + File name 文件名 - + File path 文件路径 - + File size 文件大小 - + Creation date/time 创建时间 - + Modified date/time 修改时间 - + Accessed date/time 访问时间 - + Format 格式 - + Width 宽度 - + Height 高度 - + depth 深度 - + Color model 色彩模式 - + DPI 每英寸像素点 - + Print size 打印尺寸 - + Frame - + None - + Mono 黑白 - + Gray 灰度 - + Color 彩色 - + Not supported 不支持 - + Warning 警告 - + Device is Running! Please finish scanning first. 设备正在运行! 请先结束扫描。 - + <p>DriverVer: %1</p> <p>版本号: %1</p> - + <p>Vendor: %1</p> <p>制造商: %1</p> - + <p>Copyright: %1</p> <p>版权信息: %1</p> - + <p>Company website: <a href=%1>%1</p> <p>公司网址: <a href=%1>%1</p> - + <p>Company address: %1</p> <p>公司地址: %1</p> - + <p>Company telephone: %1</p> <p>公司电话: %1</p> - + <p>Company GPS: <a href=%1>%2</p> <p>公司地图定位: <a href=%1>%2</p> - + Baidu map access 百度地图访问 @@ -2633,7 +2633,7 @@ Please finish scanning first. 扫描张数: %1 - + Device %1 is open 设备 %1 已打开 @@ -2642,70 +2642,70 @@ Please finish scanning first. 关于 - + cache path folder limit:%1 无法访问当前缓存路径:%1 请尝试在【用户】菜单登录管理员账户,前往【缓存设置】更改缓存路径。 - + aquireinto folder limit:%1 无法访问当前缓存路径:%1 请尝试在【扫描到】更改缓存路径。 - + Image processing failed 图像处理失败 - + Ocr init failed OCR初始化错误 - + Ocr failed OCR错误 - + File does not exist 文件不存在 - + Failed to load dynamic library 加载动态库失败 - + File data error 文件数据错误 - + Image format processing error 图像格式处理错误 - + Out of memory 内存不足 - + Failed 错误 - - + + The language switch is successful and takes effect the next time the software is started! 语言切换成功,下次启动软件时生效! - + Are you sure to delete selected file? 您确定彻底删除选中项文件? @@ -2723,7 +2723,7 @@ Please finish scanning first. 请尝试在【用户】菜单登录管理员账户,前往【缓存设置】更改缓存路径 - + Insufficient access rights 文件访问权限不足 @@ -2748,26 +2748,28 @@ Please finish scanning first. 关闭 - + tip 提示 - + Other versions not available 未获取到其他版本 + + The device does not support this operation - 设备不支持该操作 + 设备不支持该操作 IO error IO错误 - - + + error 错误 @@ -2782,7 +2784,7 @@ Continue to close? 是否继续关闭? - + Sure to sign out administrator account? 是否确定登出管理员账户? @@ -2848,51 +2850,51 @@ Continue to close? 应用配置 + - - - - - - - - - + + + + + + + + start failed 启动失败 - + HanvonScan 汉王扫描软件 - + LanxumScan 立思辰扫描软件 - + CumtennScan 沧田扫描软件 - + MicrotekScan Microtek DocWizard EX 扫描软件 - + menu_language 语言 - + act_simpCN 简体中文 - + act_English English @@ -2907,47 +2909,47 @@ Continue to close? 切换图片时,不提醒,直接保存编辑过的图片 - + statusBar displayed 显示状态栏 - + statusBar hidden 隐藏状态栏 - + toolBar displayed 显示工具栏 - + toolBar hidden 隐藏工具栏 - + colorInfo enabled 启用图像信息 - + colorInfo disenabled 关闭图像信息 - + enabling automatic saving 启用自动保存 - + cancel auto save 取消自动保存 - + Automatically save the edited the edited iamge when switching pictures. To cancel, uncheck the menu item: image-> automatically save 切换图片时,自动保存编辑过的图像。若想取消,请取消勾选菜单项:图像->自动保存 @@ -2976,13 +2978,13 @@ Continue to close? 已经连接,但打开失败 - + save image failed: 存图失败: - - + + create savepath failed: 创建文件夹失败: @@ -2991,17 +2993,17 @@ Continue to close? %1%2%3.%4 - + create image doc failed: 创建图片文件失败: - - - - - - + + + + + + save image doc failed: 保存图片文件失败: @@ -3040,17 +3042,17 @@ Continue to close? 滚轴张数: %1 - + Detected that there is less than 1GB of disk space. Do you want to continue? 检测到磁盘空间已不足1GB,是否继续? - + start failed! 启动安装程序失败! - + There are pictures that have not been saved. Are you sure to close? 有图像未保存,确定关闭? @@ -3060,55 +3062,63 @@ Are you sure to close? 发现设备 : %1 - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + tips 提示 - + Are you sure to close? 确定关闭应用软件? + confirm operation - 确认操作 + 确认操作 + are you sure to clear the roller count? - 您确定要清除滚轴计数吗 + 您确定要清除滚轴计数吗 hint 提示 + Roller scanned count has been set to 0. - 辊轴计数已置零 + 辊轴计数已置零 + Roller scanned count reset failed. - 重置滚轴计数失败 + 重置滚轴计数失败 - + Error 错误 - + Document missing! It would be deleted or renamed. 文档丢失!文档可能已被删除或被重命名。 @@ -3149,7 +3159,7 @@ Are you sure to close? <p>%1</p><p>版本: %2<br>版权: &#169; %3</p><p>%4%5%6%7%8%9</p> - + about %1 关于 %1 diff --git a/app/scanner/Scanner_zh_EN.qm b/app/scanner/Scanner_zh_EN.qm index 348a367ff2699408b97bc70d24a996724cf34111..228d74b9522cfa036ae3dc87f74b1043917519e5 100644 GIT binary patch delta 2093 zcmZuxYgAO%75?VJy?5r$+!^I9qE1jpB^D6^HEFJg>&|!fUH5$Z z+xt8F9QcOof6N8G+HDOv_o$`evlqfX&TH$rl?V(o)&tsP zLR@+k*jEOzs-5D!5Zic)_pw=AvR_*o#G!3d{hpj2G8&UVz5`4SLDc!b z04XtuzC_ru5;4D50}~hGrD;=uMT1^!O=AzaHC)9*R_tSnX!b`@vjrG;(~Hf`a2)Xg z_=rfuy7~i?Zg# zmt?}mqpU%U<2L=9eI`bxukYroR8(h+n(vtN4q$$lKltfsp!GO^xSjzy34B+h0oZkp z@9McvxRgH@5J=zG^2a{n2nYCMCq(*wG=J=S_emKTGccyU}dlQnUnJFR4vVWWZ6xx%ADswO#84EPn%Znv=08gp=K{2_pKiwDNh30<2m9?1VCP~FX9B~zk1 zTD%Z(l`MNI-VXf&2yu%K@~!~cA>uzH$iDIaQgh!?Z?}A{4$A+5<{(v_a)z2Xtz4a( zb(B)~vsNi1v2v59;BEpCIKh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SS0a&^9V^yV5=rHj>xW^ z$5zRD-^@-;Odwrr(|d5UQ4>>n2Qaj1KFfXzgePmvhh_q1A9hVPCRv7m>= zk|-4w%kLk^0OTX`fLU#{oT>7V1w8s@2V-{pl5?4YHO~+idNJy;>w7?ewwT~uH`*O98-*XLkFH)z8O$P>Rbneb! z^t??Mee(j~-KG09JeUU4!p`ebI9q9Bh|}$rjdHQ5Xxv#c*|pJ9AL`KPzhkJ=zl=ch AT>t<8 diff --git a/app/scanner/Scanner_zh_EN.ts b/app/scanner/Scanner_zh_EN.ts index 649be158..2345cf5a 100644 --- a/app/scanner/Scanner_zh_EN.ts +++ b/app/scanner/Scanner_zh_EN.ts @@ -1924,7 +1924,7 @@ Please make sure the two passwords are the same. - + act_acquireInto Scan to... @@ -2154,63 +2154,63 @@ Please make sure the two passwords are the same. Select device source... - + HanvonScan Hanvon scanning software - + LanxumScan LANXUM scanning software - + CumtennScan CUMTENN scanning software - + MicrotekScan Microtek DocWizard EX V1.0 - + HuaGoScan HUAGOSCAN scanning software - + menu_language Language - + act_simpCN 简体中文 - + act_English English - + Grid Multi-column display - + Move To... Move to... - + Insert files Insert file - - + + nodevice No scanner detected @@ -2225,61 +2225,61 @@ Please make sure the two passwords are the same. Do not show prompt and save the edited images directly when switching images. - + statusBar displayed Show status bar - + statusBar hidden Hide status bar - + toolBar displayed Show toolbar - + toolBar hidden Hide toolbar - + colorInfo enabled Enable image information - + colorInfo disenabled Disable image information - + enabling automatic saving Enable auto save - + cancel auto save Cancel auto save - + Automatically save the edited the edited iamge when switching pictures. To cancel, uncheck the menu item: image-> automatically save Save edited images automatically when switching images. If you want to cancel, please deselect the menu item: Auto save images. - - - - - + + + + + Question Ask - + modified, save it? Image modified, save changes? @@ -2296,7 +2296,7 @@ Please make sure the two passwords are the same. No - + file lost, remove it? File lost; delete? @@ -2330,68 +2330,68 @@ Please reselect a path or clear disk space immediately. Warning - + save image failed: Failed to save image: - - + + create savepath failed: Failed to create folder: - + create image doc failed: Failed to create image file: - - - - - - + + + + + + save image doc failed: Failed to save image: - + binary Black and white - + gray Grayscale - + rgb Color + - - - - - - - - - + + + + + + + + start failed Failed to start - + UniScan UNI scanning software - - + + default scheme Default scheme @@ -2400,7 +2400,7 @@ Please reselect a path or clear disk space immediately. Please wake up the device manually - + Scan Scanning software @@ -2409,243 +2409,247 @@ Please reselect a path or clear disk space immediately. Device is awake - + thumbnailBar enabled Show thumbnail bar - + thumbnailBar hidden Hide thumbnail bar - + Clear, then start scan Clear and start scan - + Do NOT clear, then start scan Do not clear and start scan - + cancel Cancel - + Already exist images in image list. Do you want to clear? Image already exists in the list of images. Clear? - + Open images Open image - + Insert images Insert image - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + tips prompt - - - + + + save succeed Saved successfully - - + + find savePath in thumbnail Image name already exists in the list - + Please select at least one picture before export Please select at least one image and then export - + File name File name - + File path File path - + File size File size - + Creation date/time Creation time - + Modified date/time Modification time - + Accessed date/time Access time - + Format Format - + Width Width - + Height Height - + depth Depth - + Color model Color mode - + DPI Pixels per inch - + Print size Print size - + Frame Frame - + None None - + Mono Black and white - + Gray Gray scale - + Color Color - + Not supported Not supported - + Warning Warning - + Device is Running! Please finish scanning first. Device is currently running! Please stop scanning first. - + There are pictures that have not been saved. Are you sure to close? There are unsaved images; are you sure you want to close? - + Are you sure to close? Are you sure you want to close? - + Sure to sign out administrator account? Are you sure you want to log out of the administrator account? - + <p>DriverVer: %1</p> <p>VerSion: %1</p> - + <p>Vendor: %1</p> <p>Vendor: %1</p> - + <p>Copyright: %1</p> <p>Copyright: %1</p> - + <p>Company website: <a href=%1>%1</p> <p>Company website: <a href=%1>%1</p> - + <p>Company address: %1</p> <p>Company address: %1</p> - + <p>Company telephone: %1</p> <p>Company telephone: %1</p> - + <p>Company GPS: <a href=%1>%2</p> <p>Company GPS: <a href=%1>%2</p> - + Baidu map access Baidu map access @@ -2696,42 +2700,46 @@ Are you sure to close? Total count: %1 - + Detected that there is less than 1GB of disk space. Do you want to continue? Detected that there is less than 1GB of disk space. Do you want to continue? - + Device %1 is open Device %1 is open + confirm operation - Confirm operation + Confirm operation + are you sure to clear the roller count? - Are you sure you want to clear the roller count? + Are you sure you want to clear the roller count? hint Prompt + Roller scanned count has been set to 0. - Roller count reset to zero. + Roller count reset to zero. + Roller scanned count reset failed. - Failed to reset roller count. + Failed to reset roller count. - + Error Error - + Document missing! It would be deleted or renamed. File lost! File may be deleted or renamed. @@ -2748,13 +2756,13 @@ Are you sure to close? About - + cache path folder limit:%1 Unable to access the current path:%1 Please try to log in to the administrator account in the [User] menu and go to the [Cache settings] to change the cache path. - + aquireinto folder limit:%1 Unable to access the current path:%1 Please try to change the cache path in [Scan to]. @@ -2768,7 +2776,7 @@ Please try to change the cache path in [Scan to]. <p>%1</p><p>Version: %2<br>Copyright: &#169; %3</p><p>%4%5%6%7%8%9</p> - + about %1 About %1 @@ -2813,13 +2821,13 @@ Please try to change the cache path in [Scan to]. failed - - + + error Error - + start failed! Failed to start! @@ -2829,52 +2837,52 @@ Please try to change the cache path in [Scan to]. Please go to “Scan to” and change the accessible scan folder and then perform the scan. - + Insufficient access rights Insufficient file access permissions - + Image processing failed Image processing failed - + Ocr init failed OCR initialization error - + Ocr failed OCR failed - + File does not exist File does not exist - + Failed to load dynamic library Failed to load dynamic library - + File data error File data error - + Image format processing error Image format processing error - + Out of memory Insufficient memory - + Failed Failed @@ -2895,31 +2903,33 @@ Please go to “Scan to” and change the accessible scan folder and then perfor Close - + tip Prompt - + Other versions not available No other versions obtained + + The device does not support this operation - Device does not support this operation + Device does not support this operation IO error IO error - - + + The language switch is successful and takes effect the next time the software is started! The language switch is successful and takes effect the next time the software is started! - + Are you sure to delete selected file? Are you sure to delete the selected file completely? diff --git a/app/scanner/device_user.cpp b/app/scanner/device_user.cpp index 4ed55be3..543ea3e2 100644 --- a/app/scanner/device_user.cpp +++ b/app/scanner/device_user.cpp @@ -90,11 +90,14 @@ HGResult DeviceUser::ClearRollerCount() return HGTwain_ClearDSRollerCount(m_twainDS); } -QString DeviceUser::GetDriverLogPath() +QString DeviceUser::GetDriverLog() { - HGChar driverLogPath[256]; - HGTwain_GetDSDriverLogPath(m_twainDS, driverLogPath, 256); - return getStdFileName(driverLogPath); + HGChar driverLogPath[256] = { "D:\\123\\driver-log.txt" }; + HGResult ret = HGTwain_GetDSDriverLog(m_twainDS, driverLogPath); + if (ret == HGBASE_ERR_OK) + return driverLogPath; + + return ""; } HGResult DeviceUser::ClearDriverLog() @@ -102,11 +105,14 @@ HGResult DeviceUser::ClearDriverLog() return HGTwain_ClearDSDriverLog(m_twainDS); } -QString DeviceUser::GetDeviceLogPath() +QString DeviceUser::GetDeviceLog() { - HGChar deviceLogPath[256]; - HGTwain_GetDSDriverLogPath(m_twainDS, deviceLogPath, 256); - return getStdFileName(deviceLogPath); + HGChar deviceLogPath[256] = { "D:\\123\\device-log.txt" }; + HGResult ret = HGTwain_GetDSDeviceLog(m_twainDS, deviceLogPath); + if (ret == HGBASE_ERR_OK) + return deviceLogPath; + + return ""; } HGResult DeviceUser::ClearDeviceLog() diff --git a/app/scanner/device_user.h b/app/scanner/device_user.h index a8695cb4..7f423667 100644 --- a/app/scanner/device_user.h +++ b/app/scanner/device_user.h @@ -45,9 +45,9 @@ public: HGResult Login(); HGResult Logout(); HGResult ClearRollerCount(); - QString GetDriverLogPath(); + QString GetDriverLog(); HGResult ClearDriverLog(); - QString GetDeviceLogPath(); + QString GetDeviceLog(); HGResult ClearDeviceLog(); private: diff --git a/app/scanner/mainwindow.cpp b/app/scanner/mainwindow.cpp index df880fc6..538d60fd 100644 --- a/app/scanner/mainwindow.cpp +++ b/app/scanner/mainwindow.cpp @@ -3645,7 +3645,7 @@ void MainWindow::on_act_driver_log_triggered() { if (m_devUser != nullptr) { - QString driverLogPath = m_devUser->GetDriverLogPath(); + QString driverLogPath = m_devUser->GetDriverLog(); if (!driverLogPath.isEmpty()) { QDesktopServices::openUrl(QUrl::fromLocalFile(driverLogPath)); @@ -3661,7 +3661,7 @@ void MainWindow::on_act_device_log_triggered() { if (m_devUser != nullptr) { - QString deviceLogPath = m_devUser->GetDeviceLogPath(); + QString deviceLogPath = m_devUser->GetDeviceLog(); if (!deviceLogPath.isEmpty()) { QDesktopServices::openUrl(QUrl::fromLocalFile(deviceLogPath)); diff --git a/build2/qt/HGTwainUser/HGTwainUser.def b/build2/qt/HGTwainUser/HGTwainUser.def index a0e9f0d7..da1c84ba 100644 --- a/build2/qt/HGTwainUser/HGTwainUser.def +++ b/build2/qt/HGTwainUser/HGTwainUser.def @@ -17,9 +17,9 @@ HGTwain_GetDSDeviceCustomInfo HGTwain_LoginDS HGTwain_LogoutDS HGTwain_ClearDSRollerCount -HGTwain_GetDSDriverLogPath +HGTwain_GetDSDriverLog HGTwain_ClearDSDriverLog -HGTwain_GetDSDeviceLogPath +HGTwain_GetDSDeviceLog HGTwain_ClearDSDeviceLog HGTwain_EnableDSUIOnly HGTwain_EnableDS diff --git a/modules/twain_user/HGTwain.cpp b/modules/twain_user/HGTwain.cpp index 8199a40e..1cea4654 100644 --- a/modules/twain_user/HGTwain.cpp +++ b/modules/twain_user/HGTwain.cpp @@ -213,7 +213,7 @@ HGResult HGAPI HGTwain_ClearDSRollerCount(HGTwainDS ds) return twainDSImpl->ClearRollerCount(); } -HGResult HGAPI HGTwain_GetDSDriverLogPath(HGTwainDS ds, HGChar *path, HGUInt maxLen) +HGResult HGAPI HGTwain_GetDSDriverLog(HGTwainDS ds, const HGChar *fileName) { if (NULL == ds) { @@ -221,7 +221,7 @@ HGResult HGAPI HGTwain_GetDSDriverLogPath(HGTwainDS ds, HGChar *path, HGUInt max } HGTwainDSImpl* twainDSImpl = (HGTwainDSImpl*)ds; - return twainDSImpl->GetDriverLogPath(path, maxLen); + return twainDSImpl->GetDriverLog(fileName); } HGResult HGAPI HGTwain_ClearDSDriverLog(HGTwainDS ds) @@ -235,7 +235,7 @@ HGResult HGAPI HGTwain_ClearDSDriverLog(HGTwainDS ds) return twainDSImpl->ClearDriverLog(); } -HGResult HGAPI HGTwain_GetDSDeviceLogPath(HGTwainDS ds, HGChar *path, HGUInt maxLen) +HGResult HGAPI HGTwain_GetDSDeviceLog(HGTwainDS ds, const HGChar *fileName) { if (NULL == ds) { @@ -243,7 +243,7 @@ HGResult HGAPI HGTwain_GetDSDeviceLogPath(HGTwainDS ds, HGChar *path, HGUInt max } HGTwainDSImpl* twainDSImpl = (HGTwainDSImpl*)ds; - return twainDSImpl->GetDeviceLogPath(path, maxLen); + return twainDSImpl->GetDeviceLog(fileName); } HGResult HGAPI HGTwain_ClearDSDeviceLog(HGTwainDS ds) diff --git a/modules/twain_user/HGTwain.h b/modules/twain_user/HGTwain.h index dbf931eb..4254d0ba 100644 --- a/modules/twain_user/HGTwain.h +++ b/modules/twain_user/HGTwain.h @@ -70,11 +70,11 @@ HGEXPORT HGResult HGAPI HGTwain_LogoutDS(HGTwainDS ds); HGEXPORT HGResult HGAPI HGTwain_ClearDSRollerCount(HGTwainDS ds); -HGEXPORT HGResult HGAPI HGTwain_GetDSDriverLogPath(HGTwainDS ds, HGChar *path, HGUInt maxLen); +HGEXPORT HGResult HGAPI HGTwain_GetDSDriverLog(HGTwainDS ds, const HGChar *fileName); HGEXPORT HGResult HGAPI HGTwain_ClearDSDriverLog(HGTwainDS ds); -HGEXPORT HGResult HGAPI HGTwain_GetDSDeviceLogPath(HGTwainDS ds, HGChar *path, HGUInt maxLen); +HGEXPORT HGResult HGAPI HGTwain_GetDSDeviceLog(HGTwainDS ds, const HGChar *fileName); HGEXPORT HGResult HGAPI HGTwain_ClearDSDeviceLog(HGTwainDS ds); diff --git a/modules/twain_user/HGTwainImpl.cpp b/modules/twain_user/HGTwainImpl.cpp index b8df004b..51a2a31a 100644 --- a/modules/twain_user/HGTwainImpl.cpp +++ b/modules/twain_user/HGTwainImpl.cpp @@ -505,9 +505,40 @@ HGResult HGTwainDSImpl::ClearRollerCount() return ResetCapInt(0x9902, TWTY_INT32); } -HGResult HGTwainDSImpl::GetDriverLogPath(HGChar *path, HGUInt maxLen) +#pragma pack(push) +#pragma pack(1) +struct CapStr255Type { - return GetCapStr255(0x9903, path, maxLen); + TW_UINT16 ItemType; + TW_STR255 Value; +}; +#pragma pack(pop) + +HGResult HGTwainDSImpl::GetDriverLog(const HGChar *fileName) +{ + if (NULL == fileName || strlen(fileName) >= sizeof(TW_STR255)) + { + return HGBASE_ERR_INVALIDARG; + } + + TW_CAPABILITY twCap; + twCap.Cap = (TW_UINT16)0x9903; + twCap.ConType = TWON_ONEVALUE; + twCap.hContainer = GlobalAlloc(GHND, sizeof(CapStr255Type)); + if (NULL == twCap.hContainer) + { + return HGBASE_ERR_FAIL; + } + + CapStr255Type* pVal = (CapStr255Type*)GlobalLock(twCap.hContainer); + assert(NULL != pVal); + pVal->ItemType = TWTY_STR255; + strcpy(pVal->Value, fileName); + GlobalUnlock(twCap.hContainer); + + USHORT ret = m_dsmImpl->m_pDSMProc(&m_dsmImpl->m_AppId, &m_iden, DG_CONTROL, DAT_CAPABILITY, MSG_GETCURRENT, &twCap); + GlobalFree(twCap.hContainer); + return (TWRC_SUCCESS == ret) ? HGBASE_ERR_OK : HGTWAIN_ERR_FAIL; } HGResult HGTwainDSImpl::ClearDriverLog() @@ -515,9 +546,31 @@ HGResult HGTwainDSImpl::ClearDriverLog() return ResetCapStr255(0x9903); } -HGResult HGTwainDSImpl::GetDeviceLogPath(HGChar *path, HGUInt maxLen) +HGResult HGTwainDSImpl::GetDeviceLog(const HGChar *fileName) { - return GetCapStr255(0x9904, path, maxLen); + if (NULL == fileName || strlen(fileName) >= sizeof(TW_STR255)) + { + return HGBASE_ERR_INVALIDARG; + } + + TW_CAPABILITY twCap; + twCap.Cap = (TW_UINT16)0x9904; + twCap.ConType = TWON_ONEVALUE; + twCap.hContainer = GlobalAlloc(GHND, sizeof(CapStr255Type)); + if (NULL == twCap.hContainer) + { + return HGBASE_ERR_FAIL; + } + + CapStr255Type* pVal = (CapStr255Type*)GlobalLock(twCap.hContainer); + assert(NULL != pVal); + pVal->ItemType = TWTY_STR255; + strcpy(pVal->Value, fileName); + GlobalUnlock(twCap.hContainer); + + USHORT ret = m_dsmImpl->m_pDSMProc(&m_dsmImpl->m_AppId, &m_iden, DG_CONTROL, DAT_CAPABILITY, MSG_GETCURRENT, &twCap); + GlobalFree(twCap.hContainer); + return (TWRC_SUCCESS == ret) ? HGBASE_ERR_OK : HGTWAIN_ERR_FAIL; } HGResult HGTwainDSImpl::ClearDeviceLog() @@ -773,15 +826,6 @@ HGResult HGTwainDSImpl::GetCapInt(HGUInt cap, HGInt* value) return ret; } -#pragma pack(push) -#pragma pack(1) -struct CapStr255Type -{ - TW_UINT16 ItemType; - TW_STR255 Value; -}; -#pragma pack(pop) - HGResult HGTwainDSImpl::SetCapStr255(HGUInt cap, const HGChar *value) { if (NULL == value || strlen(value) >= sizeof(TW_STR255)) diff --git a/modules/twain_user/HGTwainImpl.hpp b/modules/twain_user/HGTwainImpl.hpp index 6ddb8a41..06800175 100644 --- a/modules/twain_user/HGTwainImpl.hpp +++ b/modules/twain_user/HGTwainImpl.hpp @@ -57,9 +57,9 @@ public: HGResult Login(const HGChar *user, const HGChar *pwd); HGResult Logout(); HGResult ClearRollerCount(); - HGResult GetDriverLogPath(HGChar *path, HGUInt maxLen); + HGResult GetDriverLog(const HGChar *fileName); HGResult ClearDriverLog(); - HGResult GetDeviceLogPath(HGChar *path, HGUInt maxLen); + HGResult GetDeviceLog(const HGChar *fileName); HGResult ClearDeviceLog(); HGResult EnableUIOnly(HWND parent, HGDSCloseReqFunc eventFunc, HGPointer eventParam);