TWAIN Working Group

Newsletter Signup
Donate
Help keep TWAIN free
  • About TWAIN
    • What’s New?
    • News
    • Events
    • Membership
    • Consider a Donation
    • Contact Us
  • Why TWAIN?
  • Developers
    • Driver Developer
    • Application Developer
    • TWAIN Features
    • Specification & Tools
    • Self Certification Process
  • Support Forums
  • Scanner End-User
  • Find Certified Drivers
    • Facebook
    • LinkedIn
    • Vimeo

Re: Re: OpenTwain

Forums › TWAIN Classic › OpenTwain › Re: Re: OpenTwain

January 22, 2008 at 7:14 pm #24310
gabe
Participant
  • Topics - 9
  • Replies - 583
  • Total Posts - 592

@ZiggyShort wrote:

Is there anyway I can change DG_CONTROL / DAT_USERINTERFACE / MSG_ENABLEDSUIONLY from within the GuiHarness?

no, but the guiharness is just (a sample) showing one way of controling a device via twain – using customDsData and EnableDsUiOnly to let the device provide you with a string of data containing all of the parameters for an acquire without you manipulating caps one my one.

you’re more than welcome to drop the code that uses enableDsUiOnly and manipulate the caps one-by-one.

also there are devices that don’t support enableDsUiOnly the way that I thought they would and you may find that more devices are compatable with that sample if you update the method Update_EnableDsUiOnly in cTwain.vb from:


If OperationTriplets.Control.Capability.GetCurrentValue(Enumerations.Capability.Cap_CustomData) = "True" Then

If OperationTriplets.Control.Capability.GetCurrentValue(Enumerations.Capability.Cap_UiControllable) = "True" Then

If OperationTriplets.Control.Capability.GetCurrentValue(Enumerations.Capability.Cap_EnableDsUiOnly) = "True" Then

EnableDsUiOnly_Supported = True

to


If OperationTriplets.Control.Capability.GetCurrentValue(Enumerations.Capability.Cap_CustomDsData) = "True" OrElse _
OperationTriplets.Control.Capability.GetValue(Enumerations.Capability.Cap_CustomDsData) = "True" OrElse _
OperationTriplets.Control.Capability.GetDefaultValue(Enumerations.Capability.Cap_CustomDsData) = "True" Then

If OperationTriplets.Control.Capability.GetCurrentValue(Enumerations.Capability.Cap_UiControllable) = "True" OrElse _
OperationTriplets.Control.Capability.GetValue(Enumerations.Capability.Cap_UiControllable) = "True" OrElse _
OperationTriplets.Control.Capability.GetDefaultValue(Enumerations.Capability.Cap_UiControllable) = "True" Then

If OperationTriplets.Control.Capability.GetCurrentValue(Enumerations.Capability.Cap_EnableDsUiOnly) = "True" OrElse _
OperationTriplets.Control.Capability.GetValue(Enumerations.Capability.Cap_EnableDsUiOnly) = "True" OrElse _
OperationTriplets.Control.Capability.GetDefaultValue(Enumerations.Capability.Cap_EnableDsUiOnly) = "True" Then

as some devices reported their support for the required capabilites with msg_get and other reported their support support with msg_getCurrent or msg_getDefault.

but even then some devices still don’t support the 3 required capabilities and while I would try to avoid those devices for production use if it can’t be avoided… well then it can’t be avoided but you’ll be in for a load of work if you you’re looking to provide an consistant, automated scanning process without user interaction.

.

Quick Links

Service Providers
TWAIN Support Forums
Membership
Contact Us
Privacy Policy

Newsletter Signup

TWAIN Working Group Family

TWAIN Working Group
TWAIN Direct®
TWAIN Resources
TWAIN Certified Drivers
PDF/raster

  • Facebook
  • GitHub
  • LinkedIn
  • Vimeo

Recent Topics

  • EPSON V600 TWAIN and WIA on Windows 10
  • When and how to use WaitForEvents command ?
  • Problem enumerating list of installed scanners in windows server 2012
  • Failed to create TWAIN progress! Error code is 1260.
  • To get the list of scanners from javascript client side (browser)
  • Quarterly Newsletter
  • TWAIN Working Group Membership
  • Logo Usage
  • TWAIN License
  • Contact Us
Privacy Policy • Privacy Tools • Copyright © 2021 TWAIN Working Group • by iHwy, LLC • Log in