How to access a scanner via TWAIN.

jfaguiar
Posts: 2
Joined: Mon Mar 22, 2010 2:43 am

Re: How to access a scanner via TWAIN.

Post by jfaguiar »

Estoy tratando de utilizar este dll con múltiples paginas y para escribir yo:
_:SetMultiTransfer(1) // Opción para escanear varias páginas
Pero está trabando el equipo cuando vacía la bandeja
Me di cuenta de que está bloqueando el equipo cuando se ejecuta: nDib := (_: AcquireToFile (cFilescan)).

Mi Tscan.prg está así:

METHOD AcquireToFile (cFileName) INLINE TW_ACQUIRETOFILENAME (:: hWnd, cFileName)

HB_FUNC( TW_ACQUIRETOFILENAME ) // hWnd, cFileName
{
hb_retni( TWAIN_AcquireToFilename( ( HWND ) hb_parnl( 1 ), hb_parc( 2 ) ) );
}

¿Alguien me puede ayudar?

Estoy usando FiveWin for xHarbour 13.07, Windows 7 32 bits.

Gracias amigos.
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: How to access a scanner via TWAIN.

Post by Enrico Maria Giordano »

This sample is working fine here:

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    ? TWAIN_SCANNER( "This is a test.bmp" )

    RETURN NIL


FUNCTION TWAIN_SCANNER( cBmp )

    IF TWAIN_ISAVAILABLE() = 0
        ? "TWAIN is not installed in this computer."
        RETURN .F.
    ENDIF

    RETURN TWAIN_ACQUIRETOFILENAME( 0, cBmp ) = 0


DLL32 STATIC FUNCTION TWAIN_ACQUIRETOFILENAME( hWnd AS LONG, cFile AS LPSTR ) AS LONG;
      PASCAL FROM "TWAIN_AcquireToFilename" LIB "eztw32.dll"

DLL32 STATIC FUNCTION TWAIN_ISAVAILABLE() AS LONG;
      PASCAL FROM "TWAIN_IsAvailable" LIB "eztw32.dll"
EMG
jfaguiar
Posts: 2
Joined: Mon Mar 22, 2010 2:43 am

Re: How to access a scanner via TWAIN.

Post by jfaguiar »

Good morning, Enrico.
What your scanner? I'm with a Kodak i1120. With Fivewin for xHarbour 13.07 and Bcc 7.3
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: How to access a scanner via TWAIN.

Post by Enrico Maria Giordano »

jfaguiar wrote:Good morning, Enrico.
What your scanner? I'm with a Kodak i1120. With Fivewin for xHarbour 13.07 and Bcc 7.3
HP Deskjet F380, latest FWH and same BCC.

EMG
User avatar
gkuhnert
Posts: 274
Joined: Fri Apr 04, 2008 1:25 pm
Location: Aachen - Germany // Kerkrade - Netherlands
Contact:

Re: How to access a scanner via TWAIN.

Post by gkuhnert »

Problem for me is, that I didn't obtain a licence at the time version 2 of this dll was available. Now they are only selling version numbers 3 and 4. This example however works only with the older dll :?
Best Regards,

Gilbert Kuhnert
CTO Software GmbH
http://www.ctosoftware.de
User avatar
gkuhnert
Posts: 274
Joined: Fri Apr 04, 2008 1:25 pm
Location: Aachen - Germany // Kerkrade - Netherlands
Contact:

Re: How to access a scanner via TWAIN.

Post by gkuhnert »

I didn't find any licence information saying that the dll itself is free. Just found, that the class tscan.prg is free. Do you have a link that clearly states the dll as free? That would be really great :D
Best Regards,

Gilbert Kuhnert
CTO Software GmbH
http://www.ctosoftware.de
User avatar
gkuhnert
Posts: 274
Joined: Fri Apr 04, 2008 1:25 pm
Location: Aachen - Germany // Kerkrade - Netherlands
Contact:

Re: How to access a scanner via TWAIN.

Post by gkuhnert »

Great! Thank you so much 8)
Best Regards,

Gilbert Kuhnert
CTO Software GmbH
http://www.ctosoftware.de
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: How to access a scanner via TWAIN.

Post by Silvio.Falconi »

I used CLASS TSCAN32 by Rafa Carmona ( TheFull )
it use Easy TWAIN library (TWAIN.LIB) and EZTW32.dll

there is another method ?
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply