|
Available in the LEADTOOLS Imaging toolkit. |
CapOneValue Example for Visual Basic
Public WithEvents RasterTwain As LEADRasterTwain
Dim TwainCap As LEADTwainCapability
Private Sub Command2_Click()
Dim iRet As Integer
Dim CapVal As New LEADRasterVariant
Set TwainCap = New LEADTwainCapability
TwainCap.CapInfo.ConType = L_TWON_ONEVALUE
TwainCap.CapInfo.Capability = L_ICAP_UNITS
TwainCap.EnableMethodErrors = False
CapVal.Type = VALUE_USHORT
CapVal.LongValue = L_TWUN_INCHES
TwainCap.CapOneValue.OneValItemType = L_TWTY_UINT16
TwainCap.CapOneValue.OneValCapValue = CapVal
iRet = RasterTwain.SetCapability2(TwainCap, L_LTWAIN_CAPABILITY_SET)
If (iRet <> 0) Then
MsgBox "Error Setting Capability"
End If
Set TwainCap = Nothing
End Sub