EzTwain Freeware

For everything that's not in any way related to PureBasic. General chat etc...
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5499
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

EzTwain Freeware

Post by Kwai chang caine »

Hello at all :D

Apparently the Frewware version of EzTwain not exist now :|
I don't know from which version this is the case ?
I have already found the freewares DLL v1.06, v1.12, v1.14, v1.15, v1.18, v1.19, v2.70 but not the users guides for this olds versions :|
If someone have one or several recents freeware version or olds userguides, or know how i can found, i would be interested to have it too :wink:
Because i have searched and there's not much about this subject except the official site, and apparently there are not archive page :|
Apparently It's since the v3 that this DLL is not freeware :|

Have a good day
Last edited by Kwai chang caine on Tue May 02, 2023 9:11 pm, edited 3 times in total.
ImageThe happiness is a road...
Not a destination
User avatar
jacdelad
Addict
Addict
Posts: 2029
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: EzTwain Freeware

Post by jacdelad »

I have a 32 bit version, but I don't know which version it is. How do I find out? I only have the plain dll and a *.pas-file with declarations for Delphi. The dll itself doesn't seem to contain version information.
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5499
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: EzTwain Freeware

Post by Kwai chang caine »

Thanks Jacdelad 8)

The more funny, it's the more difficult to obtain is the UserGuide :lol:
Because often, we copy the standalone DLL and not keep the other files

For have the version it's simple

Code: Select all

IdLibrairie = OpenLibrary(#PB_Any, "Eztw32.dll")

If IdLibrairie
 Debug CallFunction(IdLibrairie, "TWAIN_EasyVersion")
 CloseLibrary(IdLibrairie)
Else
 Debug "The DLL is not open" 
EndIf 
ImageThe happiness is a road...
Not a destination
User avatar
jacdelad
Addict
Addict
Posts: 2029
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: EzTwain Freeware

Post by jacdelad »

It doesn't work: "The DLL is not open"...
I can provide it to you regardless, but I guess it's either the wrong product or outdated anyway. BTW: It came with the package of XProfan X4a, the programming language I used before. The package contains a subfolder with said dll and an example program for XProfan. I never used the dll.
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Marc56us
Addict
Addict
Posts: 1600
Joined: Sat Feb 08, 2014 3:26 pm

Re: EzTwain Freeware

Post by Marc56us »

Hi KCC,

This DLL and PB Code Works (in PB 6.01 Windows x86)

:wink:
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5499
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: EzTwain Freeware

Post by Kwai chang caine »

Thanks my friend :wink:
Unfortunately your DLL is the v1.12 and i already have it :wink:
And apparently you have not keep the userGuide like all of us :lol:
Again thanks for your interest, have a good day
ImageThe happiness is a road...
Not a destination
wombats
Enthusiast
Enthusiast
Posts: 720
Joined: Thu Dec 29, 2011 5:03 pm

Re: EzTwain Freeware

Post by wombats »

If you download the source of EzTwain Classic, the source files are really well commented. I get the impression that they're the actual help because there's no other mention of a help file that I can see. I couldn't get it to download from http://www.eztwain.com/eztwain1.htm because the page just redirects, but it's on the Wayback Machine: https://web.archive.org/web/20111117045 ... twain1.htm.
infratec
Always Here
Always Here
Posts: 7662
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: EzTwain Freeware

Post by infratec »

Maybe it's time for a change ...

Opensource 32 and 64 bit, Apache 2.0 License:

https://github.com/dynarithmic/twain_li ... ree/master
infratec
Always Here
Always Here
Posts: 7662
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: EzTwain Freeware

Post by infratec »

First shot:

Code: Select all

;
; DTwain
;
; https://github.com/dynarithmic/twain_library/tree/master
;


CompilerIf #PB_Compiler_IsMainFile
  EnableExplicit
CompilerEndIf


DeclareModule DTwain
  
  #DTWAIN_BMP = 100
  
  
  
  #TWPT_RGB = 2
  
  #DTWAIN_USENATIVE = 1  
  #DTWAIN_USENAME = 4
 
  
  
  Prototype.l Prototype_DTWAIN_SysInitialize()
  Global SysInitialize.Prototype_DTWAIN_SysInitialize
  
  Prototype.l Prototype_DTWAIN_SelectSource()
  Global SelectSource.Prototype_DTWAIN_SelectSource
  
  
  Prototype.l Prototype_DTWAIN_AcquireFile(Source.l, lpszFile.p-unicode, lFileType.l , lFileFlags.l, PixelType.l, lMaxPages.l, bShowUI.l, bCloseSource.l, *pStatus.long)
  Global AcquireFile.Prototype_DTWAIN_AcquireFile
  
  Prototype.l Prototype_DTWAIN_SysDestroy()
  Global SysDestroy.Prototype_DTWAIN_SysDestroy
  
  Define Library.i
  
  Declare.i Open()
  Declare.i Close()
  
EndDeclareModule


Module DTwain
  
  Procedure.i Open()
    
    CompilerIf #PB_Compiler_32Bit
      Library = OpenLibrary(#PB_Any, "dtwain32u.dll")
    CompilerElse
      Library = OpenLibrary(#PB_Any, "dtwain64u.dll")
    CompilerEndIf
    If Library
      SysInitialize = GetFunction(Library, "DTWAIN_SysInitialize")
      SelectSource = GetFunction(Library, "DTWAIN_SelectSource")
      AcquireFile = GetFunction(Library, "DTWAIN_AcquireFile")
      SysDestroy = GetFunction(Library, "DTWAIN_SysDestroy")
    EndIf
    
    ProcedureReturn Library
    
  EndProcedure
  
  
  Procedure.i Close()
    
    If IsLibrary(Library)
      CloseLibrary(Library)
      Library = 0
    EndIf
    
  EndProcedure
  
EndModule



CompilerIf #PB_Compiler_IsMainFile
  
  
  Define Source.l, Status.l
  
  If DTwain::Open()
    Debug "Open"
    
    If DTwain::SysInitialize()
      Source = DTwain::SelectSource()
      If Source
        
        DTwain::AcquireFile(Source, "c:\\tmp\\test.bmp", DTwain::#DTWAIN_BMP, DTwain::#DTWAIN_USENATIVE|DTwain::#DTWAIN_USENAME, DTwain::#TWPT_RGB, 1, #True, #True, @Status)
        Debug "Status: " + Status
        
        DTwain::SysDestroy()
      EndIf
    EndIf
    
    DTwain::Close()
  EndIf
  
CompilerEndIf
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5499
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: EzTwain Freeware

Post by Kwai chang caine »

WOMBATS wrote:I couldn't get it to download from http://www.eztwain.com/eztwain1.htm because the page just redirects
Hello WOMBATS
Justly..it's here the probleme, surely the classic not exist now :|
it's on the Wayback Machine
Thanks for remember to me this impressive site :shock:
I always forget it, sometime there are a impressive things
Unfortunately, i have searched and only find the v1.15 i have already and no User_Guide :|
Thanks when even for your interest 8)
Infratec wrote:Maybe it's time for a change ...
Waoooouuhh !!! what a monstruous library :shock:
And she works nice here with my old scanner
I don't know how you do, for know as much things in as much subjects :wink:
Thanks a lot too for sharing your splendid module, it's a real help for begin to use this jewel 8)
ImageThe happiness is a road...
Not a destination
infratec
Always Here
Always Here
Posts: 7662
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: EzTwain Freeware

Post by infratec »

A bit more extended:
DTWAIN.zip
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5499
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: EzTwain Freeware

Post by Kwai chang caine »

Thanks MASTER for your extension 8)

AcquireFile => Apparently the #DTWAIN_BMP is missing
AcquireToClipboard => return status 0 and nothing is happening
AcquireNative => That scan.. but i don't know where the scan is
ImageThe happiness is a road...
Not a destination
infratec
Always Here
Always Here
Posts: 7662
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: EzTwain Freeware

Post by infratec »

Added a few functions to enumerate the avaiable sources.
Unfortunately I have no scanner to test more stuff.
My webcam is available as source, but I can not get a picture from it :cry:
infratec
Always Here
Always Here
Posts: 7662
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: EzTwain Freeware

Post by infratec »

It is #DTWAIN_FF_BMP.
I corrected the file.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5499
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: EzTwain Freeware

Post by Kwai chang caine »

Thanks INFRATEC

Code: Select all

DTwain::AcquireFile(Source, "X:\\A\\Q\\B\\Test.bmp", DTWAIN::#DTWAIN_FF_BMP, DTWAIN::#DTWAIN_USENATIVE|DTwain::#DTWAIN_USENAME, DTWAIN::#TWPT_RGB, 1, #True, #True, @Status)
Strange, nothin happening too :|
ImageThe happiness is a road...
Not a destination
Post Reply