L_BarCodeInit

#include "ltbar.h"

L_INT EXT_FUNCTION L_BarCodeInit(nMajorType)

L_INT nMajorType;

/* Barcode major type */

Initializes the barcode engine and loads the required DLL's for Barcode operations into memory.

Parameter

Description

nMajorType

Barcode major type. Values can be combined, when appropriate, by using a bitwise OR ( | ). Possible values are:

 

Value

Meaning

 

BARCODES_1D

[0x001] initialize the linear barcode operations.

 

BARCODES_PDF_READ

[0x008] initialize the PDF barcode read operations.

 

BARCODES_PDF_WRITE

[0x010] initialize the PDF barcode write operations.

 

BARCODES_DATAMATRIX_READ

[0x020] initialize the Data Matrix barcode read operations.

 

BARCODES_DATAMATRIX_WRITE

[0x040] initialize the Data Matrix barcode write operations.

 

BARCODES_QR_READ

[0x080] initialize the QR barcode read operations

 

BARCODES_QR_WRITE

[0x100] initialize the QR barcode write operations

 

 

 

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function initializes the LEADTOOLS Barcode DLL's. Also, this function will load the required DLLs for Barcode operations into memory. This function must be called before calling any other Barcode functions. If L_BarCodeInit is called in an application, L_BarCodeExit must be called before terminating the application.

Required DLLs and Libraries

LTBAR

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions:

L_BarCodeExit, L_BarCodeRead, L_BarCodeWriteExt, L_BarCodeFree, L_BarCodeIsDuplicated, L_BarCodeGetDuplicated, L_BarCodeGetFirstDuplicated, L_BarCodeGetNextDuplicated, L_BarCodeVersionInfo, L_BarCodeWriteExt2

Topics:

Programming with LEADTOOLS Barcode

BarCode API Function Groups

Example

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
{
   MSG   msg ;
   .
   .
   .
   /* Initialize the engine for Linear barcode operations, Data Matrix Read operations, and PDF Read operations */
   L_BarCodeInit (BARCODES_1D | BARCODES_DATAMATRIX_READ | BARCODES_PDF_READ);
   .
   .
   .
   while (GetMessage(&msg, NULL, 0, 0))
   {
      TranslateMessage(&msg) ;
      DispatchMessage(&msg) ;
   }
   .
   .
   .
   /* Close and free Bar Code DLLs */
   L_BarCodeExit ();
   return(msg.wParam);
}