ScanTwain.exe and ScanWia.exe processes

  • Last Post 26 January 2017
Sebastiano posted this 09 January 2017

Hello everyone!

I have a scan procedure that uses twain functionalities exposed by the ABBYY suite.

I use the ABBYY SDK on C#.

Every time I access a functionality (for example when I create a ScanManager object to get the list of available sources) a new couple of "ScanTwain.exe" and "ScanWia.exe" processes appears.

After some minutes the newly created processes disappears. In any case, at least 3 or 4 couple of processes are always running in background.

A customer is complaining about these processes ( :| ), so I need to know if the 3 or 4 couple that are always running on background are part of a pool mantained by ABBYY SDK/FCEngine or it's a fault of mine on correctly killing the COM objects I created.

Best Regards, Sebastiano

Order By: Standard | Newest | Votes
IvanPopov posted this 13 January 2017

You could try to do the following. Once you have obtained the list of available scanning sources or any other necessary information, set the ScanManager to null and explicitly call garbage collector with GC.Collect(). Both "ScanTwain.exe" and "ScanWia.exe" processes should disappear.

Alternatively, you could try to reuse the ScanManager object instead of creating a new one every time you need to use its functionality (it appears that this is how you do it at the moment). This way only one "ScanTwain.exe" process and one "ScanWia.exe" process would be running in the background.

Sebastiano posted this 26 January 2017

The GC.Collect() did the work. Thanks!