Page 1 of 2

EzTwain Freeware

Posted: Sun Apr 30, 2023 10:44 am
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

Re: EzTwain Freeware

Posted: Tue May 02, 2023 5:56 pm
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.

Re: EzTwain Freeware

Posted: Tue May 02, 2023 8:11 pm
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 

Re: EzTwain Freeware

Posted: Tue May 02, 2023 8:19 pm
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.

Re: EzTwain Freeware

Posted: Tue May 02, 2023 8:48 pm
by Marc56us
Hi KCC,

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

:wink:

Re: EzTwain Freeware

Posted: Tue May 02, 2023 8:56 pm
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

Re: EzTwain Freeware

Posted: Fri May 05, 2023 11:10 am
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.

Re: EzTwain Freeware

Posted: Fri May 05, 2023 11:38 am
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

Re: EzTwain Freeware

Posted: Fri May 05, 2023 12:37 pm
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

Re: EzTwain Freeware

Posted: Fri May 05, 2023 6:43 pm
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)

Re: EzTwain Freeware

Posted: Fri May 05, 2023 7:53 pm
by infratec
A bit more extended:
DTWAIN.zip

Re: EzTwain Freeware

Posted: Fri May 05, 2023 8:16 pm
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

Re: EzTwain Freeware

Posted: Fri May 05, 2023 8:26 pm
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:

Re: EzTwain Freeware

Posted: Fri May 05, 2023 8:29 pm
by infratec
It is #DTWAIN_FF_BMP.
I corrected the file.

Re: EzTwain Freeware

Posted: Fri May 05, 2023 8:38 pm
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 :|