Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, April 1, 2008 12:25:12 PM(UTC)
KGudgeirsson

Groups: Registered
Posts: 8


I am trying to set CAP_PRINTERSTRING for an endorser.

How do I set a capability that only accepts string values?

L_TwainCreateNumericContainerOneValue (pCapability, Type, uValue) will only accept L_UINT32.

Is there another call that will allow me to place a string value into a pCapability?
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, April 2, 2008 4:20:16 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

Hello,

You can set the capability that only accepts string values by using the following code:
+---------+
L_INT nRet;
TW_CAPABILITY twCap;
TW_CAPABILITY twCapGet;
TW_STR1024 twString;
...
nRet = L_TwainStartCapsNeg(g_hTwain);

twCap.Cap = CAP_AUTHOR;
twCap.ConType = TWON_ONEVALUE;

nRet = L_TwainCreateNumericContainerOneValue(&twCap,  TWAINNUMERICTYPE_TW_STR128, (L_UINT32)"Test");

nRet = L_TwainSetCapability(g_hTwain, &twCap, LTWAIN_CAPABILITY_SET);

...
twCapGet.Cap = CAP_AUTHOR;
twCapGet.ConType = TWON_ONEVALUE;
   
nRet = L_TwainGetCapability (g_hTwain, &twCapGet, LTWAIN_CAPABILITY_GETCURRENT);
   
nRet = L_TwainGetNumericContainerSTRINGValue (&twCapGet, 0, twString);
+---------+

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Wednesday, April 2, 2008 1:14:51 PM(UTC)
KGudgeirsson

Groups: Registered
Posts: 8


Worked like a charm. Thanks!
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.052 seconds.