This project has moved. For the latest updates, please go here.

Saraff.Twain.TwainException It worked! vb.net

Jun 28, 2016 at 5:45 AM
Hello,
i'm getting this error. .. can any one help me out?
Image

Saraff.Twain.TwainException It worked!
at Saraff.Twain.Twain32._GetAllSorces()
at Saraff.Twain.Twain32.OpenDSM()

Thanks in advance!

Regards,
daijobu
Jun 28, 2016 at 7:08 AM
Hello daijobu,

I think you should have to write this lines before write to SelectSource().
 _twain32.OpenDSM();
 _twain32.CloseDataSource();
Jun 28, 2016 at 7:17 AM
wahh thanks Vishal

but still messagebox "It Worked!" + no source
Image
Jun 28, 2016 at 8:02 AM
Hello daijobu,

did you install any twain driver in your system ?
or check your scanner is connected with your system ?
Coordinator
Jun 28, 2016 at 8:13 AM
Edited Jun 28, 2016 at 10:49 AM
Hello, daijobu.
Don't needed write anything before invoke a Twain32.SelectSource() method.
You must to handle a TwainException:
try {
    _twain32.SelectSource();
} catch(TwainException ex) {
    // <<< check a ex.ConditionCode
} catch(Exception(ex) {
    // <<<
}
Marked as answer by SARAFF on 7/1/2016 at 10:34 AM
Jun 28, 2016 at 8:20 AM
Hello, Saraff.
where is the method defined ? [VB.net]
Image
Jun 28, 2016 at 8:24 AM
VishalJani wrote:
Hello daijobu,

did you install any twain driver in your system ?
or check your scanner is connected with your system ?
No my friend and my scanner already connected to my computer ( cam + printer )
Jun 28, 2016 at 9:25 AM
finally
platform (x86) @@.
Image