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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
Unfortunately there's insufficient info to try to make any changes. I won't call it closed, so it's going into wont-fix...