I would like to obtain the serial number of a scanner in C# using twain_32.dll
.
I've found out it has to be done with dscap method with the icap_serialnumber
capability.
Can anyone give me an example how to do this?
I would like to obtain the serial number of a scanner in C# using twain_32.dll
.
I've found out it has to be done with dscap method with the icap_serialnumber
capability.
Can anyone give me an example how to do this?
You have confirmed that your scanner driver supports this capability? I find it in the TWAIN spec as CAP_SERIALNUMBER (0x1024). And it is optional - you cannot assume that a scanner supports it.
If you get TWRC_FAILURE when you try to GET that capability, check the condition code. Your library or component should provide a way to get the condition code after the GET. A value of TWCC_CAPUNSUPPORTED would mean that the scanner driver does not support that capability. Other condition codes are described in the TWAIN specification, although sometimes a little imagination is needed to guess what the driver is trying to say...
The TWAIN Working Group forum is maybe a little better place for this kind of question.