Menu

#8 m_twaincstoolkit.Send method returns BADVALUE

2.0
wont-fix
Mark
None
2015-03-14
2014-11-19
Tanveer Ali
No

sts = m_twaincstoolkit.Send("DG_CONTROL", "DAT_CAPABILITY", "MSG_SET", ref szCapability, ref szStatus);
if (sts != TWAINCSToolkit.STS.SUCCESS)

above line of code is returning the BADVALUE, while scanning is working fine by Twack_32 TOOL

Discussion

  • Mark

    Mark - 2014-11-20

    Bad value typically indicates an error in the construction of the data being sent to the TWAIN driver. Presumably there's a difference in the way the data is being sent in TWACKER vs TWAIN CS.

    The easiest way to figure this out is to run the TWAIN CS Test application provided in this project. The tool will automatically guide you through the steps to discover your device. You need to manually enter MSG_OPENDS when you've selected your desired driver. Once it's open send DG_CONTROL / DAT_CAPABILITY / MSG_GETCURRENT with the capability you want to work with entered into the text box on the middle right side of the application. You should get a CSV string back that shows the format you need to use. The last value in the string is the value of the capability and is numerical (you can look it up to make sure it matches the constant you want).

    If you change from MSG_GETCURRENT to MSG_SET, you can then verify that you can set the capability with your desired value. The format of the CSV string is what you need to send in the szCapability in your code.

    I hope this helps...

     

    Last edit: Mark 2014-11-21
  • Mark

    Mark - 2015-03-14

    Unfortunately there's insufficient info to try to make any changes. I won't call it closed, so it's going into wont-fix...

     
  • Mark

    Mark - 2015-03-14
    • status: open --> wont-fix
    • assigned_to: Mark
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.