twain / twain-dsm

TWAIN Data Source Manager
140 stars 55 forks source link

How to get TWAINDSM_LOG to work? #24

Open wleestrong opened 2 years ago

wleestrong commented 2 years ago

Trying to debug DS and APP, by logging their message data and state changes...

File src/readme.doc describes:

3.1.6 log.cpp Logging is activated by setting the TWAINDSM_LOG environment variable to the full path of the log file to be used.

I cannot get this to work!?! Further down there is an explanation of integration, with undefined symbols SF_DSM2_DS and SF_DSM2_DSM Where are these defined?

3.3.3 twaindsm32.dll

TWAIN Drivers that want to use twaindsm32.dll need to add the flag SF_DSM2_DS to the TW_IDENTITY SupportedGroups member. This is to trigger the application that they can use twaindsm32.dll. When a TWAIN Driver is opened it can check the TW_IDENITY SupportedGroups flag. If the DSM has set SF_DSM2_DSM the TWAIN Driver knows that it has been opened by twaindsm32.dll.