Overview
ScanBarCode(file)
Scan the specified TIF, BMP or JPEG file for bar code strings and return the number of bar codes found in the file. The following formats are supported:
- TIF - color files should be uncompressed.
- BMP - color (24 bit only) and monochrome, single plane.
- JPEG - color and monochrome
If the returned value is less than 0 then an error has occurred:
| Value | Comment |
|---|---|
| -1 | Error opening file |
| -2 | File is Multi Plane |
| -3 | Invalid number of bits per sample |
| -4 | Memory allocation error |
| -5 | Invalid TIF photometric value |
| -6, -7 or -8 | The trial period on a demo version has either expired or this trial version is no longer valid for installation. |
n is the index to the barcode string to be retrieved and is indexed from 1.
The following strings can be returned for patch codes - "Type I", "Type II", "Type III", "Type IV", "Type VI" and "Type T".
Visual Basic using the OCX
count = [form.]SoftekBarcode.ScanBarCode(file)
Visual Basic using the DLL
Private Declare Function stScanBarCode Lib "SoftekBarcode" (ByVal strFile As String) As Integer
count = stScanBarCode(file)
Visual Basic using COM
oBar = CreateObject("SoftekATL.Barcode")
.........
oBar.ScanBarCode(file)
count = oBar.BarCodeCount
VB.Net using the DLL
Private Declare Function stScanBarCode Lib "SoftekBarcode" (ByVal strFile As String) As Short
count = stScanBarCode(file)
VB.Net using the SoftekBarcode Wrapper Class
Dim barcode As SoftekBarcode
..........
count = barcode.ScanBarCode(file)
VB.Net using the SoftekBarcodeLib Managed Component
Dim barcode As SoftekBarcodeLib.BarcodeReader
..........
barcode = New SoftekBarcodeLib.BarcodeReader()
..........
barcode.ScanBarCode(file)
Visual C++ Using the OCX
short ScanBarCode(file)
Visual C++ Using the DLL
short __stdcall stScanBarCode(LPCTSTR file);



