Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, September 28, 2006 11:48:33 AM(UTC)
ksirmons

Groups: Registered
Posts: 7


Howdy,

I have an issue when I check the twainsession to see if it supports duplex.

If the scanner does not support duplex, an error is thrown. 

The error is "Required capability not supported" 

I have tried the code 2 different ways and both thow an error when I am quering the capabilities.

Version 1:

If _twainSession.DuplexMode = TwainCapabilityValue.DuplexOnePassDuplex Or _twainSession.DuplexMode = TwainCapabilityValue.DuplexTwoPassDuplex Then

 _twainSession.EnableDuplex = True

End If


Vesion 2:

If Not IsNothing(twainCap) Then

If (twainCap.OneValue.ItemType = TwainItemType.Uint16) Then

'isDuplex = True

_twainSession.EnableDuplex = True

End If

End If

Thank you for any help.

Keith

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Saturday, September 30, 2006 11:57:54 PM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Do you get the error when checking the DuplexMode property or when setting the EnableDuplex property?

 
#3 Posted : Friday, October 6, 2006 5:23:25 AM(UTC)
ksirmons

Groups: Registered
Posts: 7


I get the error when checking the scanner.

 

If _twainSession.DuplexMode = TwainCapabilityValue.DuplexOnePassDuplex Or _twainSession.DuplexMode = TwainCapabilityValue.DuplexTwoPassDuplex Then

_twainSession.EnableDuplex = True

End If

If I understand the documentation correctly, duplexmode can only be 1 of 3 values (DuplexNone, DuplexOnePassDuplex, and DuplexTwoPassDuplex).

If it is one or two then I enable duplex, if it is neither, then it stays in simplex.

This code works fine for my FUJITSU fi-5530Cdj 9.18 driver, but throws an exception if I select the WIA-fi-5530Cdj 1.0 driver.

Here is the exception that line of code throws:

  Message "Required capability not supported"

  StackTrace "   at Leadtools.Twain.TwainException.CheckErrorCode(Int32 code)
   at Leadtools.Twain.TwainSession.get_DuplexMode()
   at Scanner.Scanner_Main_Form.GetSetScannerConfiguration() in ScannerForm.vb:line 771" 


Thank you,
Keith Sirmons

 

 

 
#4 Posted : Sunday, October 8, 2006 2:06:16 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

The message indicates that the scanner doesn't support duplex, but I
think you should still be able to at least check the capability. 
Anyway, the fact that it works with another scanner indicates that this may be an issue with the WIA-fi-5530Cdj
driver.  You can just catch the exception and have your application act as though duplex is not supported.  Will this do?

 
#5 Posted : Monday, October 9, 2006 4:15:59 AM(UTC)
ksirmons

Groups: Registered
Posts: 7


Ok.  That is what I have done while awaiting an answer.

 

Thank you,

Keith

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.095 seconds.