Error message: Source is connected to maximum supported number of applications

Symptoms:

When you acquire images with Dynamic Web TWAIN, you may receive the following error message returned by the ErrorString property:

Cause:

The problem may occur when the source is NOT disabled completely after a transfer ends or is used by other applications.

Resolutions:

1. Please check if any other application is using the source. If yes, please close it before scanning.

2. You can set IfDisableSourceAfterAcquire to true and use CloseSource to make sure that the source is closed after a session of transfers ends.

Code:

function btnScan_onclick() 
{
   DWObject.SelectSource();
   DWObject.CloseSource(); //close source before open
   DWObject.OpenSource();
   DWObject.IfDisableSourceAfterAcquire = true; //close source after acquiring
   DWObject.AcquireImage();
}
//close source after all transfers end
function OnPostAllTransfers() 
{
   DWObject.CloseSource();
}

3. Reboot your device.

References:

CloseSource
IfDisableSourceAfterAcquire
OnPostAllTransfers