VintaSoft Twain .NET SDK Discussions

Questions, comments and suggestions concerning VintaSoft Twain .NET SDK.

Board index < VintaSoft Twain < VintaSoft Twain .NET SDK Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

Attempting managed execution inside OS Loader lock.



Attempting managed execution inside OS Loader lock.

Post by Alex »

Hello,

OS Loader lock exception may occur only when application that uses VintaSoftTwain.NET SDK is debugged in Visual Studio. This is not an error.

The exception occurs because VintaSoftTwain.NET SDK (managed assembly) uses TWAIN driver (unmanaged application) for management of scanner and TWAIN driver executes code in a separate thread which attempting to illegally call into managed code (return to the code of SDK) while holding the operating system's loader lock.

You can disable the LoadLock exception as following:
  • Run Visual Studio
  • Open the project
  • Select the "Debug => Exceptions..." menu
  • Extend "Manage debugging assistants"
  • Uncheck "LoaderLock" in the list
OS Loader lock exception cannot occur when application that uses VintaSoftTwain.NET SDK is executed without Visual Studio.

Best regards, Alexander


Page 1 from 1: 1