Platform.UseNewDSM is not properly evaluated, TwainSession.__ownedSources is never cleaned

Issue #17 resolved
Anton Iermolenko created an issue

Hi,

We have found two issues at the moment with NTwain:

  1. Platform.UseNewDSM should be evaluated as: IsApp64bit && NewWinDsmExists

  2. TwainSession.__ownedSources ties TwainSource to a specific TwainSession. This leads to problems with subsequent scans using different TwainSession, but same scanner.

Could you, please, address these issues in your next build?

Thanks, Anton.

Comments (5)

  1. Eugene Wang repo owner
    1. OR is correct. If the app is 64bit (not just the OS but also the app process itself), then it must use the new dsm since the old dsm is only 32bit and will not work. Then when the app fails later it'll be for the correct reason (new dsm not found) rather than wrong bitness.

    2. This was partly fixed in a v2 branch check in. I've merged v2 back into master so future build will include it. When you need to use a source with a different session you'll have to re-get it again from the new session. You'll be returned the same object but the internal session will be for the new one.

  2. Log in to comment