Tattakashi123 / t

Automatically exported from code.google.com/p/twaindotnet
0 stars 0 forks source link

DG_CONTROL / DAT_EVENT / MSG_PROCESSEVENT always returns NotDSEvent #12

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Using Canon DR-2510C
Trying to start scanning

What is the expected output? What do you see instead?
After enabling the source, application hangs in message processing loop. 
Scanner app shows "Scanning..." dialog, but scanning doesn't start. After 
calling DG_CONTROL / DAT_EVENT / MSG_PROCESSEVENT in method FilterMessage, 
the result is always NotDSEvent.

What version of the product are you using? On what operating system?
Win XP SP 3, latest source

Original issue reported on code.google.com by tekk...@gmail.com on 4 Apr 2010 at 10:00

GoogleCodeExporter commented 8 years ago
Hi , I found in the twain 2.1 documentation the next section

<code>
Using DAT_CALLBACK to Messages from the Source to the Application
Applications
TWAIN Applications running on Linux or Apple Macintosh OS X must use DG_CONTROL 
/
DAT_CALLBACK / MSG_REGISTERCALLBACK to register to receive asynchronous 
notifications
for events MSG_XFERREADY.
TWAIN Applications on Microsoft Windows that detect the presence of the DF_DSM2 
flag
inside of TW_IDENTITY.SupportedGroups are encouraged to use DAT_CALLBACK 
instead of
processing TWRC_DSEVENT from DG_CONTROL / DAT_EVENT / MSG_PROCESSEVENT. The
legacy TWAIN 1.x behavior is still supported by the Data Source Manager.
TWAIN Applications on Microsoft Windows using older versions of the Data Source 
Manager
(no DF_DSM2 flag detected) must use the legacy behavior.
Please note that TWAIN Applications are advised to return as soon as possible 
from a callback
function. Events like MSG_XFERREADY should initiate the image transfer in a 
different thread so
that the callback can return immediately.
</code>

If the DSM (Data source Manager) is DSM2 the DAT_EVENT is replaced by 
DAT_CALLBACK

Original comment by bartben...@gmail.com on 27 Oct 2010 at 8:34

Attachments: