Home › Forums › TWAIN Classic › MSG_XFERREADY never fired
- This topic has 29 replies, 5 voices, and was last updated 10 years, 3 months ago by venkatind.
- AuthorPosts
It is hard to say. It is strange you do not get any logging at all.
You are using an older version of the DSM. There has been several bug fixes.
Try the newest version first and if you are still having problems you can download the source code, build, and step though.
http://sourceforge.net/projects/twain-dsm/Jim Watters
I’m a bit confusing.
After a little research on my filesystem i found:
1) Under C:/WINDOWS twain.dll and twain32.dll (respectively 1.7.0 and 1.7.1.1 versions).
2) Under C:/WINDOWS/twain_32 TWAINDSM32.msm.I found that within the file i’ve downloaded contains:
1) TWAINDSM32.msm
2) TWAINDSM.dllRelatively of the first i must overwrite it with the other one located under C:/WINDOWS/twain_32; where i place the second (TWAINDSM.dll) ?
it must substitute twain_32.dll and twain32.dll under C:/WINDOWS? and i must delete twain_32.dll and twain32.dll?
Tank you very much for your support.
Best regards
sdaviOk, updated.
Finally i have my log; i’ve runned my test app, and select source and exit:
[095644671 dsm.cpp 398 183 00000114] TWAIN Working Group
[095644671 dsm.cpp 399 183 00000114] TWAIN 32 Source Manager (Image Acquisition Interface)
[095644671 dsm.cpp 400 183 00000114] version: 2.0
[095644671 dsm.cpp 2028 183 00000114]
[095644671 dsm.cpp 2029 183 00000114] DG_CONTROL/DAT_PARENT/MSG_OPENDSM
[095644671 apps.cpp 215 183 00000114] Application: "MICSS"
[095644671 apps.cpp 216 183 00000114] "Generic"
[095644671 apps.cpp 217 183 00000114] "Twain++" version: 1.0
[095644671 apps.cpp 218 183 00000114] TWAIN 2.0
[095644671 apps.cpp 1200 127 00000114] Could not find DS_Entry function in DS: C:WINDOWStwain_32wiatwain.ds
[095644671 apps.cpp 528 127 00000114] Condition Code: DS or DSM reported error, application shouldn't
[095644671 apps.cpp 1213 0 00000114] Loaded library: C:WINDOWStwain_32BrMfSc08aMF790CWUBrTwdFe.ds
[095645031 apps.cpp 1213 0 00000114] Loaded library: C:WINDOWStwain_32hpsj_0001hpsj_0001.ds
[095645031 apps.cpp 528 0 00000114] Condition Code: DS or DSM reported error, application shouldn't
[095645046 apps.cpp 1213 6 00000114] Loaded library: C:WINDOWStwain_32SampleTWSRC_32.ds
[095645046 apps.cpp 1213 0 00000114] Loaded library: C:WINDOWStwain_32sample2TWAINDS_Sample32.ds
[095645046 dsm.cpp 596 18 00000114] TWRC_SUCCESS
[095645046 dsm.cpp 2028 18 00000114]
[095645046 dsm.cpp 2029 18 00000114] DG_CONTROL/DAT_IDENTITY/MSG_GETDEFAULT
[095645046 dsm.cpp 596 18 00000114] TWRC_SUCCESS
[095645046 dsm.cpp 2028 18 00000114]
[095645046 dsm.cpp 2029 18 00000114] DG_CONTROL/DAT_IDENTITY/MSG_OPENDS
[095645046 apps.cpp 1145 18 00000114] Datasource: "TWAIN Working Group"
[095645046 apps.cpp 1146 18 00000114] "Software Scan"
[095645046 apps.cpp 1147 18 00000114] "TWAIN2 FreeImage Software Scanne" version: 1.0
[095645046 apps.cpp 1148 18 00000114] TWAIN 2.0
[095645062 apps.cpp 1213 0 00000114] Loaded library: C:WINDOWStwain_32sample2TWAINDS_Sample32.ds
[095645062 dsm.cpp 596 203 00000114] TWRC_SUCCESS
[095645062 dsm.cpp 2028 203 00000114]
[095645062 dsm.cpp 2029 203 00000114] DG_CONTROL/DAT_CAPABILITY/MSG_GET
[095645062 dsm.cpp 2039 203 00000114] CAP_SUPPORTEDCAPS
[095645062 dsm.cpp 596 203 00000114] TWRC_SUCCESS
[095646984 dsm.cpp 2028 0 00000114]
[095646984 dsm.cpp 2029 0 00000114] DG_CONTROL/DAT_IDENTITY/MSG_GETFIRST
[095646984 dsm.cpp 596 0 00000114] TWRC_SUCCESS
[095646984 dsm.cpp 2028 0 00000114]
[095646984 dsm.cpp 2029 0 00000114] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[095646984 dsm.cpp 596 0 00000114] TWRC_SUCCESS
[095646984 dsm.cpp 2028 0 00000114]
[095646984 dsm.cpp 2029 0 00000114] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[095646984 dsm.cpp 596 0 00000114] TWRC_SUCCESS
[095646984 dsm.cpp 2028 0 00000114]
[095646984 dsm.cpp 2029 0 00000114] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[095646984 dsm.cpp 596 0 00000114] TWRC_ENDOFLIST
[095646984 dsm.cpp 2028 0 00000114]
[095646984 dsm.cpp 2029 0 00000114] DG_CONTROL/DAT_STATUS/MSG_GET
[095646984 dsm.cpp 596 0 00000114] TWRC_SUCCESS
[095646984 dsm.cpp 2028 0 00000114]
[095646984 dsm.cpp 2029 0 00000114] DG_CONTROL/DAT_IDENTITY/MSG_GETFIRST
[095646984 dsm.cpp 596 0 00000114] TWRC_SUCCESS
[095646984 dsm.cpp 2028 0 00000114]
[095646984 dsm.cpp 2029 0 00000114] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[095646984 dsm.cpp 596 0 00000114] TWRC_SUCCESS
[095646984 dsm.cpp 2028 0 00000114]
[095646984 dsm.cpp 2029 0 00000114] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[095646984 dsm.cpp 596 0 00000114] TWRC_SUCCESS
[095646984 dsm.cpp 2028 0 00000114]
[095646984 dsm.cpp 2029 0 00000114] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[095646984 dsm.cpp 596 0 00000114] TWRC_ENDOFLIST
[095646984 dsm.cpp 2028 0 00000114]
[095646984 dsm.cpp 2029 0 00000114] DG_CONTROL/DAT_STATUS/MSG_GET
[095646984 dsm.cpp 596 0 00000114] TWRC_SUCCESS
[095646984 dsm.cpp 2028 0 00000114]
[095646984 dsm.cpp 2029 0 00000114] DG_CONTROL/DAT_IDENTITY/MSG_GETDEFAULT
[095646984 dsm.cpp 596 0 00000114] TWRC_SUCCESS
[095646984 dsm.cpp 2028 0 00000114]
[095646984 dsm.cpp 2029 0 00000114] DG_CONTROL/DAT_IDENTITY/MSG_GETFIRST
[095646984 dsm.cpp 596 0 00000114] TWRC_SUCCESS
[095646984 dsm.cpp 2028 0 00000114]
[095646984 dsm.cpp 2029 0 00000114] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[095646984 dsm.cpp 596 0 00000114] TWRC_SUCCESS
[095646984 dsm.cpp 2028 0 00000114]
[095646984 dsm.cpp 2029 0 00000114] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[095646984 dsm.cpp 596 0 00000114] TWRC_SUCCESS
[095646984 dsm.cpp 2028 0 00000114]
[095646984 dsm.cpp 2029 0 00000114] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[095646984 dsm.cpp 596 0 00000114] TWRC_ENDOFLIST
[095646984 dsm.cpp 2028 0 00000114]
[095646984 dsm.cpp 2029 0 00000114] DG_CONTROL/DAT_STATUS/MSG_GET
[095646984 dsm.cpp 596 0 00000114] TWRC_SUCCESS
I disable user interface for listing sources, so i call DG_CONTROL/DAT_IDENTITY/MSG_GETFIRST – DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT for get all available sources.
What do you think?Next i made another proof: run my test app, listing sources, select one (when i select a source in the self-made window listing sources, i call OPEN_DS too)
and then enable previously opened source, hiding the default user interface;
the effect is that the main form of may app become hide and nothing happens;
here the log:
[100708218 dsm.cpp 398 183 00000184] TWAIN Working Group
[100708218 dsm.cpp 399 183 00000184] TWAIN 32 Source Manager (Image Acquisition Interface)
[100708218 dsm.cpp 400 183 00000184] version: 2.0
[100708218 dsm.cpp 2028 183 00000184]
[100708218 dsm.cpp 2029 183 00000184] DG_CONTROL/DAT_PARENT/MSG_OPENDSM
[100708218 apps.cpp 215 183 00000184] Application: "MICSS"
[100708218 apps.cpp 216 183 00000184] "Generic"
[100708218 apps.cpp 217 183 00000184] "Twain++" version: 1.0
[100708218 apps.cpp 218 183 00000184] TWAIN 2.0
[100708234 apps.cpp 1200 127 00000184] Could not find DS_Entry function in DS: C:WINDOWStwain_32wiatwain.ds
[100708234 apps.cpp 528 127 00000184] Condition Code: DS or DSM reported error, application shouldn't
[100708234 apps.cpp 1213 0 00000184] Loaded library: C:WINDOWStwain_32BrMfSc08aMF790CWUBrTwdFe.ds
[100708531 apps.cpp 1213 0 00000184] Loaded library: C:WINDOWStwain_32hpsj_0001hpsj_0001.ds
[100708531 apps.cpp 528 0 00000184] Condition Code: DS or DSM reported error, application shouldn't
[100708546 apps.cpp 1213 6 00000184] Loaded library: C:WINDOWStwain_32SampleTWSRC_32.ds
[100708546 apps.cpp 1213 0 00000184] Loaded library: C:WINDOWStwain_32sample2TWAINDS_Sample32.ds
[100708546 dsm.cpp 596 18 00000184] TWRC_SUCCESS
[100708546 dsm.cpp 2028 18 00000184]
[100708546 dsm.cpp 2029 18 00000184] DG_CONTROL/DAT_IDENTITY/MSG_GETDEFAULT
[100708546 dsm.cpp 596 18 00000184] TWRC_SUCCESS
[100708546 dsm.cpp 2028 18 00000184]
[100708546 dsm.cpp 2029 18 00000184] DG_CONTROL/DAT_IDENTITY/MSG_OPENDS
[100708546 apps.cpp 1145 18 00000184] Datasource: "TWAIN Working Group"
[100708546 apps.cpp 1146 18 00000184] "Software Scan"
[100708546 apps.cpp 1147 18 00000184] "TWAIN2 FreeImage Software Scanne" version: 1.0
[100708546 apps.cpp 1148 18 00000184] TWAIN 2.0
[100708562 apps.cpp 1213 0 00000184] Loaded library: C:WINDOWStwain_32sample2TWAINDS_Sample32.ds
[100708562 dsm.cpp 596 203 00000184] TWRC_SUCCESS
[100708562 dsm.cpp 2028 203 00000184]
[100708562 dsm.cpp 2029 203 00000184] DG_CONTROL/DAT_CAPABILITY/MSG_GET
[100708562 dsm.cpp 2039 203 00000184] CAP_SUPPORTEDCAPS
[100708562 dsm.cpp 596 203 00000184] TWRC_SUCCESS
[100710109 dsm.cpp 2028 0 00000184]
[100710109 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_IDENTITY/MSG_GETFIRST
[100710109 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100710109 dsm.cpp 2028 0 00000184]
[100710109 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[100710109 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100710109 dsm.cpp 2028 0 00000184]
[100710109 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[100710109 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100710109 dsm.cpp 2028 0 00000184]
[100710109 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[100710109 dsm.cpp 596 0 00000184] TWRC_ENDOFLIST
[100710109 dsm.cpp 2028 0 00000184]
[100710109 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_STATUS/MSG_GET
[100710109 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100710109 dsm.cpp 2028 0 00000184]
[100710109 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_IDENTITY/MSG_GETFIRST
[100710109 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100710109 dsm.cpp 2028 0 00000184]
[100710109 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[100710109 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100710109 dsm.cpp 2028 0 00000184]
[100710109 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[100710109 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100710109 dsm.cpp 2028 0 00000184]
[100710109 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[100710109 dsm.cpp 596 0 00000184] TWRC_ENDOFLIST
[100710109 dsm.cpp 2028 0 00000184]
[100710109 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_STATUS/MSG_GET
[100710109 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100710109 dsm.cpp 2028 0 00000184]
[100710109 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_IDENTITY/MSG_GETDEFAULT
[100710109 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100710109 dsm.cpp 2028 0 00000184]
[100710109 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_IDENTITY/MSG_GETFIRST
[100710109 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100710109 dsm.cpp 2028 0 00000184]
[100710109 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[100710109 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100710109 dsm.cpp 2028 0 00000184]
[100710109 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[100710109 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100710109 dsm.cpp 2028 0 00000184]
[100710109 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[100710109 dsm.cpp 596 0 00000184] TWRC_ENDOFLIST
[100710109 dsm.cpp 2028 0 00000184]
[100710109 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_STATUS/MSG_GET
[100710109 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100711765 dsm.cpp 2028 0 00000184]
[100711765 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_IDENTITY/MSG_CLOSEDS
[100711765 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100711765 dsm.cpp 2028 0 00000184]
[100711765 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_IDENTITY/MSG_OPENDS
[100711765 apps.cpp 1145 0 00000184] Datasource: "Brother Industries, Ltd."
[100711765 apps.cpp 1146 0 00000184] "Brother MFL-Pro Scanner"
[100711765 apps.cpp 1147 0 00000184] "TW-Brother MFC-790CW" version: 3.7
[100711765 apps.cpp 1148 0 00000184] TWAIN 1.6
[100711765 apps.cpp 1213 0 00000184] Loaded library: C:WINDOWStwain_32BrMfSc08aMF790CWUBrTwdFe.ds
[100712203 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100715796 dsm.cpp 2028 0 00000184]
[100715796 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_USERINTERFACE/MSG_ENABLEDS
[100715828 dsm.cpp 2028 0 00000184]
[100715828 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_NULL/MSG_XFERREADY
[100715828 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100715828 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100715828 apps.cpp 429 0 00000184] List of DS for app is invalid
[100715828 apps.cpp 528 0 00000184] Condition Code: Unrecognized MSG DG DAT combination
[100715828 dsm.cpp 2028 0 00000184]
[100715828 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_STATUS/MSG_GET
[100715828 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100717890 apps.cpp 429 0 00000184] List of DS for app is invalid
[100717890 apps.cpp 528 0 00000184] Condition Code: Unrecognized MSG DG DAT combination
[100717890 dsm.cpp 2028 0 00000184]
[100717890 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_STATUS/MSG_GET
[100717890 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100720515 apps.cpp 429 0 00000184] List of DS for app is invalid
[100720515 apps.cpp 528 0 00000184] Condition Code: Unrecognized MSG DG DAT combination
[100720515 dsm.cpp 2028 0 00000184]
[100720515 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_STATUS/MSG_GET
[100720515 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100721265 apps.cpp 429 0 00000184] List of DS for app is invalid
[100721265 apps.cpp 528 0 00000184] Condition Code: Unrecognized MSG DG DAT combination
[100721265 dsm.cpp 2028 0 00000184]
[100721265 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_STATUS/MSG_GET
[100721265 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100723046 apps.cpp 429 0 00000184] List of DS for app is invalid
[100723046 apps.cpp 528 0 00000184] Condition Code: Unrecognized MSG DG DAT combination
[100723046 dsm.cpp 2028 0 00000184]
[100723046 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_STATUS/MSG_GET
[100723046 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100723046 apps.cpp 429 0 00000184] List of DS for app is invalid
[100723046 apps.cpp 528 0 00000184] Condition Code: Unrecognized MSG DG DAT combination
[100723046 dsm.cpp 2028 0 00000184]
[100723046 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_STATUS/MSG_GET
[100723046 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100723046 apps.cpp 429 0 00000184] List of DS for app is invalid
[100723046 apps.cpp 528 0 00000184] Condition Code: Unrecognized MSG DG DAT combination
[100723046 dsm.cpp 2028 0 00000184]
[100723046 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_STATUS/MSG_GET
[100723046 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100724937 apps.cpp 429 0 00000184] List of DS for app is invalid
[100724937 apps.cpp 528 0 00000184] Condition Code: Unrecognized MSG DG DAT combination
[100724937 dsm.cpp 2028 0 00000184]
[100724937 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_STATUS/MSG_GET
[100724937 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100724937 apps.cpp 429 0 00000184] List of DS for app is invalid
[100724937 apps.cpp 528 0 00000184] Condition Code: Unrecognized MSG DG DAT combination
[100724937 dsm.cpp 2028 0 00000184]
[100724937 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_STATUS/MSG_GET
[100724937 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100724937 apps.cpp 429 0 00000184] List of DS for app is invalid
[100724937 apps.cpp 528 0 00000184] Condition Code: Unrecognized MSG DG DAT combination
[100724937 dsm.cpp 2028 0 00000184]
[100724937 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_STATUS/MSG_GET
[100724937 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100725000 apps.cpp 429 0 00000184] List of DS for app is invalid
[100725000 apps.cpp 528 0 00000184] Condition Code: Unrecognized MSG DG DAT combination
[100725000 dsm.cpp 2028 0 00000184]
[100725000 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_STATUS/MSG_GET
[100725000 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100725265 apps.cpp 429 0 00000184] List of DS for app is invalid
[100725265 apps.cpp 528 0 00000184] Condition Code: Unrecognized MSG DG DAT combination
[100725265 dsm.cpp 2028 0 00000184]
[100725265 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_STATUS/MSG_GET
[100725265 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100725265 apps.cpp 429 0 00000184] List of DS for app is invalid
[100725265 apps.cpp 528 0 00000184] Condition Code: Unrecognized MSG DG DAT combination
[100725265 dsm.cpp 2028 0 00000184]
[100725265 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_STATUS/MSG_GET
[100725265 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100725265 apps.cpp 429 0 00000184] List of DS for app is invalid
[100725265 apps.cpp 528 0 00000184] Condition Code: Unrecognized MSG DG DAT combination
[100725265 dsm.cpp 2028 0 00000184]
[100725265 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_STATUS/MSG_GET
[100725265 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100725734 apps.cpp 429 0 00000184] List of DS for app is invalid
[100725734 apps.cpp 528 0 00000184] Condition Code: Unrecognized MSG DG DAT combination
[100725734 dsm.cpp 2028 0 00000184]
[100725734 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_STATUS/MSG_GET
[100725734 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100725734 apps.cpp 429 0 00000184] List of DS for app is invalid
[100725734 apps.cpp 528 0 00000184] Condition Code: Unrecognized MSG DG DAT combination
[100725734 dsm.cpp 2028 0 00000184]
[100725734 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_STATUS/MSG_GET
[100725734 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100725734 apps.cpp 429 0 00000184] List of DS for app is invalid
[100725734 apps.cpp 528 0 00000184] Condition Code: Unrecognized MSG DG DAT combination
[100725734 dsm.cpp 2028 0 00000184]
[100725734 dsm.cpp 2029 0 00000184] DG_CONTROL/DAT_STATUS/MSG_GET
[100725734 dsm.cpp 596 0 00000184] TWRC_SUCCESS
[100726000 apps.cpp 429 0 00000184] List of DS for app is invalid
[100726000 apps.cpp 528 0 00000184] Condition Code: Unrecognized MSG DG DAT combination
[100726000 dsm.cpp 2028 0 00000184]
[100726000 dsm.cpp 2029
I’ve seen the DG_CONTROL/DAT_NULL/MSG_XFERREADY in the log: is this the triplet that the source send to application? (in my case to my dll).
If so, why i cant intercept MSG_XFERREADY?@sdavi wrote:
I’m a bit confusing.
After a little research on my filesystem i found:
1) Under C:/WINDOWS twain.dll and twain32.dll (respectively 1.7.0 and 1.7.1.1 versions).
2) Under C:/WINDOWS/twain_32 TWAINDSM32.msm.I found that within the file i’ve downloaded contains:
1) TWAINDSM32.msm
2) TWAINDSM.dllBest regards
sdaviThe old twain.dll and twain_32.dll files remain in C:Windows
The new TWAINDSM.dll file goes into C:WindowsSystem32
The msm file is a merge module that application developers can use with their installers to insure TWAINDSM.dll is placed in the correct location.
No files need to be renamed.
For more details see the readme.txt file that was in the download.Jim Watters
App Enabling the DS
DG_CONTROL/DAT_USERINTERFACE/MSG_ENABLEDS
The DS sending XferReady to App and App returning Success at receiving it.
DG_CONTROL/DAT_NULL/MSG_XFERREADY
TWRC_SUCCESSThe DS returning Success from EnableDS
TWRC_SUCCESS
Likely caused by your message loop not using the correct App ID or Source ID when it is sending DAT_EVENT / MSG_PROCESSEVENT
List of DS for app is invalid
Condition Code: Unrecognized MSG DG DAT combinationJim Watters
By the way. I can tell from the log that you are still not using the most recent version of the TWAINDSM.dll.
Jim WattersHi Jim.
First of all, tank you very much for your support.
Next, i’ve solved that problem.
Prior, in this post, i told i use subclassing tecnique in order to redirect the main application message loop to a custm window procedure.
In fact in the header file, as a global function, outside of the SourceManager class i declared:
LRESULT CALLBACK ApplicationClientWindowProcedureSubclassed(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam);
WNDPROC ApplicationClientOriginalWindowProcedure;
where the names, are clear.
In the CTOR of SourceManager i have:
class SourceManager
{
//Initialize other member vars
loadTwain();
ApplicationClientOriginalWindowProcedure = (WNDPROC)GetWindowLong(m_hWnd,GWL_WNDPROC);
SetWindowLong(m_hWnd,GWL_WNDPROC,(LONG)ApplicationClientWindowProcedureSubclassed);
}
Now there was another problem: under my self defined ApplicationClientWindowProcedureSubclassed i must obtain a pointer to SourceManager class in order
to call other members functions (like doXFer, endXFer and so on).
This problem i solved getting a pointer to that class by inquiring another class: SourceManagerFactory that give me the only one singleton instance of SourceManager class.
LRESULT CALLBACK ApplicationClientWindowProcedureSubclassed(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
{
SourceManagerFactory* pFactory = getSourceManagerFactory();
ISourceManager* pThis = (ISourceManager *)pFactory->createSourceManagerInstance(hwnd);
if(pThis->isCurrentSourceEnabled())
{
TW_EVENT twEvent;
twEvent.pEvent= (TW_MEMREF)&uMsg;
pThis->twainProcedure(&(pThis->getAppId()),pThisgetCurretSource()->getTwainIdentity(),DG_CONTROL,DAT_EVENT,MSG_PROCESSEVENT,(TW_MEMREF)&twEvent);
//code to manage entire transfer omitted
}
return CallWindowProc(ApplicationClientOriginalWindowProcedure,hwnd,uMsg,wParam,lParam);
}
In this way never get MSG_XFERREADY, so i made little changes:
LRESULT CALLBACK ApplicationClientWindowProcedureSubclassed(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
{
SourceManagerFactory* pFactory = getSourceManagerFactory();
ISourceManager* pThis = (ISourceManager *)pFactory->createSourceManagerInstance(hwnd);
if(pThis->isCurrentSourceEnabled())
{
pThis->twainMessageLoop(uMsg);
}
return CallWindowProc(ApplicationClientOriginalWindowProcedure,hwnd,uMsg,wParam,lParam);
}
void SourceManager::twainMessageLoop(UINT uMsg)
{
TW_EVENT twEvent;
twEvent.pEvent= (TW_MEMREF)&uMsg;
twainProcedure(&m_appId,m_currentSource->getTwainIdentity(),DG_CONTROL,DAT_EVENT,MSG_PROCESSEVENT,(TW_MEMREF)&twEvent);
switch(twEvent.TWMessage)
{
case MSG_XFERREADY:
getImageInfo();
getImageLayout();
executeNativeTransfer();
if(this->m_lastOperationResult->getResultCode()==TWRC_XFERDONE)
{
stopTransfer();
disableCurrentSource();
closeCurrentSource();
}
break;
case MSG_CLOSEDSREQ:
disableCurrentSource();
closeCurrentSource();
break;
case MSG_ENDXFER:
disableCurrentSource();
break;
}
}
in this way i’m able to process MSG_XFERREADY and all appear to work properly.
But by examining the log, at the end of the transfer, i got a TWRC_FAILURE, corresponding to the stopTransfer() call.(DG_IMAGE,DAT_PENDINGXFERS,MSG_ENDXFER).
Here the log:
[185246265 dsm.cpp 398 183 000003DC] TWAIN Working Group
[185246265 dsm.cpp 399 183 000003DC] TWAIN 32 Source Manager (Image Acquisition Interface)
[185246265 dsm.cpp 400 183 000003DC] version: 2.0
[185246265 dsm.cpp 2028 183 000003DC]
[185246265 dsm.cpp 2029 183 000003DC] DG_CONTROL/DAT_PARENT/MSG_OPENDSM
[185246265 apps.cpp 215 183 000003DC] Application: "MICSS"
[185246265 apps.cpp 216 183 000003DC] "Generic"
[185246265 apps.cpp 217 183 000003DC] "Twain++" version: 1.0
[185246265 apps.cpp 218 183 000003DC] TWAIN 2.0
[185246281 apps.cpp 1200 127 000003DC] Could not find DS_Entry function in DS: C:WINDOWStwain_32wiatwain.ds
[185246281 apps.cpp 528 127 000003DC] Condition Code: DS or DSM reported error, application shouldn't
[185246281 apps.cpp 1213 0 000003DC] Loaded library: C:WINDOWStwain_32BrMfSc08aMF790CWUBrTwdFe.ds
[185246625 apps.cpp 1213 0 000003DC] Loaded library: C:WINDOWStwain_32hpsj_0001hpsj_0001.ds
[185246640 apps.cpp 528 0 000003DC] Condition Code: DS or DSM reported error, application shouldn't
[185246640 apps.cpp 1213 6 000003DC] Loaded library: C:WINDOWStwain_32SampleTWSRC_32.ds
[185246640 apps.cpp 1213 0 000003DC] Loaded library: C:WINDOWStwain_32sample2TWAINDS_Sample32.ds
[185246640 dsm.cpp 596 18 000003DC] TWRC_SUCCESS
[185248796 dsm.cpp 2028 0 000003DC]
[185248796 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_IDENTITY/MSG_GETFIRST
[185248796 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185248796 dsm.cpp 2028 0 000003DC]
[185248796 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[185248796 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185248796 dsm.cpp 2028 0 000003DC]
[185248796 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[185248796 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185248796 dsm.cpp 2028 0 000003DC]
[185248796 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[185248796 dsm.cpp 596 0 000003DC] TWRC_ENDOFLIST
[185248796 dsm.cpp 2028 0 000003DC]
[185248796 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185248796 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185248796 dsm.cpp 2028 0 000003DC]
[185248796 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_IDENTITY/MSG_GETFIRST
[185248796 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185248796 dsm.cpp 2028 0 000003DC]
[185248796 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[185248796 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185248796 dsm.cpp 2028 0 000003DC]
[185248796 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[185248796 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185248796 dsm.cpp 2028 0 000003DC]
[185248796 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[185248796 dsm.cpp 596 0 000003DC] TWRC_ENDOFLIST
[185248796 dsm.cpp 2028 0 000003DC]
[185248796 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185248796 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185248796 dsm.cpp 2028 0 000003DC]
[185248796 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_IDENTITY/MSG_GETDEFAULT
[185248796 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185248796 dsm.cpp 2028 0 000003DC]
[185248796 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_IDENTITY/MSG_GETFIRST
[185248796 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185248796 dsm.cpp 2028 0 000003DC]
[185248796 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[185248796 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185248796 dsm.cpp 2028 0 000003DC]
[185248796 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[185248796 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185248796 dsm.cpp 2028 0 000003DC]
[185248796 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_IDENTITY/MSG_GETNEXT
[185248796 dsm.cpp 596 0 000003DC] TWRC_ENDOFLIST
[185248796 dsm.cpp 2028 0 000003DC]
[185248796 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185248796 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185250171 dsm.cpp 2028 0 000003DC]
[185250171 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_IDENTITY/MSG_OPENDS
[185250171 apps.cpp 1145 0 000003DC] Datasource: "Brother Industries, Ltd."
[185250171 apps.cpp 1146 0 000003DC] "Brother MFL-Pro Scanner"
[185250171 apps.cpp 1147 0 000003DC] "TW-Brother MFC-790CW" version: 3.7
[185250171 apps.cpp 1148 0 000003DC] TWAIN 1.6
[185250171 apps.cpp 1213 0 000003DC] Loaded library: C:WINDOWStwain_32BrMfSc08aMF790CWUBrTwdFe.ds
[185250687 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185250734 dsm.cpp 2028 0 000003DC]
[185250734 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_USERINTERFACE/MSG_ENABLEDS
[185250750 dsm.cpp 2028 0 000003DC]
[185250750 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_NULL/MSG_XFERREADY
[185250750 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185250750 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185250750 dsm.cpp 2028 0 000003DC]
[185250750 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185250750 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185250750 dsm.cpp 2028 0 000003DC]
[185250750 dsm.cpp 2029 0 000003DC] DG_IMAGE/DAT_IMAGEINFO/MSG_GET
[185250750 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185250750 dsm.cpp 2028 0 000003DC]
[185250750 dsm.cpp 2029 0 000003DC] DG_IMAGE/DAT_IMAGELAYOUT/MSG_GET
[185250750 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185250750 dsm.cpp 2028 0 000003DC]
[185250750 dsm.cpp 2029 0 000003DC] DG_IMAGE/DAT_IMAGENATIVEXFER/MSG_GET
[185250937 dsm.cpp 2028 1400 000003DC]
[185250937 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185250937 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185250984 dsm.cpp 2028 1400 000003DC]
[185250984 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185250984 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185251140 dsm.cpp 2028 1400 000003DC]
[185251140 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185251140 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185251187 dsm.cpp 2028 1008 000003DC]
[185251187 dsm.cpp 2029 1008 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185251187 dsm.cpp 596 1008 000003DC] TWRC_SUCCESS
[185251187 dsm.cpp 2028 1400 000003DC]
[185251187 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185251187 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185251187 dsm.cpp 2028 1400 000003DC]
[185251187 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185251187 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185251187 dsm.cpp 2028 1400 000003DC]
[185251187 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185251187 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185251187 dsm.cpp 2028 1400 000003DC]
[185251187 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185251187 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185251343 dsm.cpp 2028 1400 000003DC]
[185251343 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185251343 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185251390 dsm.cpp 2028 1008 000003DC]
[185251390 dsm.cpp 2029 1008 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185251390 dsm.cpp 596 1008 000003DC] TWRC_SUCCESS
[185251390 dsm.cpp 2028 1400 000003DC]
[185251390 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185251390 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185251390 dsm.cpp 2028 1400 000003DC]
[185251390 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185251390 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185251390 dsm.cpp 2028 1400 000003DC]
[185251390 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185251390 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185251390 dsm.cpp 2028 1400 000003DC]
[185251390 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185251390 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185253828 dsm.cpp 2028 1008 000003DC]
[185253828 dsm.cpp 2029 1008 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185253828 dsm.cpp 596 1008 000003DC] TWRC_SUCCESS
[185253828 dsm.cpp 2028 1400 000003DC]
[185253828 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185253828 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185253828 dsm.cpp 2028 1400 000003DC]
[185253828 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185253828 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185253828 dsm.cpp 2028 1400 000003DC]
[185253828 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185253828 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185253828 dsm.cpp 2028 1400 000003DC]
[185253828 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185253828 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185253890 dsm.cpp 2028 1008 000003DC]
[185253890 dsm.cpp 2029 1008 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185253890 dsm.cpp 596 1008 000003DC] TWRC_SUCCESS
[185253890 dsm.cpp 2028 1400 000003DC]
[185253890 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185253890 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185253890 dsm.cpp 2028 1400 000003DC]
[185253890 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185253890 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185253890 dsm.cpp 2028 1400 000003DC]
[185253890 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185253890 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185253890 dsm.cpp 2028 1400 000003DC]
[185253890 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185253890 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185255984 dsm.cpp 2028 1008 000003DC]
[185255984 dsm.cpp 2029 1008 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185255984 dsm.cpp 596 1008 000003DC] TWRC_SUCCESS
[185255984 dsm.cpp 2028 1400 000003DC]
[185255984 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185255984 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185255984 dsm.cpp 2028 1400 000003DC]
[185255984 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185255984 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185255984 dsm.cpp 2028 1400 000003DC]
[185255984 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185255984 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185255984 dsm.cpp 2028 1400 000003DC]
[185255984 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185255984 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185256046 dsm.cpp 2028 1400 000003DC]
[185256046 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185256046 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185257531 dsm.cpp 2028 1400 000003DC]
[185257531 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185257531 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185259718 dsm.cpp 2028 1400 000003DC]
[185259718 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185259718 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185259718 dsm.cpp 2028 1400 000003DC]
[185259718 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185259718 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185259718 dsm.cpp 2028 1400 000003DC]
[185259718 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185259718 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185259718 dsm.cpp 2028 0 000003DC]
[185259718 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185259718 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185259718 dsm.cpp 2028 1400 000003DC]
[185259718 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185259718 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185259718 dsm.cpp 2028 1400 000003DC]
[185259718 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185259718 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185259718 dsm.cpp 2028 1400 000003DC]
[185259718 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185259718 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185259718 dsm.cpp 2028 1400 000003DC]
[185259718 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185259718 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185300140 dsm.cpp 2028 1400 000003DC]
[185300140 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185300140 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185300187 dsm.cpp 2028 1400 000003DC]
[185300187 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185300187 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185300640 dsm.cpp 2028 1400 000003DC]
[185300640 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185300640 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185303937 dsm.cpp 596 0 000003DC] TWRC_XFERDONE
[185303937 dsm.cpp 2028 0 000003DC]
[185303937 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185303937 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185303937 dsm.cpp 2028 0 000003DC]
[185303937 dsm.cpp 2029 0 000003DC] DG_IMAGE/DAT_PENDINGXFERS/MSG_ENDXFER
[185303937 dsm.cpp 596 0 000003DC] TWRC_FAILURE
[185303937 dsm.cpp 2028 0 000003DC]
[185303937 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185303937 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
[185303937 dsm.cpp 2028 1400 000003DC]
[185303937 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185303937 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185305906 dsm.cpp 2028 1400 000003DC]
[185305906 dsm.cpp 2029 1400 000003DC] DG_CONTROL/DAT_STATUS/MSG_GET
[185305906 dsm.cpp 596 1400 000003DC] TWRC_SUCCESS
[185306187 dsm.cpp 2028 0 000003DC]
[185306187 dsm.cpp 2029 0 000003DC] DG_CONTROL/DAT_USERINTERFACE/MSG_DISABLEDS
[185306203 dsm.cpp 2028 1413 000003DC]
[185306203 dsm.cpp 2029 1413 000003DC] DG_CONTROL/DAT_NULL/MSG_CLOSEDSREQ
[185306203 dsm.cpp 596 1413 000003DC] TWRC_SUCCESS
[185306203 dsm.cpp 596 2 000003DC] TWRC_SUCCESS
[185306203 dsm.cpp 2028 2 000003DC]
[185306203 dsm.cpp 2029 2 000003DC] DG_CONTROL/DAT_IDENTITY/MSG_CLOSEDS
[185306203 dsm.cpp 596 0 000003DC] TWRC_SUCCESS
It’s strange, i tink my call to stop transfer is correct: it hide the call:
void SourceManager::stopTransfer()
{
TW_PENDINGXFERS twPendingXfers;
twainProcedure(&m_appId,m_currentSource->getTwainIdentity(),DG_IMAGE,DAT_PENDINGXFERS,MSG_ENDXFER,(TW_MEMREF)&twPendingXfers);
}
Best regards.
try
DG_CONTROL/DAT_PENDINGXFERS/MSG_ENDXFER
Jim Watters
WOW!!!! It works!!!!
But i’m confused: my triplet is incorrect???P.S.
Tank You, JimYeah, it was incorrect: i’m confused in reading the twain doc.
hi,
i am developing an dll twain driver for twain scanner. I have got to do the state 1: load source manager
state 2: source manager loaded
state 3: soource manager open
state 4: select source
state 5: source openi have the same problem, in the state 5-6 a can´t intercept the MSG_XFERREADY message in the loop message.
I havn´t one WINMAIN loop, but i have one DLLMAIN and an DialogProc. i have got updated the loop message in the dialog proc in this way:
BOOL CALLBACK ScannerProc ( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
indice=0;
TW_EVENT twEvent;
TW_INT16 rc;
rc = TWRC_NOTDSEVENT;
switch (uMsg)
{
if ( gDSOpen )
{
twEvent.pEvent = (TW_MEMREF)&uMsg;
twEvent.TWMessage = MSG_NULL;rc = (*pDSM_Entry)(>wAppID,&gDSIdentity,DG_CONTROL,DAT_EVENT,MSG_PROCESSEVENT,(TW_MEMREF)&twEvent);
if (rc != TWRC_NOTDSEVENT)
trace.Log(“He pasado %s:”, twEvent.TWMessage);switch (twEvent.TWMessage)
{
case MSG_XFERREADY:
trace.Log(“He pasado por sg_xferready”);
break;
case MSG_CLOSEDSREQ:
trace.Log(“He pasado por MSG_CLOSEDSREQ”);
break;
case MSG_CLOSEDSOK:
trace.Log(“He pasado por MSG_CLOSEDSOK”);
break;
case MSG_NULL:
// no message returned from the source
break;
}
}case WM_INITDIALOG:
return TRUE;case WM_COMMAND:
case IDOK:
case WM_CLOSE:
//}//fin de if rc == NODSEVENT
} // Fin switch de Msg
return FALSE;
}but never got MSG_XFERREADY.
Please somebody can help me?
I am working in w7 y load the twain_32.dll dinamically, i am reading in this post that was an problem with w7???
thank you very much.
Check the TWAIN2 log file to make sure the DSM received it.
If it did not check to see if you have more than one copy of the twain_32.dll.
You might have one in Windows and one in your system folder. I have encountered some bad drivers that would install twain_32.dll to the system folder.Jim Watters
Hi Jim,
We are using the old twain_32.dll(1.7) and it is having the same issue.
Our App is 32 bit application.In Win 32 it is working fine.But in Win7 64 bit ,We are not getting the MSG_XFERREADY Message.
The scanner start ,pages are scanned and after the scan is complete MSG_XFERREADY is not fired.
Thank you in advance.
- AuthorPosts