How to access a scanner via TWAIN.

byron.hopp
Posts: 254
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA
Contact:

How to access a scanner via TWAIN.

Post by byron.hopp »

Anybody have any recommendations for accessing a scanner via TWAIN with FiveWin?
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
Posts: 254
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA
Contact:

Re: How to access a scanner via TWAIN.

Post by byron.hopp »

Thank you, any examples in FiveWin?
Thanks,
Byron Hopp
Matrix Computer Services
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 »

Code: Select all

    IF TWAIN_ISAVAILABLE() = 0
        ? "Twain not available"
        RETURN NIL
    ENDIF

    IF TWAIN_ACQUIRETOFILENAME( 0, cBmp ) != 0
        ? "Error while scanning"
        RETURN NIL
    ENDIF

    IF !SAVEIMG( cBmp, cJpg, 2, 80 )
        ? "Error while converting to BMP"
        RETURN NIL
    ENDIF


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

DLL STATIC FUNCTION TWAIN_ISAVAILABLE() AS LONG;
    PASCAL FROM "TWAIN_IsAvailable" LIB "eztw32.dll"
EMG
postinelli
Posts: 128
Joined: Tue Jul 15, 2008 7:12 pm
Location: Argentina

Re: How to access a scanner via TWAIN.

Post by postinelli »

Search TScan32 by Rafa Carmona
byron.hopp
Posts: 254
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA
Contact:

Re: How to access a scanner via TWAIN.

Post by byron.hopp »

Is there a lib that works with xHarbour?
Thanks,
Byron Hopp
Matrix Computer Services
postinelli
Posts: 128
Joined: Tue Jul 15, 2008 7:12 pm
Location: Argentina

Re: How to access a scanner via TWAIN.

Post by postinelli »

postinelli
Posts: 128
Joined: Tue Jul 15, 2008 7:12 pm
Location: Argentina

Re: How to access a scanner via TWAIN.

Post by postinelli »

i´m using with

Fwh 1101
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6717)

works fine

http://www.fivetechsoft.com/files/utilities/tscan32.zip
byron.hopp
Posts: 254
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA
Contact:

Re: How to access a scanner via TWAIN.

Post by byron.hopp »

Rapidshare:

The following download is not available:
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
Posts: 254
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA
Contact:

Re: How to access a scanner via TWAIN.

Post by byron.hopp »

Yes I made a quick attempt, but I could not get it to link.

Where do I find SaveImg(), is this Harbour, Fivewin, or from the DLL.
If it is from the DLL do I need to create a declare statement for it as well.

My xHarbour is kind of old: (like me)
xHarbour Compiler build 0.99.61 (SimpLex)

My FiveWin:
7.01
Thanks,
Byron Hopp
Matrix Computer Services
postinelli
Posts: 128
Joined: Tue Jul 15, 2008 7:12 pm
Location: Argentina

Re: How to access a scanner via TWAIN.

Post by postinelli »

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 »

byron.hopp wrote:Yes I made a quick attempt, but I could not get it to link.

Where do I find SaveImg(), is this Harbour, Fivewin, or from the DLL.
If it is from the DLL do I need to create a declare statement for it as well.

My xHarbour is kind of old: (like me)
xHarbour Compiler build 0.99.61 (SimpLex)

My FiveWin:
7.01
Please try without SaveImg(). If you are really interested I will post the function here.

EMG
byron.hopp
Posts: 254
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA
Contact:

Re: How to access a scanner via TWAIN.

Post by byron.hopp »

Works without SaveImg().
Is there more functionality of the EzTw32.dll.
Like x and y resolution and so one.
do you possibility have a prg with all of the "DLL Static Function" declare statements?
It seems there should be a way to hide the UI of the twain provider, and set the resolution.

No matter what, it works, thanks...
Thanks,
Byron Hopp
Matrix Computer Services
Gale FORd
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston
Contact:

Re: How to access a scanner via TWAIN.

Post by Gale FORd »

You might try this example application.
You might need to create your own import .lib
http://code.google.com/p/fivewin-contri ... p&can=2&q=
Post Reply