L_BarCodeAAMVAIDBuilderInit

#include "ltbar.h"

L_LTBAR_API L_INT L_BarCodeAAMVAIDBuilderInit(pBuilder)

Parameters

AAMVAIDBUILDER *pBuilder

Pointer to an AAMVAIDBUILDER object.

Returns

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

Comments

This function initializes the AAMVAIDBUILDER structure at pBuilder. This process allocates the initial memory for the AAMVAID object AAMVAIDBUILDER.OutputID inside pBuilder. AAMVAIDBUILDER.OutputID should be freed by the user after it is no longer needed using L_BarCodeFreeAAMVAID.

L_BarCodeAAMVAIDBuilderInit must be called before calling any of L_BarCodeAAMVAIDBuilderSetXXX functions.

Required DLLs and Libraries

Platforms

Win32, x64, Linux.

See Also

Functions

Example

AAMVAIDBUILDER* pBuilder; 
L_INT nRet = L_BarCodeAAMVAIDBuilderInit(pBuilder); 
if(nRet != SUCCESS) return; 
 
nRet = L_BarCodeAAMVAIDBuilderSetJurisdiction(pBuilder, L_AAMVA_JURISDICTION_NORTH_CAROLINA, NULL); 
if(nRet != SUCCESS) return; 
 
nRet = L_BarCodeAAMVAIDBuilderSetJurisdictionVersion(pBuilder, &"00"); 
if(nRet != SUCCESS) return; 
 
nRet = L_BarCodeAAMVAIDBuilderSetVersion(pBuilder, L_AAMVA_VERSION_2016); 
if(nRet != SUCCESS) return; 
 
nRet = L_BarCodeAAMVAIDBuilderNumberOfEntries(pBuilder, 1); 
if(nRet != SUCCESS) return; 
 
nRet = L_BarCodeAAMVAIDBuilderSetSubfileType(pBuilder, 0, L_AAMVA_SUBFILE_TYPE_DL, NULL); 
if(nRet != SUCCESS) return; 
 
//Add all required data elements per AAMVA CDS 
//Use L_BarCodeAAMVAIDLookup* functions for data element values of enumerated D20 types 
nRet = L_BarCodeAAMVAIDBuilderAddDataElementToSubfile(pBuilder, 0, &"DAC", &"MICHAEL", 7); 
if(nRet != SUCCESS) return; 
 
L_CHAR* pszRaceEthnicityCode = NULL; 
nRet = L_BarCodeAAMVAIDLookupRaceEthnicity(L_AAMVA_RACE_ETHNICITY_WHITE, &pszRaceEthnicityCode); 
if(nRet != SUCCESS) return; 
nRet = L_BarCodeAAMVAIDBuilderAddDataElementToSubfile(pBuilder, 0, &"DCL", pszRaceEthnicityCode, strlen(pszRaceEthnicityCode)); 
if(nRet != SUCCESS) return; 
 
//... 
//... 
//... 
 
nRet = L_BarCodeAAMVAIDBuilderBuild(pBuilder); 
if(nRet != SUCCESS) return; 
//Valid AAMVAID is now in pBuilder->OutputID 
 
L_CHAR* data = NULL; 
L_INT dataLength; 
nRet = L_BarCodeWriteAAMVAData(pBuilder->OutputID, &data, &dataLength); 
 
//Valid AAMVA ID data is now in data variable 
 
//Free resources... 
Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Barcode C API Help