bardecode.com
barcode reading software
  • Home
  • Download
  • Purchase
  • SDK Licensing
  • Pricing
    • Windows SDK Price List
    • Windows SDK with PDF Extension Price List
    • Linux SDK Price List
    • Linux SDK with PDF Extension Price List
    • PDF Extension For Windows Price List
    • Multi-Platform Toolkit for .NET Price List
    • BardecodeFiler Desktop Only Price List
    • BardecodeFiler Windows Service Price List
    • DOS Command Prompt Barcode Tool Price List
    • Terms and Conditions
    • Refund Policy
  • Products
    • Softek Barcode Reader Toolkit for Windows
    • Softek Barcode Reader Toolkit for Linux
    • BardecodeFiler Desktop App
    • BardecodeFiler Windows Service
    • Windows DOS Command Prompt Tool
    • Multi-platform barcode reader toolkit for .NET
    • Aquaforest’s Autobahn DX
  • Knowledge Base
    • Documentation
    • Specifications
  • News
  • Contact
    • About Us
    • Terms and Conditions
    • Resellers
    • Links
Select Page ...

News

Using the Multi-Threaded set of dll functions

admin November 27, 2012 Software Development Kits No Comments

The SoftekBarcode.dll includes a set of functions suitable for use in multi-threaded applications. The multi-threaded functions all require a handle to the toolkit. This is created using the mtCreateBarcodeSession function and released using the mtDestroyBarcodeSession function:

hBarcode = mtCreateBarcodeInstance()
nBarcodes = mtScanBarCode(hBarcode, “input.tif”)
…process the result in some way
mtDestroyBarcodeInstance(hBarcode)

 

All the multi-threaded functions begin with “mt” and exactly mirror the “st” set of functions. For example, the function stSetReadCode39(bool value) can be used to control whether the sdk reads Code 39 barcodes, and the multi-threaded version is mtSetReadCode39(handle hBarcode, bool value). Similarly, the function stScanBarCode(string filePath) is used to scan an image file for a barcode, and the multi-threaded version is mtScanBarCode(handle hBarcode, bool value).

CreateBarcodeInstance

 

Syntax

mtCreateBarcodeInstance()

Return Value

Handle to an instance of the barcode toolkit (dll only).

Remarks

CreateBarcodeInstance creates an instance of the barcode toolkit and returns a handle that may be used with other functions in the win32 dll interface. Please note that this function is not applicable to other interfaces for the toolkit. This function only exists in the dll interface to the SDK.

Example:

Dim hBarcode As System.IntPtr
hBarcode = mtCreateBarcodeInstance()
mtSetReadCode39(hBarcode,  True)

Win32 dll declarations:

VB.Net:

Private Declare Function mtCreateBarcodeInstance Lib “Softekbarcode” () As System.IntPtr
Visual C++:

 

extern “C” {
HANDLE __stdcall mtCreateBarcodeInstance() ;

}

 

 

 

 

 

 

DestroyBarcodeInstance

Syntax

mtDestroyBarcodeInstance(hBarcode)

Parameters

hBarcode Handle to an instance of the barcode toolkit.

Return Value

1/True on success and 0/False on failure.

Remarks

DestroyBarcodeInstance destroys an instance of the barcode toolkit and releases any resources used by the toolkit. This function only exists in the dll interface to the SDK.

Example:

Dim hBarcode As System.IntPtr
hBarcode = mtCreateBarcodeInstance()
mtDestroyBarcodeInstance(hBarcode)

Win32 dll declarations:

VB.Net:

Private Declare Function mtDestroyBarcodeInstance Lib “Softekbarcode” (ByVal hBarcode As System.IntPtr) As Short
Visual C++:

 

extern “C” {
short __stdcall mtDestroyBarcodeInstance(HANDLE hBarcode) ;

}

← IOS 4.1 code detail
Image resolution and barcode reading →
admin

  • Copyright © 2023 Softek Software Ltd. All Rights Reserved