Tattakashi123 / t

Automatically exported from code.google.com/p/twaindotnet
0 stars 0 forks source link

Custom capabilities #26

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I'm working with a Canon scanner all work's fine with basic scan options.

But a need to use some canon extra capabilities .
Well i just have to declare it into the capabilities.cs file? But due to canon 
CAP_CUSTOMBASE(0x8000)value, i can't encode them in a small integer
and if I declare capabilities as long integer nothing work.

So what's the right way to declare a custom capability in capabilities.cs file? 
And how i use it this project?

Thank's
Nicolas

ps : I join you an extract of canon's documentation to retrieve capability ID

E.g: #define CCAP_CEI_DESKEW   (CAP_CUSTOMBASE + 13)

       CAP_CUSTOMBASE = 0x8000     ;     13 decimal = D hexadecimal

>> (CAP_CUSTOMBASE + 13): 0x8000 + 0xD =  800D 

>> Twain capability “Deskew”:  800D

Original issue reported on code.google.com by nicolas....@gmail.com on 16 Dec 2010 at 3:18

GoogleCodeExporter commented 8 years ago
You can use ushort for this issue

Original comment by serda...@gmail.com on 2 Feb 2012 at 1:11

GoogleCodeExporter commented 8 years ago
You have to change Capabilities type from short to ushort.

Original comment by serda...@gmail.com on 2 Feb 2012 at 1:15