ImageGear Professional for Windows ActiveX
Setting the TWAIN Image Acquisition Mode

For those who are unfamiliar with the three types of TWAIN acquisition, the following is a synopsis of each:

Not all of the TWAIN-supported transfer syntax modes are supported by all Data Sources. If you try to use an acquisition mode that your device does not support, you will receive an error message.

To set the transfer syntax to Disk File Transfer:

 
Copy Code
Dim capOneValue As IGTWAINCapOneValue
Set capOneValue =
frmMain.IGTwainCtl1.CreateCapability(IG_TW_ON_ONEVALUE)
capOneValue.ID = IG_TW_ICAP_XFERMECH
capOneValue.ItemType = AM_TID_META_UINT16
capOneValue.Value.ChangeType IG_DATA_LONG
capOneValue.Value.Long = IG_TW_SX_FILE
frmMain.IGTwainCtl1.SetCapability capOneValue, IG_TW_MSG_SET

To set the transfer syntax to Buffered Memory:

 
Copy Code
Dim capOneValue As IGTWAINCapOneValue
Set capOneValue =
frmMain.IGTwainCtl1.CreateCapability(IG_TW_ON_ONEVALUE)
capOneValue.ID = IG_TW_ICAP_XFERMECH
capOneValue.ItemType = AM_TID_META_UINT16
capOneValue.Value.ChangeType IG_DATA_LONG
capOneValue.Value.Long = IG_TW_SX_MEMORY
frmMain.IGTwainCtl1.SetCapability capOneValue, IG_TW_MSG_SET

To set the transfer syntax to Native:

 
Copy Code
Dim capOneValue As IGTWAINCapOneValue
Set capOneValue =
frmMain.IGTwainCtl1.CreateCapability(IG_TW_ON_ONEVALUE)
capOneValue.ID = IG_TW_ICAP_XFERMECH
capOneValue.ItemType = AM_TID_META_UINT16
capOneValue.Value.ChangeType IG_DATA_LONG
capOneValue.Value.Long = IG_TW_SX_NATIVE
frmMain.IGTwainCtl1.SetCapability capOneValue,
IG_TW_MSG_SET 

By default, if no call is made to set transfer mode, ImageGear will use the mode set in Data Source.

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback