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

Code snippets for Visual C++

admin November 23, 2012 Knowledge Base, Software Development Kits No Comments

This article shows 2 simple visual c++ code snippets that use either the standard windows dll or the com object for the toolkit.

Standard Windows DLL

hBarcode = mtCreateBarcodeInstance() ;

 

//Set properties

mtSetReadCode128 (hBarcode, 1) ;

//Read barcodes
int nBarCodes = mtScanBarCode(hBarcode, m_ImageFile) ;

//Get results
for (int i = 1; i <= nBarCodes; i++)
CString strBarCode = mtGetBarString(hBarcode, i) ;

mtDestroyBarcodeInstance(hBarcode) ;

 

ActiveX/OCX Interface

//Set properties
m_barcode.SetReadCode128 (1) ;

//Read barcodes
int nBarCodes = m_barcode.ScanBarCode(m_ImageFile) ;

//Get results
for (int i = 1; i <= nBarCodes; i++)
CString strBarCode = m_barcode.GetBarString(i) ;

← Code snippets for VB.net
Barcode Gallery →
admin

  • Copyright © 2023 Softek Software Ltd. All Rights Reserved