L_BarCodeParseECIData

Summary

Parses ECI barcode data.

Syntax

#include "ltbar.h"

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

Parameters

L_CHAR * pszBarCodeData

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.

Returns

Value Meaning
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

Platforms

Win32, x64, Linux.

See Also

Functions

Topics

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 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Barcode C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.