Fetch Twain Capability Description Values

Some other discussions. Feel free to post anything here !
Post Reply
Divya
Posts: 1
Joined: Fri Mar 02, 2012 11:39 am

Fetch Twain Capability Description Values

Post by Divya » Fri Mar 02, 2012 11:58 am

I am trying to display the available cap values(Description) for a specific capability in a list box using the following code:

Code: Select all

private function getCapValueList(ByVal CapIndex as integer)  as List

Dim_cap as GdPicture.TwainCapabilities
Dim  count as integer
Dim AvailableCapValue As String
Dim j as integer

_cap = DirectCast(CapIndex, GdPicture.TwainCapabilities)

For j = 1 To oGdPictureImaging.TwainGetAvailableCapValuesCount(_cap)
         AvailableCapValue = oGdPictureImaging.TwainGetAvailableCapValueNoNumeric(_cap, j)
         listBoxCaps.Items.Add(Str(j) + " - " + Convert.ToInt16(AvailableCapValue)))
Next j

end function 
Using the above function TwainGetAvailableCapValueNoNumeric lists the legal values(for ICAP_SUPPORTEDSIZES) in the listbox as:

1 - 4
2 - 3
3 - 1
4 - 10
5 - 2
6 - 15
7 - 5
8 - 7
9 - 16
10 - 13
11 - 53
12 - 0

But I need the values to be listed as:

1 - USELEGAL
2 - USLETTER
3 - A4
4 - USEXECUTIVE
5 - JISB5
6 - C5
7 - A5
8 - B6
9 - C6
10 - A6
11 - BUSINESSCARD
12 - NONE


Can you please provide me the method for getting the description for the cap values.

Note:I am using the GDPicture licensed version 8.4.0.5.

User avatar
Loïc
Site Admin
Posts: 5568
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Fetch Twain Capability Description Values

Post by Loïc » Fri Mar 02, 2012 9:03 pm

Hello,

Since you are using the low-level api you have to implement such feature from your side. Enumeration per Twain capability are listed in the TWAIN references that can be downloaded from the twain.org website.

Kind regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest