Article View: comp.databases.visual-dbase
Article #15Re: vdbase 5.5 and EZTWAIN
From: Ruediger Spindler
Date: Thu, 25 Dec 1997 00:00
Date: Thu, 25 Dec 1997 00:00
50 lines
2648 bytes
2648 bytes
Thanks for all hints... finally I fixed the problem: it wasn't within my code but is a small bug within the EZTWAIN.DLL library where the function TWAIN_AcquireToFilename has a wrong definition using a NEAR pointer to the string instead of using a FAR pointer. I hope, spike will fix it for the next release... This bug is only in this one routine so I worked around it by using lower level functions which are working perfectly alright. so merry x-mas to all Ruediger Ruediger Spindler wrote: > Hello all vdbase programmers, > I try to access a TWAIN-compatible scanner from vdbase 5.5, using the > EXTERNal DLL EZTWAIN 1.06 and 1.07, but getting problems by passing > the filename to one of it's functions. All other functions are working > well. > The code I tried: > > ******************************************************************************* > > EXTERN CINT TWAIN_AcquireToFilename( CHANDLE, CSTRING ) EZTWAIN.DLL > EXTERN CINT MessageBox( CHANDLE, CSTRING, CSTRING, CWORD) USER.EXE > > tempfile = "SCANTEMP.BMP" > MessageBox( 0, "This file will be created", tempfile, 0 ) > scanres = TWAIN_AcquireToFilename( 0, tempfile ) > if scanres > 0 && (will always fail > with -2 = illegal filename) > ******************************************************************************* > > Visual dBASE uses: > - pascal calling convention > - 16bit DLLs only > - CHANDLE = 16bit WORD > - CSTRING = zero terminated char far * > So everything should be OK... > > The problem on this: > The external Windows DLL-Func "MessageBox" works OK, but the EZTWAIN > DLL-Func "TWAIN_AcquireToFileName" seems to misunderstand the filename > and uses garbage-strings (or NULL or empty) instead and so fails to > create the file... > > Has anyone experiences with EZTWAIN.DLL and vdbase and could me give > some hints > how to get this working??? > Thanks in advance > Ruediger Spindler
Technical Details
Message-ID:
<34A23661.E4361E39@on-line.de>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<349D0C91.9C60FFAB@on-line.de>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 105c7d,fa4c561804677629 X-Google-Attributes: gid105c7d,public X-Google-Thread: 1162a5,fa4c561804677629 X-Google-Attributes: gid1162a5,public From: Ruediger Spindler <spindler@on-line.de> Subject: Re: vdbase 5.5 and EZTWAIN Date: 1997/12/25 Message-ID: <34A23661.E4361E39@on-line.de> X-Deja-AN: 310122747 Content-Transfer-Encoding: 7bit References: <349D0C91.9C60FFAB@on-line.de> MIME-Version: 1.0 To: spike_mclarty@logitech.com Content-Type: text/plain; charset=us-ascii Organization: iSC internet Service Center GmbH Newsgroups: comp.databases.visual-dbase,borland.public.vdbase.programming