twain-dsm icon indicating copy to clipboard operation
twain-dsm copied to clipboard

Randomized base address and DEP disabled in VS project file

Open mikekaganski opened this issue 7 years ago • 2 comments

Visual Studio 2015 project file has RandomizedBaseAddress set to false (for all configurations), and DataExecutionPrevention set to false (for 32-bit). Can those features be enabled?

mikekaganski avatar Jan 24 '18 20:01 mikekaganski

Never tested in 32-bit, but in 64 there's some odd compatibility issues, for instance the DSM Call with DAT_IMAGENATIVEXFER returns an invalid handle. It seems to cheat on using 32-bit integers and having the high-order word fixed, which doesn't apply when ASLR & friends are in place. As for DEP, didn't test it.

polesapart avatar Jan 09 '20 20:01 polesapart

I ran into this issue in an application with ASLR enabled as well. Does anyone have any idea on how to fix it?

I had a go at debugging the DSM code, but as far as I could tell, the invalid handle was being assigned from within the Data Source (which I wasn't able to debug). It seems unlikely that 3 distinct sets of 64-bit scanner drivers have the same exact problem with 64-bit pointers for the DAT_IMAGENATIVEXFER operation, but I just can't see what might be wrong in the DSM code.

zaneduffield avatar Dec 14 '22 02:12 zaneduffield