Overview
ScanBarCodeFromBitmap(hBitmap)
Scan the specified device dependent bitmap for bar code strings and return the number of bar codes found. The image must be single plane. Note that hBitmap is a HANDLE to a BITMAP, not the address of a BITMAP structure.
The managed component supports 2 forms of this function:
ScanBarCodeFromBitmap(IntPtr hBitmap)
ScanBarCodeFromBitmap(System.Drawing.Bitmap bitmap) (Managed Component Only)
Scan the specified managed bitmap object for bar code strings and return the number of bar codes found.
If the returned value is less than 0 then an error has occurred:
| Value | Comment |
|---|---|
| -1 | N/A |
| -2 | Bitmap file is Multi Plane |
| -3 | N/A |
| -4 | N/A |
| -5 | N/A |
| -6, -7 or -8 | The trial period on a demo version has either expired or this trial version is no longer valid for installation. |
See also ScanBarcodeFromDIB
Visual Basic using the OCX
count = [form.]SoftekBarcode.ScanBarCodeFromBitmap(hBitmap)
Visual Basic using the DLL
Private Declare Function stScanBarCodeFromBitmap Lib "SoftekBarcode" (ByVal hBitmap As Long) As Integer
count = stScanBarCodeFromBitmap(hBitmap)
Visual Basic using COM
Not yet supported in this interface.
VB.Net using the DLL
Private Declare Function stScanBarCodeFromBitmap Lib "SoftekBarcode" (ByVal hBitmap As IntPtr) As Short
count = stScanBarCodeFromBitmap(hBitmap)
VB.Net using the SoftekBarcode Wrapper Class
Dim barcode As SoftekBarcode
..........
count = barcode.ScanBarCodeFromBitmap(hBitmap)
VB.Net using the SoftekBarcodeLib Managed Component
Dim barcode As SoftekBarcodeLib.BarcodeReader
....
nBarCode = barcode.ScanBarCodeFromBitmap(Me.PictureBox1.Image)
or
nBarCode = barcode.ScanBarCodeFromBitmap(hBitmap)
Visual C++ Using the OCX
short ScanBarCodeFromBitmap(long hBitmap)
Visual C++ Using the DLL
short __stdcall stScanBarCodeFromBitmap(long hBitmap);



