Home › Forums › TWAIN Classic › Problem DSMIdent displaying error and checking DEVICEONLINE
- This topic has 1 reply, 2 voices, and was last updated 11 years, 6 months ago by gabe.
- AuthorPosts
Hi, Thanks for reading. VB.net on Windows 7 64 bit. Application is set as x86 using Twain_32.dll. Scanner is Canon DR-6010C.
My problem… My form is being loaded as modal. When attempting to scan the form is calling a Twain function “DSMident” and if the power if off on the scanner then a message is being display from the scanner driver. Since my form is modal I cannot close the message and it gives the appearance the application is frozen. I tried implementing the twain capability of CAP_DEVICEONLINE and it always returns false.
Dim capDeviceOnline As New TwCapability(TwCap.CAP_DEVICEONLINE)
rc = DScap(appid, srcds, TwDG.Control, TwDAT.Capability, TwMSG.[Get], capDeviceOnline)
If rc <> TwRC.Success Then
CloseSrc()
Return False
End IfDoes anyone know of any workarounds for this problem? I would greately appreciate any help.
common problem. what to do with a messagebox from the driver… really kills the automation option for some solutions.
you’re not going to find a function from twain, you need a box eater.in my apps i fire off another thread and compare the windows present on the system before 3 or 4 of the problematic triplets, the thread watches for ‘known dialogs’ and sends them the ‘known response’. when the triplet completes i tell the thread to stop watching until the next triplet that i’m careful with comes along. determining which dialog to watch for is a pain, so is being as certain as you can be that you’re sending those dialog the correct message – isn’t the kind of thing you want to screw up.
it’s yucky.
.
- AuthorPosts