How to access a scanner via TWAIN.

How to access a scanner via TWAIN.

Postby byron.hopp » Mon May 21, 2012 5:05 am

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


Re: How to access a scanner via TWAIN.

Postby byron.hopp » Mon May 21, 2012 10:05 am

Thank you, any examples in FiveWin?
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
 
Posts: 347
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA

Re: How to access a scanner via TWAIN.

Postby Enrico Maria Giordano » Mon May 21, 2012 1:01 pm

Code: Select all  Expand view
   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
User avatar
Enrico Maria Giordano
 
Posts: 8307
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to access a scanner via TWAIN.

Postby postinelli » Wed May 23, 2012 12:36 pm

Search TScan32 by Rafa Carmona
postinelli
 
Posts: 147
Joined: Tue Jul 15, 2008 7:12 pm
Location: Argentina

Re: How to access a scanner via TWAIN.

Postby byron.hopp » Wed May 23, 2012 2:20 pm

Is there a lib that works with xHarbour?
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
 
Posts: 347
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA

Re: How to access a scanner via TWAIN.

Postby postinelli » Wed May 23, 2012 2:31 pm

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

Re: How to access a scanner via TWAIN.

Postby postinelli » Wed May 23, 2012 2:35 pm

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
postinelli
 
Posts: 147
Joined: Tue Jul 15, 2008 7:12 pm
Location: Argentina

Re: How to access a scanner via TWAIN.

Postby byron.hopp » Wed May 23, 2012 2:36 pm

Rapidshare:

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


Re: How to access a scanner via TWAIN.

Postby byron.hopp » Wed May 23, 2012 3:04 pm

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
byron.hopp
 
Posts: 347
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA

Re: How to access a scanner via TWAIN.

Postby postinelli » Wed May 23, 2012 4:46 pm

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

Re: How to access a scanner via TWAIN.

Postby Enrico Maria Giordano » Wed May 23, 2012 5:40 pm

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
User avatar
Enrico Maria Giordano
 
Posts: 8307
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to access a scanner via TWAIN.

Postby byron.hopp » Wed May 23, 2012 8:45 pm

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
byron.hopp
 
Posts: 347
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA

Re: How to access a scanner via TWAIN.

Postby Gale FORd » Wed May 23, 2012 8:49 pm

You might try this example application.
You might need to create your own import .lib
http://code.google.com/p/fivewin-contributions/downloads/detail?name=testscancomplete.zip&can=2&q=
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 11 guests