L_BarCodeParseECIData

#include "ltbar.h"

L_LTBAR_API L_INT L_BarCodeParseECIData(pszBarCodeData, nDataLength, pszECIData, nECIDataLength)

L_CHAR * pszBarCodeData;

pointer to the barcode data string

L_INT nDataLength;

barcode data size

L_CHAR ** pszECIData;

pointer to string buffer to be updated with the ECI data

L_INT * nECIDataLength;

ECI data size

Parses ECI barcode data.

Parameter

Description

pszBarCodeData Barcode data string.
nDataLength Barcode data size.
pszECIData Pointer to string buffer to be updated with the ECI data.
nECIDataLength ECI data size.

Returns

SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

The parsed ECI data is UTF8 encoding, or NULL if the input data is not ECI.

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.

Platforms

Win32, x64, Linux.

See Also
Functions: L_BarCodeRead, L_BarCodeReadExt, L_BarCodeFree, L_BarCodeIsDuplicated, L_BarCodeGetDuplicated, L_BarCodeGetNextDuplicated, L_BarCodeVersionInfo, L_BarCodeGetFirstDuplicated
Topics: Programming with LEADTOOLS Barcode
BarCode C API Function Groups

Example

For complete sample code refer to MFCBar32 demo.

L_INT BarCodeParseECIDataExample(HWND hWnd, pBARCODEDATA pBarCodeData) 
{ 
   L_WCHAR szBuffer[256]; 
   L_CHAR* pszECIData = NULL; 
   L_INT nLength = 0; 
 
   if (!pBarCodeData)  
      return FAILURE; 
 
   // Parse Barcode ECI data 
   L_INT nRet = L_BarCodeParseECIData(pBarCodeData->pszBarCodeData, pBarCodeData->nSizeofBarCodeData, &pszECIData, &nLength); 
   if(nRet == SUCCESS && pszECIData != NULL) 
   { 
      if(MultiByteToWideChar(CP_UTF8, 0, pszECIData, nLength, szBuffer, 256)) 
      { 
         MessageBox(hWnd, szBuffer, L_TEXT("ECI Data"), MB_OK); 
      } 
      else 
      { 
         nRet = FAILURE; 
      } 
 
      GlobalFreePtr(pszECIData); 
   } 
 
   return nRet; 
} 

Help Version 20.0.2018.1.19
Products | Support | Contact Us | Copyright Notices
© 1991-2018 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Barcode C API Help