#include "ltbar.h"

L_LTBAR_API L_INT L_BarCodeAAMVAIDLastName(pId, pszLastName, bInferredFromFullName)

Gets the cardholder's last name.


const AAMVAID * pId

Pointer to the AAMVAID from which the last name will be retrieved.

L_CHAR ** pszLastName

Pointer to a character string to be updated with the cardholder's last name.

L_BOOL * bInferredFromFullName

Pointer a variable to be updated with the value indicating whether the last name was inferred from a full name data element (typically DAA), or taken from a last name only data element (typically DAC).
Results inferred from the DAA element are less reliable.
Possible values are:

Value Meaning
L_TRUE The last name was inferred from a full name data element (typically DAA).
L_FALSE The last name was taken from a last name only data element (typically DAC).


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


Card issuing authorities are using older AAMVA CDS versions that is using the DAA data element to encode full names.

The CDS, at the time, did not clearly define a formatting standard for this data element. Therefore, state DMVs improvised and ended up using varying formatting. Examples:

L_BarCodeAAMVAIDLastName will retrieve the cardholder's last name from the DAA data element's value, only if a DAA data element is available in all of the AAMVAID's subfiles. The bInferredFromFullName will be L_TRUE in these cases.

Due to uncertainty in DMV formatting along with individuals with mononyms, multiple surnames (Spanish naming customs), and multiple given names, the resulting name is not guaranteed to be accurate in all cases, but only when inferring from the full name, the resulting name is only a best guess.

For IDs conforming to newer versions of the AAMVA CDS, this function will provide preference to the newer and more reliable last name data elements, and bInferredFromFullName will be set to L_FALSE. In these cases, the resulting name is guaranteed to be accurate.

Required DLLs and Libraries


Win32, x64, Linux.

Help Version 21.0.2021.4.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.