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
Best regards, Alexander