in

Archived Data Techniques Forums

WIA Interface for scanner

Last post 04-25-2008 2:43 PM by support. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-23-2008 8:52 AM

    WIA Interface for scanner

    I am using the ImageMan.NET Twain component. Everything works fine until we attempt to manipulate a scanner that only has Microsoft's WIA interface (Windows Image Acquisition - which claims to have a TWAIN compatibility layer). The scan actually works, but our commands to SetCapability on the bit depth and x and y resolutions fail with a return error of "bad value". The call I am using is listed below. This call works when used against the TWAIN interface for the scanner, but fails with the "bad value" error when used against the same scanner via the WIA interface (the same device will show up twice in the Sources list of ID's - one with "WIA-" prepended, and the other as normal TWAIN).

    Twain.SetCapability(DTI.ImageMan.Twain.Capabilities.XResolution, 200, DTI.ImageMan.Twain.DataType.Int32)

    One option we have thought of is to just require users to have a TWAIN interface installed for their scanner, but we wanted to make this as simple for our users as possible by using the WIA interface if that is all they have installed. Is there a piece of info I'm missing to set scanner properties via WIA? Like I said, we can command the scanner to perform a scan via WIA with your component...we just can't set the scan properties.

    Thanks.

  • 04-25-2008 2:43 PM In reply to

    Re: WIA Interface for scanner

    Hi,

    The WIA - Twain interface doesnt support many capabilities and has some quirks.  We strongly recommend using the native twain driver when possible instead of the Twain/WIA driver.

    Sean
    Data Techniques Online Support
Page 1 of 1 (2 items)
Copyright 2009 Data Techniques, Inc. All Rights Reserved.