CBarCode library
Address
Section titled “Address”Returns the Address value in string format (read-only)
Syntax
Address As StringParameters
None
Return Values
Returns the Address value
Returns the City value in string format (read-only)
Syntax
City As StringParameters
None
Return Values
Returns the City value
Returns the Class value in string format (read-only)
Syntax
Class As StringParameters
None
Return Values
Returns the Class value
Data1D
Section titled “Data1D”Returns the Data1D value in string format (read-only)
Syntax
Data1D As StringParameters
None
Return Values
Returns the Data1D value
DateOfBirth
Section titled “DateOfBirth”Returns the DateOfBirth in string format (read-only)
Syntax
DateOfBirth As StringParameters
None
Return Values
Returns the DateOfBirth value
ExpirationDate
Section titled “ExpirationDate”Returns the ExpirationDate value in string format (read-only)
Syntax
ExpirationDate As StringParameters
None
Return Values
Returns the ExpirationDate value
Address2
Section titled “Address2”Returns the Address2 value in string format (read-only)
Syntax
Address2 As StringParameters
None
Return Values
Returns the Address2 value
Returns the City2 value in string format (read-only)
Syntax
City2 As StringParameters
None
Return Values
Returns the City2 value
State2
Section titled “State2”Returns the State2 value in string format (read-only)
Syntax
State2 As StringParameters
None
Return Values
Returns the State2 value
Returns the Zip2 value in string format (read-only)
Syntax
Zip2 As StringParameters
None
Return Values
Returns the Zip2 value
GetRawData
Section titled “GetRawData”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 LongParameters
| Parameter | Description |
|---|---|
| [in] sBufData | A string that contains the returned value |
Return Values
None
GetRawField
Section titled “GetRawField”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 LongParameters
| 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 |
InitLibrary
Section titled “InitLibrary”Initializes the CBarCode library
Note: This function must be called before calling any other function in the library.
Syntax
InitLibrary(license As String) As LongParameters
| 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 |
IssueDate
Section titled “IssueDate”Returns the IssueDate in string format (read-only)
Syntax
IssueDate As StringParameters
None
Return Values
Returns the IssueDate value
license
Section titled “license”Returns the License in string format (read-only)
Syntax
license As StringParameters
None
Return Values
Returns the license value
Returns the Name in string format (read-only)
Syntax
Name As StringParameters
None
Return Values
Returns the Name value
NameFirst
Section titled “NameFirst”Returns the NameFirst in string format (read-only)
Syntax
NameFirst As StringParameters
None
Return Values
Returns the NameFirst value
NameLast
Section titled “NameLast”Returns the NameLast in string format (read-only)
Syntax
NameLast As StringParameters
None
Return Values
Returns the NameLast value
NameMiddle
Section titled “NameMiddle”Returns the NameMiddle in string format (read-only)
Syntax
NameMiddle As StringParameters
None
Return Values
Returns the NameMiddle value
NameSuffix
Section titled “NameSuffix”Returns the NameSuffix in string format (read-only)
Syntax
NameSuffix As StringParameters
None
Return Values
Returns the NameSuffix value
Proc1DImage
Section titled “Proc1DImage”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 LongParameters
| 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 |
ProcImage
Section titled “ProcImage”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 LongParameters
| 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 |
RefreshData
Section titled “RefreshData”Loads the library properties with the recently detected data. This function should normally be called after executing the ProcImage function.
Syntax
RefreshData() As LongParameters
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 StringParameters
None
Return Values
Returns the Sex value
SocialSecurity
Section titled “SocialSecurity”Returns the SocialSecurity value as a string (read-only)
Syntax
SocialSecurity As StringParameters
None
Return Values
Returns the SocialSecurity value
Returns the State value as a string (read-only)
Syntax
State As StringParameters
None
Return Values
Returns the State value
Returns the Zip value as a string (read-only)
Syntax
Zip As StringParameters
None
Return Values
Returns the Zip value
Endorsements
Section titled “Endorsements”Returns the Endorsements value as a string (read-only)
Syntax
Endorsements As StringParameters
None
Return Values
Returns the Endorsements value
Returns the Eyes value as a string (read-only)
Syntax
Eyes As StringParameters
None
Return Values
Returns the Eyes value
Returns the Hair value as a string (read-only)
Syntax
Hair As StringParameters
None
Return Values
Returns the Hair value
Height
Section titled “Height”Returns the Height value as a string (read-only)
Syntax
Height As StringParameters
None
Return Values
Returns the Height value
Weight
Section titled “Weight”Returns the Weight value as a string (read-only)
Syntax
Weight As StringParameters
None
Return Values
Returns the Weight value
Use4DigitsYearFormat
Section titled “Use4DigitsYearFormat”Indicates to get the year in 4 digits in all data fields (Write-only)
Syntax
Weight As StringParameters
True | False Set to True to get year in 4 digits in all date fields
Return Values