GetNumericContainerValue example for C++ Builder
int TForm1::TwainGetCurrentValue ( )
{
L_INT nRet;
L_UINT16 * pVal= NULL;
TW_CAPABILITY twCap;
pVal= NULL;
twCap.Cap= ICAP_XFERMECH;
twCap.ConType= TWON_DONTCARE16;
nRet= LEADTwain1->GetCapability ( &twCap, LTWAIN_CAPABILITY_GETCURRENT );
if ( nRet != SUCCESS )
{
MessageBox ( Handle, "Failed to get capability", "ERROR", MB_OK );
return FAILURE;
}
if ( twCap.ConType == TWON_ONEVALUE )
nRet= LEADTwain1->GetNumericContainerValue ( &twCap, 0, &pVal );
else
{
if ( twCap.ConType == TWON_ONEVALUE )
nRet= LEADTwain1->GetNumericContainerValue ( &twCap, LTWAIN_VALUE_CURRENT, &pVal );
}
return nRet;
}