LoadTemplate Example for Visual Basic

Dim RasterTwain As New LEADRasterTwain_U
Dim CapVal As LEADRasterVariant_U
Dim TwainCap As New LEADTwainCapability_U

RasterTwain.InitSession hWnd
RasterTwain.SelectSource

RasterTwain.LoadTemplate "c:\test.ltt"
TwainCap.CapInfo.Capability = L_ICAP_XFERMECH
TwainCap.CapInfo.ConType = L_TWON_ONEVALUE
TwainCap.CapOneValue.OneValItemType = L_TWTY_UINT16
CapVal.Type = VALUE_USHORT
CapVal.LongValue = L_TWSX_NATIVE
TwainCap.CapOneValue.OneValCapValue = CapVal
RasterTwain.SetCapability2 TwainCap, L_LTWAIN_CAPABILITY_SET
RasterTwain.SaveTemplate "c:\test.ltt"