twain_library icon indicating copy to clipboard operation
twain_library copied to clipboard

Problem with name of file

Open HezinTUKE opened this issue 1 year ago • 2 comments

Hello, after scanning the source ( DTWAIN_AcquireFile ) it adds DTWAIN_SysDestroy to the file name and at the end I get the file name FILE.tifDTWAIN_SysDestroy

HezinTUKE avatar Oct 30 '23 10:10 HezinTUKE

More than likely it is a bug in your program (maybe you are using a non-null-terminated string when a null-terminated string is expected?). Please post the program.

dynarithmic avatar Oct 30 '23 10:10 dynarithmic

DTWAIN_AcquireFile requires a null-terminated string as the file name. Given the issue you are having, I am getting the suspicion that the name you are giving DTWAIN_AcquireFile is not null-terminated. Whatever stray characters that appear after the "good" string is being picked up, all due to the null that's missing.

If you were to produce a full TWAIN log and inspected the DTWAIN_AcquireFile call in the call stack, it will show that the string you are passing is faulty, thus not an error in DTWAIN.

dynarithmic avatar Oct 30 '23 13:10 dynarithmic

Closing, as this issue is in all likelihood due to passing a string that is not null-terminated string to DTWAIN_AcquireFile.

dynarithmic avatar May 20 '24 18:05 dynarithmic