Skip to content
GBG Documents & Biometrics Documentation

CBarCode library

Returns the Address value in string format (read-only)

Syntax

Address As String

Parameters

None

Return Values

Returns the Address value

Returns the City value in string format (read-only)

Syntax

City As String

Parameters

None

Return Values

Returns the City value

Returns the Class value in string format (read-only)

Syntax

Class As String

Parameters

None

Return Values

Returns the Class value

Returns the Data1D value in string format (read-only)

Syntax

Data1D As String

Parameters

None

Return Values

Returns the Data1D value

Returns the DateOfBirth in string format (read-only)

Syntax

DateOfBirth As String

Parameters

None

Return Values

Returns the DateOfBirth value

Returns the ExpirationDate value in string format (read-only)

Syntax

ExpirationDate As String

Parameters

None

Return Values

Returns the ExpirationDate value

Returns the Address2 value in string format (read-only)

Syntax

Address2 As String

Parameters

None

Return Values

Returns the Address2 value

Returns the City2 value in string format (read-only)

Syntax

City2 As String

Parameters

None

Return Values

Returns the City2 value

Returns the State2 value in string format (read-only)

Syntax

State2 As String

Parameters

None

Return Values

Returns the State2 value

Returns the Zip2 value in string format (read-only)

Syntax

Zip2 As String

Parameters

None

Return Values

Returns the Zip2 value

Returns the extracted text data in one bulk as detected by the barcode analyzer. The data is returned “as is” with no parsing or additional processing. This function is useful for retrieving data from general purpose barcode images.

Syntax

GetRawData(sBufData As String) As Long

Parameters

Parameter Description
[in] sBufData A string that contains the returned value

Return Values

None

The AAMVA National standard defines 51-field types that might be encoded in the PDF417 barcode image. Each one of the fields may be retrieved from the image using the field index specified in GetImageBufferDataDirect. If the field is populated, its value is retrieved and copied to Value. If the field is empty (or not implemented on the image), the Value parameter is set to an empty string. The maximum field size may be up to 60 characters long.

Note that the fields are populated differently in different states. For example, the field NAME is populated in field index BCF_NAME for an Alabama driver license, and the same field is populated in field index BCF_DRIVER_LAST_NAME for a Delaware driver license. The raw field ranges from BCF_NAME (0) to BCF_AKA_PREFIX (50).

In addition to the raw fields, the CBarCode offers an additional set of fields (ranging from BCF_EMUL_FULL_NAME to BCF_EMUL_SSN). These fields are generated after the raw fields are loaded. The fields uniform the data extraction by copying the data from the raw fields and diverting it while considering its originated state type. This removes the burden from the developer of knowing the state type and the way the data is handled in this particular state.

Syntax

GetRawField(Index As Long, Value As String) As Long

Parameters

Parameter Description
[in] Index An Integer that contains the value of the requested field
[out] Value A String that contains the returned value indicated by Index

Return Values

Value Description
BC_ERR_NONE Function succeeded
BC_ERR_BAD_PARAM Function failed; value passed by Index is not a valid field index

Initializes the CBarCode library

Note: This function must be called before calling any other function in the library.

Syntax

InitLibrary(license As String) As Long

Parameters

Parameter Description
[in] License Null-terminated string that holds the license key value

Return Values

Value Description
LICENSE_VALID License is valid and library is ready to use
LICENSE_INVALID License invalid; all scanner operations disabled
LICENSE_EXPIRED License expired; all scanner operations disabled
LICENSE_DOES_NOT_MATCH_LIBRARY License invalid for this library; all library operations disabled
GENERAL_ERR_PLUG_NOT_FOUND Returned if the attached scanner is not one of the following: ScanShell 600 | ScanShell 800XX | ScanShell 1000 | ScanShell 2000XX | ScanShell 4000 | ScanShell 5000
SLIB_LIBRARY_ALREADY_INITIALIZED Library already loaded; ignores InitLibrary function call

Returns the IssueDate in string format (read-only)

Syntax

IssueDate As String

Parameters

None

Return Values

Returns the IssueDate value

Returns the License in string format (read-only)

Syntax

license As String

Parameters

None

Return Values

Returns the license value

Returns the Name in string format (read-only)

Syntax

Name As String

Parameters

None

Return Values

Returns the Name value

Returns the NameFirst in string format (read-only)

Syntax

NameFirst As String

Parameters

None

Return Values

Returns the NameFirst value

Returns the NameLast in string format (read-only)

Syntax

NameLast As String

Parameters

None

Return Values

Returns the NameLast value

Returns the NameMiddle in string format (read-only)

Syntax

NameMiddle As String

Parameters

None

Return Values

Returns the NameMiddle value

Returns the NameSuffix in string format (read-only)

Syntax

NameSuffix As String

Parameters

None

Return Values

Returns the NameSuffix value

Detects the data encapsulated in the 1D barcode. The function decodes the barcode and stores the data in the Data1D property. If the function failed to process the barcode, the content of the Data1D property is set to an empty string.

Syntax

Proc1DImage(ImageFile As String) As Long

Parameters

Parameter Description
ImageFile Empty string (Reserved)

Return Values

Value Description
LICENSE_INVALID Library not initialized with proper license
SLIB_ERR_SCANNER_NOT_FOUND No attached scanner found
SLIB_ERR_INVALID_SCANNER No scanner attached to the PC
INVALID_INTERNAL_IMAGE Bad internal image (used only when extracting the face image from the image stored in the internal buffer). This value returns if there is no image in the buffer.
BC_ERR_NO_BC_FOUND Could not find 1D barcode printing on the image
BC_ERR_NONE Barcode detected successfully

Processes the internal image acquired in the previous scan. The function deskews and cleans up the image, and then passes it to the image analyzer for data extraction. The resulting textual data is kept in internal structure ready for retrieval by the RefreshData function. Processing the image does not modify the image content.

Successful image processing is dependent on the following:

  • Image must be scanned in 600 dpi (grayscale color scheme)
  • Image must be aligned so that the barcode image is vertical with a tolerance of no more than ±10 degrees

Syntax

ProcImage(ImageFile As String) As Long

Parameters

Parameter Description
[in] ImageFile

Return Values

Value Description
LICENSE_INVALID Library not initialized with proper license
SLIB_ERR_SCANNER_NOT_FOUND No attached scanner found
ID_ERR_STATE_NOT_SUPPORTED Requested state ID not supported
SLIB_ERR_INVALID_SCANNER No scanner attached to the PC
INVALID_INTERNAL_IMAGE Bad internal image (used only when extracting the face image from the image stored in the internal buffer). This value returns if there is no image in the buffer.
BC_ERR_NO_BC_FOUND Could not find 1D barcode printing on the image

Loads the library properties with the recently detected data. This function should normally be called after executing the ProcImage function.

Syntax

RefreshData() As Long

Parameters

None

Return Values

  • If the function returns a non-zero value, the data was retrieved successfully.
  • If the function returns a zero value, the data was not retrieved.

Returns the Sex value as a string (read-only)

Syntax

Sex As String

Parameters

None

Return Values

Returns the Sex value

Returns the SocialSecurity value as a string (read-only)

Syntax

SocialSecurity As String

Parameters

None

Return Values

Returns the SocialSecurity value

Returns the State value as a string (read-only)

Syntax

State As String

Parameters

None

Return Values

Returns the State value

Returns the Zip value as a string (read-only)

Syntax

Zip As String

Parameters

None

Return Values

Returns the Zip value

Returns the Endorsements value as a string (read-only)

Syntax

Endorsements As String

Parameters

None

Return Values

Returns the Endorsements value

Returns the Eyes value as a string (read-only)

Syntax

Eyes As String

Parameters

None

Return Values

Returns the Eyes value

Returns the Hair value as a string (read-only)

Syntax

Hair As String

Parameters

None

Return Values

Returns the Hair value

Returns the Height value as a string (read-only)

Syntax

Height As String

Parameters

None

Return Values

Returns the Height value

Returns the Weight value as a string (read-only)

Syntax

Weight As String

Parameters

None

Return Values

Returns the Weight value

Indicates to get the year in 4 digits in all data fields (Write-only)

Syntax

Weight As String

Parameters

True | False Set to True to get year in 4 digits in all date fields

Return Values