Attempting managed execution inside OS Loader lock.

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

Moderator: Alex

Post Reply
Alex
Site Admin
Posts: 1474
Joined: Thu Jul 10, 2008 2:21 pm

Attempting managed execution inside OS Loader lock.

Post by Alex » Wed Dec 04, 2013 9:19 am

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest