简体   繁体   English

Twain在DAT_USERINTERFACE中禁用了UI,在扫描过程中仍显示UI

[英]Twain disable UI in DAT_USERINTERFACE, still show UI during scan

I'm trying to programmatically control a twain scanner within my custom application. 我正在尝试以编程方式在自定义应用程序中控制吐温扫描仪。 I don't want to show the scanner's native UI. 我不想显示扫描仪的本机UI。

I set CAP_INDICATORS capability to FALSE , and set CAP_UICONTROLLABLE capability to TRUE . 我将CAP_INDICATORS功能设置为FALSE ,并将CAP_UICONTROLLABLE功能设置为TRUE

Then I start the scan using DG_CONTROL / DAT_USERINTERFACE / MSG_ENABLEDS , while ShowUI in TW_USERINTERFACE structure is set to FALSE . 然后,我使用DG_CONTROL / DAT_USERINTERFACE / MSG_ENABLEDS开始扫描,而TW_USERINTERFACE结构中的ShowUI设置为FALSE

I tested through different scanners. 我通过不同的扫描仪进行了测试。 While my Epson DS-30 scanner is working as expected without ui, my Avision A6 scanner still shows a progress UI during scan: 当我的Epson DS-30扫描仪在没有ui的情况下可以正常工作时,我的Avision A6扫描仪在扫描过程中仍显示进度UI:

扫描仪用户界面

This UI appears when I call DG_IMAGE / DAT_IMAGEINFO / MSG_GET operation, to get the image details from scanner. 当我调用DG_IMAGE / DAT_IMAGEINFO / MSG_GET操作以从扫描仪获取图像详细信息时,将出现此UI。 With DAT_IMAGEINFO command, this A6 scanner start to scan the paper, and after scanning complete, I could finally recieve the TW_IMAGEINFO structure. 使用DAT_IMAGEINFO命令,此A6扫描仪开始扫描纸张,扫描完成后,我终于可以接收到TW_IMAGEINFO结构。

I don't receive any TWRC_CHECKSTATUS while setting the UI mode. 设置UI模式时,我没有收到任何TWRC_CHECKSTATUS

So does this particular scanner actually doesn't support twain without UI? 那么,这种特定的扫描仪实际上不支持不带UI的TWAIN吗?

Or could I have something workaround to disable this UI? 还是我可以采取一些解决方法来禁用此UI?

Actually a lot depends on the driver implementation. 实际上,很大程度上取决于驱动程序的实现。

So what happens is the options you set from the application configures the driver based on the capabilities it supports. 因此,发生的事情是您在应用程序中设置的选项根据其支持的功能来配置驱动程序。 If the driver capability for UI-less scanning is not allowed to be configurable by the driver in that case your application implementation may not work as expected. 如果在这种情况下,驱动程序不允许配置无UI扫描的驱动程序功能,则您的应用程序实现可能无法按预期工作。

Please refer to the TWAIN documentation for complete details. 请参阅TWAIN文档以获取完整详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM