Applications must call TWAIN Session from a single thread.
TWAIN session as the period between successful OPENDSM and CLOSEDSM.
Add code to the Sample DS that will warm applications that try to use multiple threads in a TWAIN session.
Recode the thread ID used when the DS is open and verify it is the same thread used to EnableDS and Transfer images.
If a different thread is used display a warning message.