LEADTOOLS Support
Imaging
Imaging SDK Questions
Re: Using L_TwainCreateNumericContainerOneValue and L_TwainSetCapability for string values?
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Tuesday, April 1, 2008 12:25:12 PM(UTC)
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?
#2
Posted
:
Wednesday, April 2, 2008 4:20:16 AM(UTC)
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)
Groups: Registered
Posts: 8
Worked like a charm. Thanks!
LEADTOOLS Support
Imaging
Imaging SDK Questions
Re: Using L_TwainCreateNumericContainerOneValue and L_TwainSetCapability for string values?
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.