QueryCapability Example for Visual Basic

Dim RasterTwain As New LEADRasterTwain_U
Dim TwainCap As New LEADRasterTwainCapability_U
Dim iRet As Integer

RasterTwain.InitSession hWnd
RasterTwain.SelectSource

TwainCap.ConType = L_TWON_DONTCARE16
TwainCap.Capability = L_ICAP_UNITS

iRet = RasterTwain.QueryCapability(TwainCap)
If (iRet <> 0) Then
	MsgBox "Error Getting Capability"
End If