Skip to content
GBG Documents & Biometrics Documentation

IdData library

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

Syntax

Address As String

Parameters

None

Return Values

Returns the Address value

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

Syntax

Address2 As String

Parameters

None

Return Values

Returns the Address2 value

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

Syntax

Address3 As String

Parameters

None

Return Values

Returns the Address3 value

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

Syntax

Address4 As String

Parameters

None

Return Values

Returns the Address4 value

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

Syntax

Address5 As String

Parameters

None

Return Values

Returns the Address5 value

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

Syntax

Address6 As String

Parameters

None

Return Values

Returns the Address6 value

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

Syntax

Audit As String

Parameters

None

Return Values

Returns the Audit value

Automatically detects the state type according to the image. If the function returns with no error values, then the return value is the state ID. This value can be assigned to the IdState input parameter in the ProcState function for data extraction.

Syntax

AutoDetectState(Reserved As String) As Long

Parameters

Parameter Description
[in] Reserved Null-terminated empty string

Return Values

Value Description
LICENSE_INVALID License invalid; all scanner operations disabled
LICENSE_EXPIRED License expired; all scanner operations disabled
INVALID_INTERNAL_IMAGE No internal image loaded; must scan an image first
ID_ERR_STATE_NOT_SUPPORTED License image does not match any state template
ID_ERR_STATE_NOT_RECOGNIZED License image does not match any state template

Automatically aligns the internal image horizontally and then detects the angle of rotation.

If the function returns with none of the above error values, then the return value is the state ID. This value can be assigned to the IdState input parameter in the ProcState function for data extraction. You can dump the rotated image from the internal buffer to a file using the RotateImage function.

Syntax

AutoDetectStateEx(Reserved As String, angle As Long) As Long

Parameters

Parameter Description
[in] Reserved Null-terminated empty string
[out] angle Returns the number of clockwise 90 degree turns that the image was rotated to be aligned horizontally

Return Values

Value Description
LICENSE_INVALID License invalid; all scanner operations disabled
ID_ERR_USA_TEMPLATES_ NOT_FOUND Template database UsaIds.bin file for U.S. missing from the SDK files location
INVALID_INTERNAL_IMAGE No internal image loaded; must scan an image first
ID_ERR_STATE_NOT_SUPPORTED License image does not match any state template
ID_ERR_STATE_NOT_RECOGNIZED License image does not match any state template

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

Syntax

City As String

Parameters

None

Return Values

Returns a string with the City value

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

Syntax

Class As String

Parameters

None

Return Values

Returns a string with the Class value

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

Syntax

CountryShort As String

Parameters

None

Return Values

Returns a string with the CountryShort value

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

Syntax

County As String

Parameters

None

Return Values

Returns a string with the County value

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

Syntax

CSC As String

Parameters

None

Return Values

Returns a string with the CSC value

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

Syntax

DateOfBirth As String

Parameters

None

Return Values

Returns the DateOfBirth value

Detects and processes a card with two sides that each of the sides can contain text and/or barcode data. After using this function, you can get the fields data from the idData and Barcode classes (using the ScanShell 3000D/ScanShell 800DX only). To use the internal image (after scanning a card), ImageA and ImageB should be empty strings.

Syntax

DetectProcessAndCompareEX(ImageA As String, ImageB As String, state As Integer, ImageA_assignment As Integer, angleA As Integer, angleB As Integer, reserved As Integer) As Long

Parameters

Parameter Description
[in] ImageA Full name of the source driver’s license image file (Side A)
[in] ImageB Full name of the source driver’s license image file (Side B)
[in] State StateID can be -1 for auto detect state
[in,out] ImageA_assignment
[in,out] angleA Contains the angle that has been used to rotate image A
[in,out] angleB Contains the angle that has been used to rotate image B
[in] reserved Use the value 0

Return Values

Value Description
stateID Function succeeded
-1 Function failed

Detects and processes a card with two sides that each of the sides can contain text and/or barcode data. After using this function, you can get the fields data from the idData and Barcode classes (using the ScanShell 3000D/ScanShell 800DX only). To use the internal image (after scanning a card), ImageA and ImageB should be empty strings.

Syntax

DetectProcessAndCompareEX2(ImageA As String, ImageB As String, state As Integer, ImageA_assignment As Integer, angleA As Integer, angleB As Integer, defaultBarcode As Integer, reserved As Integer) As Long

Parameters

Parameter Description
[in] ImageA Full name of the source driver’s license image file (Side A)
[in] ImageB Full name of the source driver’s license image file (Side B)
[in] State StateID can be -1 for auto detect state
[in,out] ImageA_assignment
[in,out] angleA Contains the angle that has been used to rotate image A
[in,out] angleB Contains the angle that has been used to rotate image B
[in] defaultBarcode Use the 2D or 1D barcode as the first extraction process: 0=2D and 1=1D

Return Values

Value Description
stateID Function succeeded
-1 Function failed

Detects the front side and extracts the data from the two sides of a card. After using this function, you can get the fields value from the idData class (using ScanShell 3000D/ScanShell 800DX only). To use the internal image (after scanning a card), ImageA and ImageB should be empty strings.

Syntax

DetectProcessDuplexEx(ImageA As String, ImageB As String, state As Integer, ImageA_assignment As Integer, angleA As Integer, angleB As Integer, reserved As Integer) As Long

Parameters

Parameter Description
[in] ImageA Full name of the source driver’s license image file (Side A)
[in] ImageB Full name of the source driver’s license image file (Side B)
[in] State StateID can be -1 for auto detect state
[in,out] ImageA_assignment
[in,out] angleA Contains the angle that has been used to rotate image A
[in,out] angleB Contains the angle that has been used to rotate image B
[in] reserved Use the value 0

Return Values

Value Description
stateID Function succeeded
-1 Function failed

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

Syntax

Endorsements As String

Parameters

None

Return Values

Returns a string with the Endorsements value

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

Syntax

ExpirationDate As String

Parameters

None

Return Values

Returns a string with the ExpirationDate value

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

Syntax

Eyes As String

Parameters

None

Return Values

Returns a string with the Eyes value

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

Syntax

Fee As String

Parameters

None

Return Values

Returns a string with the Fee value

Checks the detected data values and returns a value that indicates the detection accuracy (as a percentage value). This function, combined with the RotateImage() function, is useful when implementing the auto-orientation feature in the application. This feature can be implemented by rotating the internal image and for each new position, executing the ProcState() function. The operation success can be evaluated using GetDetectAcuracy() which allows us to determine if the image is in the right orientation or if a new rotation-detection-inspection is needed.

Syntax

GetDetectAcuracy() As Long

Parameters

None

Return Values

Returns a numeric value between 0–100 that represents an estimated percentage of the detection accuracy

Extracts the image rectangle of the person’s face from the source ID image. The source image can be either:

  • Internal Image - The last scanned image (stored in the internal memory). This image will be used only if the SourceFileName string is empty.

  • External Image File - The full file name is given in SourceFileName parameter. If an external file is used as the source image, it must be a 24-bit image (true color) and have a resolution of 300dpi. The source and file destination can be one of the following formats: BMP, TIFF, JPG, PCX, TGA, PNG, PSD.

    Note: Use the proper file extension (for example, .bmp for bitmap, .jpg for Jpeg) to specify the image format.

Syntax

GetFaceImage(Source As String, Dest As String, idState As Long) As Long

Parameters

Setting Description
[in] Source Null-terminated string that contains the full path of the scanned ID image. If this string is empty, then the internal image is used as the image source.
[in] Dest Null-terminated string that contains the full name of the destination image file that will contain the face image from the ID document.
[in] idState The state index value as defined in the idLibDef.bas file

Return Values

Value Description
ID_TRUE Function succeeded
ID_FALSE Function failed

This function is similar to the GetFace function but can extract more than one face image from the card. The imageType value can be 0 to get the regular face image, or 1 to get face image with the background. This function with ImageType other than a 0 value, will work only for supported cards. For now only “Spain Police” cards are supported by this function.

Syntax

GetFaceImageEx(Source As String, Dest As String, idState As Long, ImageType As Long) As Long

Parameters

Value Description
[in] SourceFile Full name of the source driver’s license image file
[in] DestFile Full name of the destination face image
[in] idState The state ID
[in] ImageType The face image type to extract

Return Values

Value Description
ID_TRUE Function completed successfully
ID_FALSE Image processing failed

Gets the face image without knowing whether it is located (on front or back)

Note: Duplex scanning is only available with ScanShell 800DX/800DXN/3100D/3100DN.

Use this function to extract the image rectangle of the person’s face from the source ID image. The source image can be either:

  • Internal Image - The last scanned image (stored in the internal memory). This image will be used only if the Source string is empty.

  • External Image File - The full file name is given in Source parameter. If an external file is used as the source image, it must be a 24-bit image (true color) and have a resolution of 300dpi. The source and file destination can be one of the following formats: BMP, TIFF, JPG, PCX, TGA, PNG, PSD.

    Note: Use the proper file extension (for example, .bmp for bitmap, .jpg for Jpeg) to specify the image format.

Syntax

GetFaceImageDuplex(Source As String, BackSource As String, Dest As String, idState As Integer) As Long

Parameters

Parameter Description
[in] Source Null-terminated string that contains the full path of the scanned ID image. If this string is empty, then the internal image is used as the image source.
[in] BackSource Null-terminated string that contains the full path of the scanned back side ID image. If this string is empty the internal image is used as the image source.
[in] Dest Null-terminated string that contains the full name of the destination image file that will contain the face image from the ID document.
[in] idState The state index value as defined in the idLibDef.bas file

Return Values

Value Description
ID_TRUE Function succeeded
ID_FALSE Internal processing error

Extracts the face image from the document image to the given buffer

The source document image can be an existing image file (in BMP format) or the last scanned document (stored in the internal image buffer). If the SourceFile parameter is an empty string, then the image is taken from the internal image buffer. If this parameter contains the full name of a valid image file, then this file is used.

Syntax

GetFaceImageBuffer(sSource As String, pBuf As String, sFileType As String, nStateID as Integer) As Long

Parameters

Setting Description
[in] sSource Name of the source driver’s license image file
[in] pBuf A string buffer that contains the image content upon a successful return
[in] sFileType Sets the buffer image format. May be one of the following strings (case-insensitive): BMP | PNG | JPG | PCX | PSD | TGA | TIF
[in] nStateID The state ID

Return Values

Value Description
ID_TRUE Function succeeded
ID_FALSE Function failed

Extracts the face image from the document image to the given buffer. The source document image can be an existing image file (in BMP format) or the last scanned document (stored in the internal image buffer). If the SourceFile parameter is an empty string, then the image is taken from the internal image buffer. If this parameter contains the full name of a valid image file, then this file is used.

Syntax

GetFaceImageBufferDirect(sSource As String, sFileType As String, nStateID as Long) As String

Parameters

Setting Description
[in] Source Name of the source driver’s license image file
[in] Buffer A string buffer that contains the image content upon a successful return
[in] FileType Sets the buffer image format. May be one of the following strings (case-insensitive): BMP | PNG | JPG | PCX | PSD | TGA | TIF
[in] StateID The state ID

Return Values

Returns the image buffer in string format

Extracts the signature image from the document image to the given buffer. The source document image can be an existing image file (in BMP format) or the last scanned document (stored in the internal image buffer). If the SourceFile parameter is an empty string, then the image is taken from the internal image buffer. If this parameter contains the full name of a valid image file, then this file is used.

Syntax

GetSignatureImageBuffer(sSource As String, pBuf As String, sFileType As String, nStateID As Long) As Long

Parameters

Setting Description
[in]s Source Name of the source driver’s license image file
[in]pBuf A string buffer that contains the image content upon a successful return
[in]s FileType Sets the buffer image format. May be one of the following strings (case-insensitive): BMP | PNG | JPG | PCX | PSD | TIF
[in] nStateID The state ID

Return Values

Value Description
ID_TRUE Function succeeded
ID_FALSE Function failed

Extracts the signature image from the document image to the given buffer. The source document image can be an existing image file (in BMP format) or the last scanned document (stored in the internal image buffer). If the SourceFile parameter is an empty string, then the image is taken from the internal image buffer. If this parameter contains the full name of a valid image file, then this file is used.

Syntax

GetSignatureImageBuffer(sSource As String, sFileType As String, nStateID As Long) As String

Parameters

Setting Description
[in] sSource Name of the source driver’s license image file
[in] sFileType Sets the buffer image format. May be one of the following strings (case insensitive): BMP | PNG | JPG | PCX | PSD | TGA | TIF
[in] nStateID The state ID

Return Values

Returns the image buffer in string format

Gets the first country in the countries list. Combining this function with the function GetNextCountry lets you get the constant values of all supported countries. The countries’ constant values in the Region are not always consecutive and should be obtained using the GetNextCountry function.

Syntax

GetFirstCountry() As Integer

Parameters

None

Return Values

Returns the constant value of the first country in the countries list

Retrieves the first state constant in the country. The states constant values in the country are not always consecutive and should be obtained using the GetNextStateByCountry function.

Syntax

GetFirstStateByCountry(Country As Integer) As Integer

Parameters

Parameter Description
[in] country Constant value of the country

Return Values

Value Description
ID_ERR_NO_MATCH Bad country constant; otherwise, the returns the constant value of the first state in the country

Gets the next country in the country list. To get the countries list, call GetFirstCountry once to obtain the first country and then continuously call GetNextCountry until ID_ERR_NO_NEXT_COUNTRY is returned.

Syntax

GetNextCountry() As Integer

Parameters

None

Return Values

Value Description
ID_ERR_COUNTRY_NOT_INIT The GetFirstCntry function not previously called
ID_ERR_NO_MATCH List contains an internal error
ID_ERR_NO_NEXT_COUNTRY Last country in the list

Gets the next state in the list

Syntax

GetNextStateByCountry(Country As Integer) As Integer

Parameters

Parameter Description
[in] country Constant value of the country

Return Values

Value Description
ID_ERR_ NO_MATCH Bad country constant; otherwise, returns the constant value of the first state in the country
ID_ERR_COUNTRY_NOT_INIT GetFirstCountry function not previously called
ID_ERR_NO_NEXT_STATE Last state on the country state list

Extracts the image rectangle of the person’s signature from the source ID image. The source image can be either:

  • Internal Image - The last scanned image (stored in the internal memory). Used only if SourceFileName string is empty.
  • External Image File - The full file name is given in SourceFileName parameter. If an external file is used as the source image, it must be a 24-bit image (true color) and have a resolution of 300 dpi. The source and file destination can be one of the following formats: BMP, TIFF, JPG, PCX, TGA, PNG, PSD. To set the image format, use the proper file extension.

Syntax

GetSignImage(Source As String, Dest As String, idState As Long) As Long

Parameters

Parameter Description
[in] Source Null-terminated string that contains the full path of the scanned ID image. If empty, uses the internal image as the image source
[in] Dest Null-terminated string that contains the full name of the destination
[in] idState State index value as defined in idLibDef.bas file

Return Values

Value Description
ID_TRUE Function succeeded
ID_FALSE Function failed:

Gets the signature image without knowing whether it is located (on front or back)

Note: Duplex scanning is only available with ScanShell 800DX/800DXN/3100D/3100DN.

Use this function to extract the image rectangle of the person’s signature from the source ID image. The source image can be either:

  • Internal Image - The last scanned image (stored in the internal memory). This image will be used only if the SourceFileName string is empty.

  • External Image File - The full file name is given in SourceFileName parameter. If an external file is used as the source image, it must be a 24-bit image (true color) and have a resolution of 300 DPI. The source and file destination can be in one of the following formats: BMP, TIFF, JPG, PCX, TGA, PNG, and PSD.

    Note: Use the proper file extension (for example, .bmp for bitmap, .jpg for Jpeg) to specify the image format.

Syntax

GetSignatureImageDuplex(Source As String, BackSource As String,
Dest As String, idState As Long) As Long

Parameters

Parameter Description
[in] Source Null-terminated string that contains the full path of the scanned ID image. If this string is empty the internal image is used as the image source.
[in] BackSource Null-terminated string that contains the full path of the scanned back side ID image. If this string is empty the internal image is used as the image source.
[in] Dest Null-terminated string that contains the full name of the destination image file that will contain the face image from the ID document.
[in] idState The state index value as defined in the idLibDef.bas file

Return Values

Value Description
ID_TRUE Function succeeded
ID_FALSE Function failed:

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

Syntax

Hair As String

Parameters

None

Return Values

Returns the Hair value

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

Syntax

Height As String

Parameters

None

Return Values

Returns the Height value

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

Syntax

Id As String

Parameters

None

Return Values

Returns the Id value

Converts the country ID number to the country name

Syntax

Id2Country(ICountryId As Long, Country As String) As Long

Parameters

Parameter Description
[in] CountryId The country ID number

Return Values

Value Description
ID_TRUE Function succeeded
ID_ERR_NO_MATCH The value in id is not a valid country ID

Converts the state ID to the state name. For example, passing stateId with the value 4 loads the string StateName with the string “California.” The function converts the string to the ID even if the state is not supported by the library.

Syntax

Id2State(Id As Long, State As String) As Long

Parameters

Parameter Description
[in] CountryId The country ID number

Return Values

Value Description
ID_TRUE Function succeeded
ID_ERR_NO_MATCH No state with that ID was found

Returns the full name of the country that issued the document (read-only)

Syntax

IdCountry As String

Parameters

None

Return Values

Returns the IdCountry value in string format

Initializes the scanner library by loading the scanner driver and initializing the internal image structure. 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 800 | ScanShell 1000
SLIB_LIBRARY_ALREADY_INITIALIZED Library already loaded; ignores InitLibrary function call

Returns the Issue date in string format (read-only)

Syntax

IssueDate As String

Parameters

None

Return Values

Returns the IssueDate value as a string

Returns the LastStateIndex value as an Integer

Syntax

LastStateIndex As Integer

Parameters

None

Return Values

Returns the LastStateIndex value

Returns the License value in string format

Syntax

License As String

Parameters

None

Return Values

Returns the License value

Returns the Name value in string format

Syntax

Name As String

Parameters

None

Return Values

Returns the Name value

Returns the NameFirst value in string format

Syntax

NameFirst As String

Parameters

None

Return Values

Returns the NameFirst value

Returns the NameLast value in string format

Syntax

NameLast As String

Parameters

None

Return Values

Returns the NameLast value

Returns the NameMiddle value in string format

Syntax

NameMiddle As String

Parameters

None

Return Values

Returns the NameMiddle value

Returns the NameSuffix value in string format

Syntax

NameSuffix As String

Parameters

None

Return Values

Returns the NameSuffix value

Returns the NameFirst_NonMRZ value in string format

Syntax

NameFirst_NonMRZ As String

Parameters

None

Return Values

Returns the NameFirst_NonMRZ value

Returns the NameMiddle_NonMRZ value in string format

Syntax

NameMiddle_NonMRZ As String

Parameters

None

Return Values

Returns the NameMiddle_NonMRZ value

Returns the NameLast_NonMRZ value in string format

Syntax

NameLast_NonMRZ As String

Parameters

None

Return Values

Returns the NameLast_NonMRZ value

Returns the NameSuffix_NonMRZ value in string format

Syntax

NameSuffix_NonMRZ As String

Parameters

None

Return Values

Returns the NameSuffix_NonMRZ value

Returns the NameLast1 value in string format. This is generally found on Spanish documents where the bearer has more than one last name.

Syntax

NameLast1 As String

Parameters

None

Return Values

Returns the NameLast1 value

Returns the NameLast2 value in string format. This is generally found on Spanish documents where the bearer has more than one last name.

Syntax

NameLast2 As String

Parameters

None

Return Values

Returns the NameLast2 value

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

Syntax

Original As String

Parameters

None

Return Values

Returns the Original value

Processes the internal image acquired in the previous scan. The function deskews (straightens) and cleans the image and then passes it to the OCR for analysis. The resultant 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 depends on the following:

  • The image must be scanned in 24-bit (true color) and 300 dpi.
  • The image must be aligned horizontally with a tolerance of no more than ±10 degrees.

Syntax

ProcState(fileName As String, idState As Long) As Long

Parameters

Parameter Description
[in] fileName Null-terminated empty string Reserved
[in] idState Constant numeric value of the processed state ID

Return Values

Value Description
ID_TRUE Function succeeded
LICENSE_INVALID License invalid; library not initialized
SLIB_ERR_SCANNER_NOT_FOUND Scanner not connected to PC; all scanner operations disabled. Check the scanner connection. Restart the function
SLIB_ERR_INVALID_SCANNER Attached scanner invalid
ID_ERR_STATE_NOT_SUPORTED Requested state ID not supported
INVALID_INTERNAL_IMAGE No internal image loaded; must scan an image first

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

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.

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

Syntax

RefreshDataAu() 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.

Detects whether a document of a specific state can be automatically detected by the AutoDetectStateEx function after scanning the document. If so, AutoDetectStateEx will return the proper state enum, and this value can be used as an input parameter to the ProcState function, which retrieves the data from the image.

Note: If RegionAutoDetectSupport returns ID_FALSE, then skip the call to AutoDetectStateEx and call ProcState directly, while setting the stateID parameter manually.

Syntax

RegionAutoDetectSupport(RegionId As Long) As Long

Parameters

Parameter Description
[in] RegionId The region enumeration value

Return Values

Value Description
ID_ERR_NO_MATCH The RegionId parameter does not contain a valid region enum.
ID_TRUE The RegionId parameter represents a region that supports autodetection.
ID_FALSE The RegionId parameter represents a region that does not support autodetection.

Detects the region that contains the country. For a complete list of the regions and their related states, see Appendix A.

Syntax

RegionByCountry(Country As Long) As Long

Parameters

Parameter Description
[in] Country Constant value of a country

Return values

Value Description
ID_ERR_NO_MATCH The Country parameter does not contain a valid country ID. Otherwise, this returns the region ID that contains the input country

Gets the value of the first region in the SDK region list. The SDK divides the supported countries into several major regions. The regions are organized in a list that can be retrieved by calling to this function once, and then continuously calling the RegionGetNext() function.

The list size and order may vary in the future, as the SDK will include more and more regions. For example, regions 0 and 1 (USA and Canada respectively) are designated to be unified to a single region (North America region) in later versions. Therefore, you should never fix the region values in your code and always retrieve it using the function RegionGetFirst and RegionGetNext.

Not all the regions support auto detection. However, in the following versions more and more regions will support this feature.

Syntax

RegionGetFirst As Long

Parameters

None

Return values

Returns the value of the first region in the SDK region list

Gets the list of countries in the region (when used with RegionGetNextCountry)

Syntax

RegionGetFirstCountry(IRegion As Long) As Long

Parameters

Parameter Description
[in] IRegion The region ID that contains the country list

Return Values

Value Description
ID_TRUE Function succeeded
ID_ERR_NO_MATCH The value in region is not a valid region ID. Otherwise, the function returns the first country ID in the region.

Converts region name values to the region ID

Syntax

RegionGetIdByName (sRegion As String, IRegionId As Long) As Long

Parameters

Parameter Description
[in] RegionName The region name
[out] RegionId An integer that accepts the RegionId

Return Values

Value Description
ID_TRUE Region found; RegionId returns the region ID
ID_ERR_NO_MATCH The RegionName is not a valid region name

Converts region ID values into the region name

Syntax

RegionGetNameById(lRegionId As Long, sRegion As String) As Long

Parameters

Parameter Description
[in] IRegionId The region numeric value
[in] sRegion A string that accepts the region name

Return Values

Value Description
ID_TRUE Region found; RegionName string returns with region name
ID_ERR_NO_MATCH The RegionId parameter is not a valid region enumeration

Retrieves the region list:

  1. Call the RegionGetFirstfunction once.
  2. Call RegionGetNext continuously in a loop until the ID_ERR_NO_NEXT_COUNTRY value is returned. For each call, the function returns the ID of the next region.

Syntax

RegionGetNextCountry(Region As Integer) As Long

Parameters

None

Return Values

Parameter Description
ID_ERR_NO_MATCH The RegionGetFirst function was never called before calling this function
ID_ERR_NO_NEXT_COUNTRY No next country in list; last call retrieved the last country in the list. Otherwise, the function returns 1, the value of the next region ID.

Combined with RegionGetFirstCountry), obtains the list of countries in the region

  1. Call RegionGetFirstCountryonce.
  2. Then call RegionGetNextCountry continuously in a loop and store the returned value until the ID_ERR_NO_NEXT_COUNTRY value is returned.
  3. Retrieve the full region list using RegionGetFirstand RegionGetNextfunctions.
  4. For each Region, retrieve the full countries list using RegionGetFirstCountryand RegionGetNextCountry functions.
  5. For each Country, retrieve the full state list using GetFirstStateByCountryand GetNextStateByCountryfunctions.

Syntax

RegionGetNextCountry(IRegionId As Long) As Long

Parameters

Parameter Description
[in] IRegionId The region ID that contains the country list

Return Values

Value Description
ID_TRUE Function succeeded
ID_ERR_NO_MATCH Value in region not a valid region ID. Otherwise, the function returns the next country ID in the region.
ID_ERR_NO_NEXT_COUNTRY No next country in list; last call retrieved the last country in the list

The AcuFill SDK can automatically detect the card type using the following steps:

  1. Set the region number.

  2. Run the AutoDetectStateEx function (as described in the ScanW_Library.pdf document) after scanning the image.

    Currently, the following regions support autodetection:

ID Region
0 USA (DEFAULT)
1 Canada
4 Australia
5 Asia

The autodetection will support additional regions in the upcoming versions. For a complete list of the regions and their related states, see Appendix A.

Note: Upon invocation of the library, the DEFAULT region is set to USA (Region Number 0).

Syntax

RegionSet(RegionId As Long) As Long

Parameters

Parameter Description
[in] RegionId The current region ID

Return Values

Value Description
ID_TRUE Region setting successful
ID_ERR_AUTO_DETECT_NOT_SUPPORTED The RegionId parameter doesn’t support auto detection
ID_ERR_NO_MATCH The RegionId parameter is not a valid region identifier

Like the RegionSet function, this function will do the same but this time the AcuFill SDK will try to find the card type in all the given regions IDs in this function. For example, if call this function with a 0 and 1 (for USA and Canada, respectively) and now whenever you call the DetectStateEx function with USA or Canadian cards, it will find the card.

Syntax

RegionSetDetectionSequence(IRegionId0 As Long, IRegionId1 As Long, IRegionId2 As Long, IRegionId3 As Long, IRegionId4 As Long, IRegionId5 As Long, IRegionId6 As Long) As Long

Parameters

Parameter Description
[in] IRegionId0 The current region ID
[in] IRegionId1 The current region ID
[in] IRegionId2 The current region ID
[in] I RegionId3 The current region ID
[in] IRegionId4 The current region ID
[in] IRegionId5 The current region ID
[in] IRegionId6 The current region ID

Return Values

Value Description
ID_ERR_AUTO_DETECT_NOT_SUPPORTED The RegionId parameter doesn’t support auto detection
ID_ERR_NO_MATCH The RegionId parameter is not a valid region identifier
ID_TRUE Region setting successful

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

Syntax

Restriction As String

Parameters

None

Return Values

Returns the Restriction value

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

Syntax

Sex As String

Parameters

None

Return Values

Returns the Sex value

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

Syntax

Side As String

Parameters

None

Return Values

Returns the Side value

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

Syntax

SigNum As String

Parameters

None

Return Values

Returns the SigNum 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

Converts a state name (string) to its equivalent ID value, even if the state is not supported by the library. For example, passing the StateName loaded with the string “California” will return the value 4. See Id2State()and LastStateIndexSyntaxfor more information.

Syntax

State2Id(State As String) As Long

Parameters

Parameter Description
[in] State String that contains the state name

Return Values

Value Description
StateId String that contains the state name
ID_ERR_NO_MATCH Not a valid region ID; otherwise, the function returns the next country ID in the region.

Indicates whether the ID image of a given state can be processed. Use this function to detect what states the library currently supports.

Syntax

StateIsSupported(idState As Long) As Long

Parameters

Parameter Description
[in] idState Integer that contains the state ID

Return Values

Value Description
ID_TRUE State is supported and can be detected by library
LICENSE_INVALID Library not initialized with proper license
ID_ERR_STATE_NOT_SUPORTED State not supported

Returns the Type_ value in string format

Syntax

Type_ As String

Parameters

None

Return Values

Returns the Type_ value

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

Syntax

Version As String

Parameters

None

Return Values

Returns the Version value

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

Syntax

Weight As String

Parameters

None

Return Values

Returns the Weight value

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

Syntax

WideCharacters As String

Parameters

None

Return Values

Returns the WideCharacters value

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

Syntax

Zip As String

Parameters

None

Return Values

Returns the Zip value

Scans a full image and extracts only the MRZ as raw data. To use the internal image (after scanning a card), FileName should be an empty string.

Syntax

ProcMRZ(FileName As String, rotationAngle As Long) As Long

Parameters

Parameter Description
[in] FileName Full name of the source driver’s license image file (Side A)
[in,out] rotationAngle Contains the angle that has been used to rotate the image

Return Values

Value Description
1 Function succeeded
-1 Function failed

Clears data from all the fields in the idData class

Syntax

ResetIDFields()

Parameters

None

Return Values

None

Returns a Date of Birth with the year in a 4-digit format (read-only)

Syntax

DateOfBirth4 As String

Parameters

None

Return Values

Returns the DateOfBirth4 value

Returns the Expiration date with year in a 4-digit format (read-only)

Syntax

ExpirationDate4 As String

Parameters

None

Return Values

Returns the ExpirationDate4 value

Returns the issue date with the year in a 4-digit format (read-only)

Syntax

IssueDate4 As String

Parameters

None

Return Values

Returns the IssueDate4 value

Gets the country by a given StateID

Syntax

GetCountryIDByStateID(StateID As Integer) As Long

Parameters

Parameter Description
[in] StateID Constant value of the StateId

Return Values

Value Description
Constant value Country ID
ID_ERR_NO_MATCH Bad state constant

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

Syntax

Text1 As String

Parameters

None

Return Values

Returns the Text1 value

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

Syntax

Text2 As String

Parameters

None

Return Values

Returns the Text2 value

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

Syntax

Text3 As String

Parameters

None

Return Values

Returns the Text3 value

Returns the template name of the last processed image in string format (read-only)

Syntax

DocType As String

Parameters

None

Return Values

Returns the last template name

Verifies the field value with its checksum digit on the MRZ line (from which it was taken)

Syntax

int GetMRZChecksumVerified(int nFieldIndex)

Parameters

Parameter Description
[in] nFieldIndex Constant value of the field

Return Values

Value Description
1 Verification success
0 Verification failed
-1 Not verified

This function is similar to the GetFace function but will extract the face and signature images. The imageType value can be 0 to get the regular face image, or 1 to get face image with the background. This function with ImageType other than a 0 value, will work only for supported cards. Currently only “Spain Police” cards are supported by this function.

Syntax

GetFaceAndSignatureImagesOnly(Source As String, FaceDest As String, SignatureDest As String, idState As Long, ImageType As Long) As Long

Parameters

Parameter Description
[in] SourceFile Full name of the source driver’s license image file
[in] FaceDest Full name of the destination face image
[in] SignatureDest Full name of the destination signature image
[in] idState The state ID
[in] ImageType The face image type to extract

Return Values

Value Description
ID_ERR_FILE_OPEN Can’t open input image file
INVALID_INTERNAL_IMAGE Invalid internal image file
ID_FALSE Image processing failed
ID_ERR_CANNOT_DELETE_ DESTINATION_IMAGE Destination file already exists and can’t be overwritten

Returns the current date format (read/write)

Syntax

DatesFormat As Integer

Parameters

None

Return Values

Value Description
EXTRACT_DATE_FORMAT_NONE 0 (Use the default date extraction)
EXTRACT_DATE_FORMAT_MDY 1 (mm-dd-yy)
EXTRACT_DATE_FORMAT_DMY 2 (dd-mm-yy)
EXTRACT_DATE_FORMAT_YMD 3 (yy-mm-dd)
EXTRACT_DATE_FORMAT_YDM 4 (yy-dd-mm)

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

Syntax

MotherName As String

Parameters

None

Return Values

Returns the MotherName value

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

Syntax

FatherName As String

Parameters

None

Return Values

Returns the FatherName value

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

Syntax

IssueDateLocal As String

Parameters

None

Return Values

Returns the IssueDateLocal value

Returns date of birth (in a local format or language) in string format (read-only)

Syntax

DateOfBirthLocal As String

Parameters

None

Return Values

Returns the DateOfBirthLocal value

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

Syntax

Nationality As String

Parameters

None

Return Values

Returns the Nationality value

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

Syntax

PlaceOfIssue As String

Parameters

None

Return Values

Returns the PlaceOfIssue value

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

Syntax

PlaceOfBirth As String

Return Values

Returns the PlaceOfBirth value