saraff-9EB1047A4BEB4cef8506B29BA325BD5A / Saraff.Twain.NET

Saraff.Twain.NET is the skillful scanning component which allows you to control work of flatbed scanner, web and digital camera and any other TWAIN device from .NET environment. You can use this library in your programs written in any programming languages compatible with .NET technology.
GNU General Public License v3.0
102 stars 35 forks source link

TwainException Unrecognized MSG DG DAT combination. #93

Closed lemfaki closed 2 years ago

lemfaki commented 2 years ago

Hello there.. I have created an app which works like a charm with your amazing library.. I tried using a second scanner for feedback but i am getting this error .

TwainException Unrecognized MSG DG DAT combination. at Saraff.Twain.Twain32._RegisterCallback() at Saraff.Twain.Twain32.OpenDataSource()

Scanner i am using is Epson DS-410. Before calling OpenDataSource() i am checking twain321.IsTwain2Supported twain321.IsTwain2Enable

both return true

Thank you in advance.. i really love your work

saraff-9EB1047A4BEB4cef8506B29BA325BD5A commented 2 years ago

Hello, @lemfaki Thanks for your feedback! About your issue, apparently, your data source does not support TWAIN2 mode, although it reports this. Try check it out using TWAIN1.x.

lemfaki commented 2 years ago

It seems so yes.. Do you have any TWAIN1 samples i can try out?

saraff-9EB1047A4BEB4cef8506B29BA325BD5A commented 2 years ago

See Use TWAIN 2.x wiki page, Saraff.Twain.NET CS Samples and Saraff.Twain.NET Outproc Samples

lemfaki commented 2 years ago

Btw i tried this just to test this out.TWAIN 2.5 Specification from https://twain.org/specification/ This seems to work with the scanner i am having the problem.. Maybe i am not doing something right? I already used the [Saraff.Twain.NET CS Samples] as a tempalte for my program.

lemfaki commented 2 years ago

With the [Saraff.Twain.NET Outproc Samples] i can see that Twain 1.x can read the values of the scanner while 2.x indeed recieves the same error as me..

lemfaki commented 2 years ago

Sorry for the spamm.. I found the problem.. Didn't have the latest TWAINDSM.dll files.. After i updated them, it worked like a charm