Home › Forums › TWAIN Classic › twaindsm : start a scan in a c++ thread
- This topic is empty.
- AuthorPosts
- Mikael P
Hello,
I am working on integrating a scanner in my software.
I was trying to scan in a c++ thread (not a windowed thread) on a windows 7 64 system.When I call “enableDS(GetDesktopWindow(), FALSE))”, an error message occurs when calling “TW_UINT16 twrc = DSM_Entry(DG_CONTROL, DAT_USERINTERFACE, MSG_ENABLEDS, (TW_MEMREF)&(m_ui));”
I think DSM needs to be called from a window because of TW_USER_INTEFACE m_ui.
Is it possible to use scan in a thread without beeing in a window ?Thanks in advance,
Mikael.MarkMTWAIN on Windows requires a window for two reasons: to support the scanner’s GUI, by passing messages to it, and to receive DG_CONTROL / DAT_NULL / MSG_XFERREADY for scanning (and two other messages for OK/CANCEL for the GUI). It’s not the graphic that’s needed, just the message pump.
That said, the Window can be hidden from view, so as far as the user is concerned there is no Window.
Johnwick88thank you comment
sbobet mobile
สมัคร sbobet
- AuthorPosts