1

I have iBall A3 image scanner, and I want to scan an image using a VB6.0 application.

Does anybody know about this type of application?

Deanna
  • 23,876
  • 7
  • 71
  • 156
bharath
  • 33
  • 2
  • 6

2 Answers2

2

Because VB6 does not include a native scanner library, some sort of third-party DLL is required for scanner access. A popular choice is the free, public-domain EZTW32 library. There are others, search for TWAIN, which is the name of the underlaying Windows API that provides access to the scanner driver.

EZTW32 library provides many ways of interacting with the scanner, the following is an example on how to import the library functions:

Private Declare Function TWAIN_IsAvailable Lib "EZTW32.dll" () As Long
Private Declare Function TWAIN_SelectImageSource Lib "EZTW32.dll" (ByVal hwndApp As Long) As Long
Private Declare Function TWAIN_AcquireToFilename Lib "EZTW32.dll" (ByVal hwndApp As Long, _
 ByVal sFile As String) As Long

I recommend you to follow the instructions on their site to fit your needs. This post has more examples and info.

istepaniuk
  • 4,016
  • 2
  • 32
  • 60
  • I used this DLL but am getting error when this line ' ScannerCaptureFile = ProgramPath & "VBScanInterface.bmp" ' is executing and error is TWAIN Error Unable to open default Data Source. Source Manager operation failed RC: TWRC_FAILURE CC: TWCC_NODS (No Data Source) – bharath Mar 27 '13 at 11:16
  • Check that your scanner setup does work with some other application that uses TWAIN (and not WIA). AFAIK, a "data source" in TWAIN parlance is actually the scanner itself. "No Data Source" makes me think there are no TWAIN scanners in your system. – istepaniuk Mar 27 '13 at 11:34
2

VB6 doesn't need a "native scanner library" because modern versions of Windows have one built in.

TWAIN is still used but is very long in the tooth and many modern scanners don't come with TWAIN drivers anyway.

Take a look at VB6 - WIA Scanning Demo.

Bob77
  • 13,167
  • 1
  • 29
  • 37