TWAIN custom CAP number

Discussions about TWAIN scanning in GdPicture.NET using GdPictureImaging.
Post Reply
Chess
Posts: 22
Joined: Mon Apr 23, 2012 6:02 pm

TWAIN custom CAP number

Post by Chess » Wed Oct 01, 2014 11:54 am

Hello,

I try to acquire pages in landscape mode with a Canon 9080C. Standard twain page orientation is not supported but it seem it can be done using CAP_CUSTOMBASE + 105. It seem TwainSetCapCurrentString/TwainGetCapCurrentNumeric can be use only with TwainCapabilities enumeration values. Value of CAP_CUSTOMBASE is 0x8000, so how can I set custom cap value using GdPicture ?

Thanks.

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: TWAIN custom CAP number

Post by SamiKharma » Wed Oct 01, 2014 1:47 pm

Hi,

You can use the function TwainSetCapCurrentNumeric():
http://guides.gdpicture.com/content/GdP ... meric.html

Hope this helps.
Best,
Sami

Chess
Posts: 22
Joined: Mon Apr 23, 2012 6:02 pm

Re: TWAIN custom CAP number

Post by Chess » Wed Oct 01, 2014 2:07 pm

Thanks, but may be, I'm wrong explained :

I would like something like :

Code: Select all

public bool TwainSetCapCurrentNumeric( 
   [color=#BF0040]MyValue[/color],
   TwainItemTypes ItemType,
   double NewValue
)
where MyValue = CAP_CUSTOMBASE + 105
Instead of :

Code: Select all

public bool TwainSetCapCurrentNumeric( 
   TwainCapabilities Cap,
   TwainItemTypes ItemType,
   double NewValue
)

Chess
Posts: 22
Joined: Mon Apr 23, 2012 6:02 pm

Re: TWAIN custom CAP number

Post by Chess » Wed Oct 01, 2014 3:02 pm

Note : of course I try to set a value out of TwainCapabilites enum range (it work in c#) using cast like :

Code: Select all

TwainCapabilities capa = (TwainCapabilities) 32873;    // 0x8000 + 105
ret = gd.TwainSetCapCurrentString(capa, TwainItemTypes.TWTY_INT32, 2); // 2 is for landscape
But ret value is always "false". Do you check out of range value for TwainCapabilities in the TwainSetCapCurrentString (or TwainSetCapCurrentNumeric) function ?

Thanks.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests