Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why this m_twain.DatImageinfo return FAILURE/SEQERROR? #52

Open
CapacitorDev opened this issue Feb 28, 2023 · 1 comment
Open

Why this m_twain.DatImageinfo return FAILURE/SEQERROR? #52

CapacitorDev opened this issue Feb 28, 2023 · 1 comment

Comments

@CapacitorDev
Copy link

Hi,

I tried to get the twimageinfo on win10 64bit - plustek but couldnt succeed.

m_twain.DatImageinfo(TWAIN.DG.IMAGE, TWAIN.MSG.GET, ref twimageinfo) // It return SEQERROR all the time.

DG_IMAGE/DAT_IMAGEINFO/MSG_GET
0,0,0,0,0,0,0,0,0,0,0,0,0,0,TWPT_BW,TWCP_NONE
FAILURE/SEQERROR

any ideas?

Thank yous

@mlmcl62
Copy link
Contributor

mlmcl62 commented Mar 1, 2023

DG_IMAGE/DAT_IMAGEINFO/MSG_GET can only be successful when the TWAIN driver is in state 6 or 7 (7 is better, all of the metadata is guaranteed correct in that state).

DG_CONTROL/DAT_USERINTERFACE/MSG_ENABLEDS with a TW_USERINTERFACE.ShowUI value of 0, is needed to transition from state 4 to state 5.

The driver indicates that it's transitioned to state 6 when it returns DG_CONTROL/DAT_NULL/MSG_XFERREADY to the application, at that point it can issue a DG_IMAGE/DAT_IMAGE*XFER/MSG_GET call to transfer the image data, and then DG_IMAGE/DAT_IMAGEINFO/MSG_GET to get the metadata for the image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants