Forum Discussion
Trying to MSIX package LOB application that needs TWAIN access
I had written a comprehensive reply to this but it looks like the system deleted it after I posted it because I mentioned the name of a very popular imaging tool that has the same issue? 😡
To Summarise, my MSIX package only contains my application, a simple .NET application that interacts with the TWAIN Data Source manager found in c:\windows\system32\twaindsm.dll
It doesn't install any drivers or folders to system32, or install any scanning device drivers. All these are installed natively on the Windows OS outside of my MSIX Package
When the 64-bit version of TWAIN data source manager is loaded, it scans the C:\Windows\twain_64\ folder for scanner drivers installed.
Each sub folder generally has its own scanner driver within it. There can be any number of sub-folders here depending on how many different scanning devices you have installed.
The TWAINDSM loads the *.ds file contained in this sub-folder that is the scanner driver, with a LoadLibrary call
This call works fine outside of an MSIX container, but if it tries to do the same thing within an MSIX container, it fails to load the DS file
I'm not sure what other debugging steps I can take to diagnose why it cannot load the files.
The Source code is available on github for the TWAINDSM dll and the logs above point to where it fails @ apps.cpp 1557
Hopefully this post is not deleted like the last.
The named program that it's blocking me from posting that has the same issue is a
"popular image viewer that starts with an i and ends in view" that has a red icon. It's in the Windows AppStore as an MSIX install
When you do a File -> Select Scan/TWAIN Source... it has the exact same problem as my application. and the TWAINDSM logs show it cannot load the datasource library either.
If you run the same application as a standalone application outside of the AppStore distribution, it works fine.
So it seems there's some quirk here with trying to load Datasource drivers via the TWAIN Data Source Manager in an MSIX container.