🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.databases.visual-dbase
Article #18

vdbase 5.5 and EZTWAIN

#18
From: Ruediger Spindler
Date: Sun, 21 Dec 1997 00:00
38 lines
2004 bytes
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: <349D0C91.9C60FFAB@on-line.de>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 105c7d,fa4c561804677629,start
X-Google-Attributes: gid105c7d,public
X-Google-Thread: 1162a5,fa4c561804677629,start
X-Google-Attributes: gid1162a5,public
From: Ruediger Spindler <spindler@on-line.de>
Subject: vdbase 5.5 and EZTWAIN
Date: 1997/12/21
Message-ID: <349D0C91.9C60FFAB@on-line.de>
X-Deja-AN: 309188596
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
Organization: iSC internet Service Center GmbH
MIME-Version: 1.0
Newsgroups: comp.databases.visual-dbase,borland.public.vdbase.programming