LoadTemplate Example for Visual FoxPro 6
#define L_TWON_ONEVALUE 5
#define L_LTWAIN_CAPABILITY_SET 1
#define L_TWTY_UINT16 4
#define L_ICAP_XFERMECH 259
#define L_TWSX_NATIVE 0
oRasterTwain.LoadTemplate("c:\test.ltt")
oTwainCap.CapInfo.Capability = L_ICAP_XFERMECH
oTwainCap.CapInfo.ConType = L_TWON_ONEVALUE
oTwainCap.CapOneValue.OneValItemType = L_TWTY_UINT16
#define VALUE_USHORT 4
CapVal = CreateObject("LEADRasterVariant.LEADRasterVariant.145")
CapVal.Type = VALUE_USHORT
CapVal.LongValue = L_TWSX_NATIVE
oTwainCap.CapOneValue.OneValCapValue = CapVal
oRasterTwain.SetCapability2(oTwainCap, L_LTWAIN_CAPABILITY_SET)
oRasterTwain.SaveTemplate("c:\test.ltt")