I'm facing an issue on a Windows server 2019, used as a terminal server.
My app is a Delphi 32 bits executable, and when I ask the Twain dll to list the available scanner, the list is empty.
When using other application such as Twacker or EZTwain, the list is correctly populated.
On other OS (WS 2022, WS 2019 but not used for TSE, W7, W10 and so on...), no issue, everthing goes Ok.
==> question is: why can't I see those scanner ?
Test on other os => no issue
Test with 64bits executable => issue is the same
Run with admin rights => issue is the same
Issue was in the
LoadLibrarycall, due to the compile optionIf this option is not set, the windows directory given by the Windows API (
Windows.GetWindowsDirectory) isC:\User\xxxUserAccountxxx\WINDOWS,instead of
C:\WindowsThus, the application can not load correctly Twain dll & can not get the data from the twain_32 directory.
Edit: line added in the dpr file