This project has moved. For the latest updates, please go here.

Bad Serial number

Nov 26, 2014 at 9:37 AM
Dear Saraff

I'm trying to get the serial number of the scanner through CAP_SERIALNUMBER capability. I'm using the following:

Dim Serial as String= String.Empty
If (Me._twain32.IsCapSupported(TwCap.SerialNumber)) <> 0 Then
            Serial = (Me._twain32.GetCap(TwCap.SerialNumber)).ToString 
End If

The serial number it should be "006717" and I get sometimes "00671" and other times "0067w".

Thanks in adavnce
Manuel
Coordinator
Nov 26, 2014 at 5:11 PM
Hello, mpino!
I checked the possibility of extracting value of the CAP_SERIALNUMBER capability. Saraff.Twain.NET works correctly. The data source (scanner) itself returns this value.
Marked as answer by SARAFF on 12/4/2014 at 2:05 AM
Nov 26, 2014 at 5:46 PM
Is it my code right?. Any way thanks for your help.
Manuel
Coordinator
Nov 26, 2014 at 5:48 PM
The problem in the scanner driver (data source).
Nov 26, 2014 at 6:02 PM
But I have tested the same (CAP_SERIALNUMBER) with twack32 (the tool from the TWAIN org) and it works fine returning in my case "006717".

Manuel
Coordinator
Nov 26, 2014 at 6:40 PM
In Twack32 you use the same version of TWAIN (1.x or 2.x), as in Saraff.Twain.NET?
Nov 26, 2014 at 6:49 PM
Yes I do. This is the strange thing.
Coordinator
Nov 26, 2014 at 8:01 PM
I compared the code Twack_32 and Saraff.Twain.NET (for CAP_SERIALNUMBER) - it equivalent. Therefore, if you are using the same the data source, the result cann't be different.
Nov 27, 2014 at 7:34 AM
Dear Saraff

I found the problem !!!!. I was using an old reference to SaraffTwain.dll, also modified by a friend, not your last version. Now everything is working fine.

Thanks a lot for this excellent implementation.
Manuel