Home › Forums › TWAIN Classic › Duplex scanning both side › Re: Duplex scanning not working – please HELP
Hello there,
Please help me in my current problem regarding duplex scanning.
I dont know how to set the CAP_Duplex and CAP_DuplexEnabled in my Code.
how to Add the 2 properties in TwCAP and what are the values?
Currently, my code contains like this in my TwCAP:
Friend Enum TwCap As Short
XferCount = &H1
ICompression = &H100
IPixelType = &H101
IUnits = &H102
IXferMech = &H103
End Enum
please help me how do i solve this.
and also this is my code in Acquire().
Public Function Acquire() As Boolean
Dim rc As TwRC
CloseSrc()
If Equals(appid.Id, IntPtr.Zero) = True Then
Init(hwnd)
If Equals(appid.Id, IntPtr.Zero) = True Then
Return False
End If
End If
rc = DSMident(appid, IntPtr.Zero, TwDG.Control, TwDAT.Identity, TwMSG.OpenDS, srcds)
If (rc <> TwRC.Success) Then
CloseSrc()
Return False
End If
Dim cap As TwCapability = New TwCapability(TwCap.XferCount, -1)
rc = DScap(appid, srcds, TwDG.Control, TwDAT.Capability, TwMSG.Set, cap)
If (rc <> TwRC.Success) Then
CloseSrc()
Return False
End If
Dim guif As TwUserInterface = New TwUserInterface
guif.ShowUI = 1
guif.ModalUI = 1
guif.ParentHand = hwnd
rc = DSuserif(appid, srcds, TwDG.Control, TwDAT.UserInterface, TwMSG.EnableDS, guif)
If (rc <> TwRC.Success) Then
CloseSrc()
Return False
End If
Return True
End Function
please help me how to do Scan Duplex.
Thanks…
Mabuhay!!!