Manual de Refer en CIA SDK UF300 - BioMini
Manual de Refer en CIA SDK UF300 - BioMini
Manual de Refer en CIA SDK UF300 - BioMini
M A N U A L D E R E F E R E N C IA S D K B io M in i
http://www.siasa.com.mx
Contenido.
1. Introduccin .........................................................................................................................................................1 Mdulos ....................................................................................................................................................................1 Productos ..................................................................................................................................................................1 Licenciamiento: .........................................................................................................................................................1 Lenguajes de desarrollo y herramientas soportadas. ...............................................................................................2 Requerimientos de Sistema para desarrollo. ............................................................................................................2 2. Funciones nuevas .................................................................................................................................................3 Versin 3.1.0 .............................................................................................................................................................3 Versin 3.0.0 .............................................................................................................................................................3 3. Tutorial: ................................................................................................................................................................4 Enrolar huellas desde el lector. .................................................................................................................................5 0. Producto requerido ..........................................................................................................................................5 1. Declaraciones ...................................................................................................................................................5 2. Inicializar el mdulo del scanner y verificar el nmero de scanners................................................................6 3. Obtener la primera huella ................................................................................................................................7 4. Asignar parmetros. .........................................................................................................................................8 5. Capturar imagen y extraer el template. ...........................................................................................................9 6. Finalizar mdulo del scanner. ........................................................................................................................ 11 Verificacin..............................................................................................................................................................13 0. Producto Requerido .......................................................................................................................................13 1. Declaraciones .................................................................................................................................................13 2. Crea el matcher ..............................................................................................................................................14 3. Asigna parmetros .........................................................................................................................................15 4. Verifica ...........................................................................................................................................................15 5. Elimina matcher .............................................................................................................................................18 Identificacin ...........................................................................................................................................................19 0. Producto requerido. .......................................................................................................................................19 1. Declaraciones .................................................................................................................................................19 2. Crear matcher ................................................................................................................................................20 3. Asigna parmetros. ........................................................................................................................................21 4. Identifica ........................................................................................................................................................22 5. Borra matcher ................................................................................................................................................25 Manejo de base de datos. .......................................................................................................................................27 0. Producto requerido ........................................................................................................................................27 1. Declaraciones .................................................................................................................................................27 2. Abre base de datos.........................................................................................................................................28 3. Agrega registros a la base de datos................................................................................................................29 4. Obtiene el primer registro de la base de datos. ....................................................................................31 5. Cierra base de datos.......................................................................................................................................33 4. Ejemplos. ............................................................................................................................................................34 UFE30_Demo...........................................................................................................................................................35 Productos requeridos. ........................................................................................................................................35 Lenguajes disponibles. .......................................................................................................................................35 UFE30_DatabaseDemo ...........................................................................................................................................36 Required products..............................................................................................................................................36 Lenguajes disponibles. .......................................................................................................................................36 UFE30_MultiScannerDemo .....................................................................................................................................37 Productos requeridos .........................................................................................................................................37 Lenguajes disponibles. .......................................................................................................................................37
5.
Referencias.........................................................................................................................................................38 Mdulo UFScanner ..................................................................................................................................................39 Requerimientos ..................................................................................................................................................39 Scanners soportados ..........................................................................................................................................39 Definitions ..........................................................................................................................................................40 Status return value (UFS_STATUS) .................................................................................................................40 Parameters .....................................................................................................................................................40 Scanner type ...................................................................................................................................................41 Scanner handle ...............................................................................................................................................41 Scanner callback function ............................................................................................................................... 41 Capture callback function ............................................................................................................................... 42 UFS_Init ..............................................................................................................................................................43 UFS_Update .......................................................................................................................................................44 UFS_Uninit .........................................................................................................................................................45 UFS_SetScannerCallback ....................................................................................................................................46 UFS_RemoveScannerCallback ............................................................................................................................48 UFS_GetScannerNumber ................................................................................................................................... 49 UFS_GetScannerHandle .....................................................................................................................................51 UFS_GetScannerHandleByID ..............................................................................................................................53 UFS_GetScannerIndex ........................................................................................................................................55 UFS_GetScannerID .............................................................................................................................................57 UFS_GetScannerType .........................................................................................................................................59 UFS_GetParameter ............................................................................................................................................61 UFS_SetParameter .............................................................................................................................................64 UFS_IsSensorOn .................................................................................................................................................66 UFS_IsFingerOn ..................................................................................................................................................68 UFS_CaptureSingleImage ...................................................................................................................................70 UFS_StartCapturing ............................................................................................................................................72 UFS_IsCapturing .................................................................................................................................................74 UFS_AbortCapturing ..........................................................................................................................................76 UFS_Extract ........................................................................................................................................................78 UFS_SetEncryptionKey .......................................................................................................................................80 UFS_EncryptTemplate ........................................................................................................................................82 UFS_DecryptTemplate .......................................................................................................................................84 UFS_GetCaptureImageBufferInfo ......................................................................................................................86 UFS_GetCaptureImageBuffer.............................................................................................................................88 UFS_DrawCaptureImageBuffer ..........................................................................................................................90 UFS_SaveCaptureImageBufferToBMP ...............................................................................................................92 UFS_ClearCaptureImageBuffer ..........................................................................................................................94 UFS_GetErrorString ............................................................................................................................................96 UFMatcher module .................................................................................................................................................97 Requirements .....................................................................................................................................................97 Definitions ..........................................................................................................................................................98 Status return value (UFM_STATUS) ................................................................................................................98 Matcher handle ..............................................................................................................................................99 UFM_Create .....................................................................................................................................................100 UFM_Delete .....................................................................................................................................................102 UFM_GetParameter .........................................................................................................................................104 UFM_SetParameter .........................................................................................................................................106 UFM_Verify ......................................................................................................................................................108 UFM_Identify, UFM_IdentifyMT ......................................................................................................................110 UFM_AbortIdentify ..........................................................................................................................................114 UFM_IdentifyInit ..............................................................................................................................................116
UFM_IdentifyNext ............................................................................................................................................118 UFM_RotateTemplate...................................................................................................................................... 121 UFM_GetErrorString ........................................................................................................................................123 UFDatabase module ..............................................................................................................................................124 Requirements ...................................................................................................................................................124 Database table structure.................................................................................................................................. 124 Definitions ........................................................................................................................................................125 Status return value (UFD_STATUS) ...............................................................................................................125 Database handle ...........................................................................................................................................125 UFD_Open ........................................................................................................................................................126 UFD_Close ........................................................................................................................................................128 UFD_AddData...................................................................................................................................................130 UFD_UpdateDataByUserInfo ...........................................................................................................................133 UFD_UpdateDataBySerial ................................................................................................................................136 UFD_RemoveDataByUserID .............................................................................................................................139 UFD_RemoveDataByUserInfo ..........................................................................................................................141 UFD_RemoveDataBySerial ...............................................................................................................................143 UFD_RemoveAllData ........................................................................................................................................145 UFD_GetDataNumber ...................................................................................................................................... 147 UFD_GetDataByIndex ...................................................................................................................................... 149 UFD_GetDataByUserInfo .................................................................................................................................152 UFD_GetDataBySerial ......................................................................................................................................155 UFD_GetTemplateNumber ..............................................................................................................................158 UFD_GetTemplateListWithSerial .....................................................................................................................160 UFD_GetErrorString .........................................................................................................................................163 6. Referencias para .NET ......................................................................................................................................164 Suprema.UFScanner module .................................................................................................................................165 Requirements ...................................................................................................................................................165 Supported scanners .........................................................................................................................................165 Suprema namespace ........................................................................................................................................ 166 UFS_STATUS enumeration ...........................................................................................................................167 UFS_SCANNER_TYPE enumeration...............................................................................................................168 UFS_SCANNER_PROC delegate ....................................................................................................................169 UFS_CAPTURE_PROC delegate .....................................................................................................................170 UFScannerManagerScannerEventArgs class ................................................................................................171 UFScannerCaptureEventArgs class ...............................................................................................................172 UFScannerManager class ................................................................................................................................. 173 UFScannerManager constructor ..............................................................................................................174 Scanners property ....................................................................................................................................175 ScannerEvent event .................................................................................................................................176 Init method...............................................................................................................................................177 Update method ........................................................................................................................................178 Uninit method .......................................................................................................................................... 179 UFScannerManager.ScannerList class ..............................................................................................................180 Count property ......................................................................................................................................... 181 Item property ........................................................................................................................................... 182 UFScanner class................................................................................................................................................183 CaptureEvent event .................................................................................................................................185 ID property ...............................................................................................................................................186 Timeout property .....................................................................................................................................187 Brightness property..................................................................................................................................188 Sensitivity property ..................................................................................................................................189 Serial property..........................................................................................................................................190
DetectCore property ................................................................................................................................191 TemplateSize property .............................................................................................................................192 UseSIF property ........................................................................................................................................193 ScannerType property ..............................................................................................................................194 IsSensorOn property ................................................................................................................................195 IsFingerOn property .................................................................................................................................196 IsCapturing property ................................................................................................................................197 Handle property .......................................................................................................................................198 SetScanner method ..................................................................................................................................199 CaptureSingleImage method ...................................................................................................................200 StartCapturing method ............................................................................................................................201 AbortCapturing method ...........................................................................................................................202 Extract method......................................................................................................................................... 203 SetEncryptionKey method .......................................................................................................................204 EncryptTemplate method ........................................................................................................................205 DecryptTemplate method ........................................................................................................................206 GetCaptureImageBuffer method .............................................................................................................207 DrawCaptureImageBuffer method ..........................................................................................................208 SaveCaptureImageBufferToBMP method ................................................................................................209 SaveCaptureImageBufferToTIF method ...................................................................................................210 SaveCaptureImageBufferToJPG method ..................................................................................................211 ClearCaptureImageBuffer method ...........................................................................................................212 GetErrorString method ............................................................................................................................213 Suprema.UFMatcher module ................................................................................................................................ 214 Requirements ...................................................................................................................................................214 Suprema namespace ........................................................................................................................................ 215 UFM_STATUS enumeration ..........................................................................................................................216 UFMatcher class ...........................................................................................................................................217 FastMode property ..................................................................................................................................218 SecurityLevel property .............................................................................................................................219 UseSIF property ........................................................................................................................................220 Verify method .......................................................................................................................................... 221 Identify, IdentifyMT method ....................................................................................................................222 AbortIdentify method ..............................................................................................................................224 IdentifyInit method ..................................................................................................................................225 IdentifyNext method ................................................................................................................................226 RotateTemplate method ..........................................................................................................................227 GetErrorString method ............................................................................................................................228 Suprema.UFDatabase module ..............................................................................................................................229 Requirements ...................................................................................................................................................229 Database table structure.................................................................................................................................. 229 Suprema namespace ........................................................................................................................................ 230 UFD_STATUS enumeration ...........................................................................................................................231 UFDatabase class .......................................................................................................................................... 232 Open method ...........................................................................................................................................233 Close method ...........................................................................................................................................234 AddData method ......................................................................................................................................235 UpdateDataByUserInfo method...............................................................................................................236 UpdateDataBySerial method ...................................................................................................................237 RemoveDataByUserID method ................................................................................................................238 RemoveDataByUserInfo method .............................................................................................................239 RemoveDataBySerial method ..................................................................................................................240 RemoveAllData method ...........................................................................................................................241
GetDataNumber method .........................................................................................................................242 GetDataByIndex method ..........................................................................................................................243 GetDataByUserInfo method .....................................................................................................................244 GetDataBySerial method..........................................................................................................................245 GetTemplateListWithSerial method.........................................................................................................246 GetErrorString method ............................................................................................................................247 Apndice A. Contacto. ...............................................................................................................................................248 Oficinas ..................................................................................................................................................................248 E-mail de Soporte. .................................................................................................................................................248 Apndice B. Distribucin del contenido ....................................................................................................................249 bin .........................................................................................................................................................................250 docs .......................................................................................................................................................................251 include ...................................................................................................................................................................252 install .....................................................................................................................................................................253 lib ...........................................................................................................................................................................254 samples .................................................................................................................................................................255
1. Introduccin
Mdulos
El SDK UF300/BioMini consiste en una serie de mdulos para el procesamiento de huellas: UFScanner, UFMatcher y el UFDataBase, adems de una serie de ejemplos que describen como emplear dichos mdulos. El uso de cada mdulo se describe como: Mdulo UFScanner UFMatcher UFDatabase Descripcin Manejo del lector de huella, captura de imgenes de huellas desde el scanner, extraccin del template desde imgenes capturadas empleando el lector. Verificacin de huellas empleando dos templates, identificacin de huellas empleando un arreglo de templates. Manejo de base de datos para: agregar, actualizar, borrar, obtener templates desde datos del usuario.
Productos
EL SDK UF300/BioMini est compuesto de los siguientes productos, los cuales estn basados en la licencia del mismo: Producto BioMini Enroll SDK BioMini SDK Match SDK Mdulos UFScanner UFScanner, UFMatcher, UFDatabase UFMatcher
Licenciamiento:
El SDK UF300/BioMini verifica el archivo de licencia cuando es inicializado. El archivo de licencia es llamado UFLicense.DAT y este se encuentra localizado en el mismo directorio de los mdulos del SDK. El esquema de licenciamiento brindado por nosotros permite el uso del producto, para mas detalles contacte con su distribuidor autorizado.
1 Confidencial
Visual Studio 6.0 - Visual C++, Visual Basic 6.0 Visual Studio 2003 (7.1) (.NET Framework 1.1) - Visual C++, Visual C#, Visual Basic .NET Visual Studio 2005 (8.0) (.NET Framework 2.0) - Visual C++, Visual C#, Visual Basic .NET
Computadora Pentium-compatible 500MHz processor or better Microsoft Windows 98 / ME / 2000 / XP / 2003 Driver del lector de huella (Fingerprint scanner ) para emplear el mdulo UFScanner.
2 Confidencial
2. Funciones nuevas
Versin 3.1.0
Soporta interfaces Java Soporta templates ANSI378
Versin 3.0.0
Nueva interface comparada contra la versin anterior. Soporta completa funcionalidad para el manejo de los lectores de Huella Soporte para administracin de mltiples dispositivos. Soporte de eventos Plug-and-play
Garantia de seguridad entre hilos para todas las funciones
3 Confidencial
3. Tutorial:
El SDK UF300/BioMini le provee de diversos ejemplos para una rpida integracin de los lectores a sus sistemas, entre ellos usted podr emplear las siguientes guas para emplearlo: Enrolar huellas desde el lector. Verificacin Identificacin Manejo de base de datos.
4 Confidencial
1. Declaraciones
Visual C++
// Add Suprema UFScanner lib (lib\UFScanner.lib) to the Project // Add following statements in the source #include "UFScanner.h" // We use 384 bytes template size in this tutorial #define TEMPLATE_SIZE 384
Visual Basic 6.0
' Add Suprema type library (bin\Suprema.tlb) using browse button in the References dialog (drop down the Project menu and select the References item) Option Explicit Option Base 0 ' We use 384 bytes template size in this tutorial Const MAX_TEMPLATE_SIZE As Long = 384
Visual C#
// Add Suprema UFScanner library (bin\Suprema.UFScanner.dll) using browse tap in the Add References dialog // Add following statements in the source using Suprema // We use 384 bytes template size in this tutorial const int MAX_TEMPLATE_SIZE = 384;
Visual Basic .NET
' Add Suprema UFScanner library (bin\Suprema.UFScanner.dll) using browse tap in the Add References dialog ' Add following statements in the source Imports Suprema ' We use 384 bytes template size in this tutorial 5 Confidencial
UFS_STATUS ufs_res; int nScannerNumber; // Initialize scanner module ufs_res = UFS_Init(); // Always check status return codes after running SDK functions // Meaning of status return code can be retrieved using UFS_GetErrorString() // In the tutorial, we omit error check codes // Check number of scanners ufs_res = UFS_GetScannerNumber(&nScannerNumber); // If number of scanner is under one, that means there is no scanner in this system
Visual Basic 6.0
Dim ufs_res As UFS_STATUS Dim nScannerNumber As Integer ' Initialize scanner module ufs_res = UFS_Init() ' Always check status return codes after running SDK functions ' Meaning of status return code can be retrieved using UFS_GetErrorString() ' In the tutorial, we omit error check codes ' Check number of scanners ufs_res = UFS_GetScannerNumber(ScannerNumber) ' If number of scanner is under one, that means there is no scanner in this system
Visual C#
UFS_STATUS ufs_res; UFScannerManager ScannerManager; int nScannerNumber; // Create an instance of ScannerManager ScannerManager = new UFScannerManager(this); // Initialize scanner module ufs_res = ScannerManager.Init(); 6 Confidencial
Manual de Referencia SDK BioMini // Always check status return codes after running SDK functions // Meaning of status return code can be retrieved using UFScanner.GetErrorString() // In the tutorial, we omit error check codes // Check number of scanners nScannerNumber = ScannerManager.Scanners.Count;
Visual Basic .NET
Dim ufs_res As UFS_STATUS Dim ScannerManager As UFScannerManager Dim nScannerNumber As Integer ' Create an instance of ScannerManager ScannerManager = New UFScannerManager(Me) ' Initialize scanner module ufs_res = ScannerManager.Init() ' Always check status return codes after running SDK functions ' Meaning of status return code can be retrieved using UFScanner.GetErrorString() ' In the tutorial, we omit error check codes ' Check number of scanners nScannerNumber = ScannerManager.Scanners.Count
UFS_STATUS ufs_res; HUFScanner hScanner; // Get first scanner handle (0 means first scanner) ufs_res = UFS_GetScannerHandle(0, &hScanner);
Visual Basic 6.0
Dim ufs_res As UFS_STATUS Dim hScanner As Long ' Get first scanner handle (0 means first scanner) ufs_res = UFS_GetScannerHandle(nCurScannerIndex, hScanner)
Visual C#
' ScannerManager comes from section 2 Dim Scanner As UFScanner = Nothing ' Using first scanner (0 means first scanner) Scanner = ScannerManager.Scanners(0)
4. Asignar parmetros.
Visual C++
// hScanner comes from section 3 UFS_STATUS ufs_res; int value; // Set timeout for capturing images to 5 seconds value = 5000; ufs_res = UFS_SetParameter(hScanner, UFS_PARAM_TIMEOUT, &value); // Set template size to 384 bytes value = MAX_TEMPLATE_SIZE; ufs_res = UFS_SetParameter(hScanner, UFS_PARAM_TEMPLATE_SIZE, &value); // Set not to detect core when extracting template value = FALSE; ufs_res = UFS_SetParameter(hScanner, UFS_PARAM_DETECT_CORE, &value);
Visual Basic 6.0
' hScanner comes from section 3 Dim ufs_res As UFS_STATUS Dim value As Long ' Set timeout for capturing images to 5 seconds value = 5000; ufs_res = UFS_SetParameter(hScanner, UFS_PARAM.TIMEOUT, &value) ' Set template size to 384 bytes value = MAX_TEMPLATE_SIZE; ufs_res = UFS_SetParameter(hScanner, UFS_PARAM.TEMPLATE_SIZE, &value) 8 Confidencial
Manual de Referencia SDK BioMini ' Set not to detect core when extracting template value = FALSE; ufs_res = UFS_SetParameter(hScanner, UFS_PARAM.DETECT_CORE, &value)
Visual C#
// Scanner comes from section 3 // Set timeout for capturing images to 5 seconds Scanner.Timeout = 5000; // Set template size to 384 bytes Scanner.TemplateSize = MAX_TEMPLATE_SIZE; // Set not to detect core when extracting template Scanner.DetectCore = false;
Visual Basic .NET
' Scanner comes from section 3 ' Set timeout for capturing images to 5 seconds Scanner.Timeout = 5000; ' Set template size to 384 bytes Scanner.TemplateSize = MAX_TEMPLATE_SIZE; ' Set not to detect core when extracting template Scanner.DetectCore = false;
// hScanner comes from section 3 UFS_STATUS ufs_res; unsigned char Template[MAX_TEMPLATE_SIZE]; int TemplateSize; int nEnrollQuality; // Clear capture buffer ufs_res = UFS_ClearCaptureImageBuffer(hScanner); // Capture single image ufs_res = UFS_CaptureSingleImage(hScanner); // If capturing images is fail, iterate above capture routine or show error message 9 Confidencial
Manual de Referencia SDK BioMini // Extract template from captured image ufs_res = UFS_Extract(hScanner, Template, &TemplateSize, &nEnrollQuality); // If extraction is succeed, check nEnrollQuality is above predefined quality threshold
Visual Basic 6.0
' hScanner comes from section 3 Dim ufs_res As UFS_STATUS Dim Template(MAX_TEMPLATE_SIZE - 1) As Byte Dim TemplateSize As Long Dim EnrollQuality As Long ' Clear capture buffer ufs_res = UFS_ClearCaptureImageBuffer(hScanner) ' Capture single image ufs_res = UFS_CaptureSingleImage(hScanner) ' If capturing images is fail, iterate above capture routine or show error message ' Extract template from captured image ufs_res = UFS_Extract(hScanner, Template(0), TemplateSize, EnrollQuality) ' If extraction is succeed, check nEnrollQuality is above predefined quality threshold
Visual C#
// Scanner comes from section 3 UFS_STATUS ufs_res; byte[] Template = new byte[MAX_TEMPLATE_SIZE]; int TemplateSize; int EnrollQuality; // Clear capture buffer ufs_res = Scanner.ClearCaptureImageBuffer(); // Capture single image ufs_res = Scanner.CaptureSingleImage(); // If capturing images is fail, iterate above capture routine or show error message // Extract template from captured image ufs_res = Scanner.Extract(Template, out TemplateSize, out EnrollQuality); // If extraction is succeed, check nEnrollQuality is above 10 Confidencial
' Scanner comes from section 3 Dim ufs_res As UFS_STATUS Dim Template As Byte() = New Byte(MAX_TEMPLATE_SIZE) {} Dim TemplateSize As Integer = Nothing Dim EnrollQuality As Integer = Nothing ' Clear capture buffer ufs_res = Scanner.ClearCaptureImageBuffer() ' Capture single image ufs_res = Scanner.CaptureSingleImage() ' If capturing images is fail, iterate above capture routine or show error message ' Extract template from captured image ufs_res = Scanner.Extract(Template, TemplateSize, EnrollQuality) ' If extraction is succeed, check nEnrollQuality is above predefined quality threshold
// ScannerManager comes from section 2 UFS_STATUS ufs_res; // Uninitialize scanner module ufs_res = ScannerManager.Uninit();
Visual Basic .NET
Manual de Referencia SDK BioMini Dim ufs_res As UFS_STATUS ' Uninitialize scanner module ufs_res = ScannerManager.Uninit()
12 Confidencial
Verificacin
0. Producto Requerido
BioMini SDK or Match SDK
1. Declaraciones
Visual C++
// Add Suprema UFMatcher lib (lib\UFMatcher.lib) to the Project // Add following statements in the source #include "UFMatcher.h" // We use 384 bytes template size in this tutorial #define MAX_TEMPLATE_SIZE 384
Visual Basic 6.0
' Add Suprema type library (bin\Suprema.tlb) using browse button in the References dialog (drop down the Project menu and select the References item) Option Explicit Option Base 0 ' We use 384 bytes template size in this tutorial Const MAX_TEMPLATE_SIZE As Long = 384
Visual C#
// Add Suprema UFMatcher library (bin\Suprema.UFMatcher.dll) using browse tap in the Add References dialog // Add following statements in the source using Suprema // We use 384 bytes template size in this tutorial const int MAX_TEMPLATE_SIZE = 384;
Visual Basic .NET
' Add Suprema UFMatcher library (bin\Suprema.UFMatcher.dll) using browse tap in the Add References dialog ' Add following statements in the source Imports Suprema ' We use 384 bytes template size in this tutorial 13 Confidencial
2. Crea el matcher
Visual C++
UFM_STATUS ufm_res; HUFMatcher hMatcher; // Create matcher ufm_res = UFM_Create(&hMatcher); // Always check status return codes after running SDK functions // Meaning of status return code can be retrieved using UFM_GetErrorString() // In the tutorial, we omit error check codes
Visual Basic 6.0
Dim ufm_res As UFM_STATUS Dim hMatcher As Long ' Create matcher ufm_res = UFM_Create(hMatcher) ' Always check status return codes after running SDK functions ' Meaning of status return code can be retrieved using UFM_GetErrorString() ' In the tutorial, we omit error check codes
Visual C#
UFMatcher Matcher; // Create matcher Matcher = new UFMatcher(); // Always check status return codes after running SDK functions // Meaning of status return code can be retrieved using UFMatcher.GetErrorString() // In the tutorial, we omit error check codes
Visual Basic .NET
Dim Matcher As UFMatcher ' Create matcher Matcher = New UFMatcher() ' Always check status return codes after running SDK functions ' Meaning of status return code can be retrieved using UFMatcher.GetErrorString() ' In the tutorial, we omit error check codes 14 Confidencial
3. Asigna parmetros
Visual C++
// hMatcher comes from section 2 UFM_STATUS ufm_res; int value; // Set security level to 3 value = 3; ufm_res = UFM_SetParameter(hMatcher, UFM_PARAM_SECURITY_LEVEL, &value);
Visual Basic 6.0
// hMatcher comes from section 2 Dim ufm_res As UFM_STATUS ' Set security level to 3 ufm_res = UFM_SetParameter(hMatcher, UFM_PARAM.SECURITY_LEVEL, 3)
Visual C#
' Matcher comes from section 2 ' Set security level to 3 Matcher.SecurityLevel = 3
4. Verifica
Visual C++
// hMatcher comes from section 2 UFM_STATUS ufm_res; unsigned char Template1[MAX_TEMPLATE_SIZE]; int Template1Size; unsigned char Template2[MAX_TEMPLATE_SIZE]; int Template2Size; int bVerifySucceed; 15 Confidencial
Manual de Referencia SDK BioMini // Get Template1 from scanner or database // Get Template2 from scanner or database // Verify two templates ufm_res = UFM_Verify(hMatcher, Template1, Template1Size, Template2, Template2size, &bVerifySucceed); if (ufm_res != UFM_OK) { // Execute error handling codes } else { if (bVerifySucceed) { // Verification succeed } else { // Verification failed } }
Visual Basic 6.0
' hMatcher comes from section 2 Dim ufm_res As UFM_STATUS Dim Template1(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template1Size As Long Dim Template2(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template2ize As Long Dim VerifySucceed As Long ' Get Template1 from scanner or database ' Get Template2 from scanner or database ' Verify two templates ufm_res = UFM_Verify(hMatcher, Template1(0), Template1Size, Template2(0), Template2size, VerifySucceed); If (ufm_res <> UFM_STATUS.OK) Then ' Execute error handling codes Else If (VerifySucceed = 1) Then ' Verification succeed Else ' Verification failed End If End If
Visual C#
Manual de Referencia SDK BioMini byte[] Template1 = new byte[MAX_TEMPLATE_SIZE]; int Template1Size; byte[] Template2 = new byte[MAX_TEMPLATE_SIZE]; int Template2Size; bool VerifySucceed; // Get Template1 from scanner or database // Get Template2 from scanner or database // Verify two templates ufm_res = UFM_Verify(hMatcher, Template1, Template1Size, Template2, Template2size, &bVerifySucceed); ufm_res = Matcher.Verify(Template1, Template1Size, Template2, Template2Size, out VerifySucceed); if (ufm_res != UFM_STATUS.OK) { // Execute error handling codes } else { if (VerifySucceed) { // Verification succeed } else { // Verification failed } }
Visual Basic .NET
' Matcher comes from section 2 Dim ufm_res As UFM_STATUS Dim Template1 As Byte() = New Byte(MAX_TEMPLATE_SIZE) {} Dim Template1Size As Integer = Nothing Dim Template2 As Byte() = New Byte(MAX_TEMPLATE_SIZE) {} Dim Template2Size As Integer = Nothing Dim VerifySucceed As Boolean = Nothing ' Get Template1 from scanner or database ' Get Template2 from scanner or database ' Verify two templates ufm_res = Matcher.Verify(Template1, Template1Size, Template2, Template2Size, VerifySucceed) If (ufm_res <> UFM_STATUS.OK) Then ' Execute error handling codes Else If (VerifySucceed = 1) Then ' Verification succeed Else 17 Confidencial
5. Elimina matcher
Visual C++
' hMatcher comes from section 2 UFM_STATUS ufm_res; // Delete matcher ufm_res = UFM_Create(&hMatcher);
Visual Basic 6.0
' hMatcher comes from section 2 Dim ufm_res As UFM_STATUS ' Delete matcher ufm_res = UFM_Delete(hMatcher)
Visual C#
18 Confidencial
Identificacin
0. Producto requerido.
BioMini SDK or Match SDK
1. Declaraciones
Visual C++
// Add Suprema UFMatcher lib (lib\UFMatcher.lib) to the Project // Add following statements in the source #include "UFMatcher.h" // We use 384 bytes template size in this tutorial #define MAX_TEMPLATE_SIZE 384 // Set maximum template number to 50 (number depends on application) #define MAX_TEMPLATE_NUM 50
Visual Basic 6.0
' Add Suprema type library (bin\Suprema.tlb) using browse button in the References dialog (drop down the Project menu and select the References item) Option Explicit Option Base 0 ' We use 384 bytes template size in this tutorial Const MAX_TEMPLATE_SIZE As Long = 384 ' Set maximum template number to 50 (number depends on application) Const MAX_TEMPLATE_NUM As Long = 50
Visual C#
// Add Suprema UFMatcher library (bin\Suprema.UFMatcher.dll) using browse tap in the Add References dialog // Add following statements in the source using Suprema // We use 384 bytes template size in this tutorial const int MAX_TEMPLATE_SIZE = 384; // Set maximum template number to 50 (number depends on application) 19 Confidencial
' Add Suprema UFMatcher library (bin\Suprema.UFMatcher.dll) using browse tap in the Add References dialog ' Add following statements in the source Imports Suprema ' We use 384 bytes template size in this tutorial Const MAX_TEMPLATE_SIZE As Integer = 384 ' Set maximum template number to 50 (number depends on application) Const MAX_TEMPLATE_NUM = 50
2. Crear matcher
Visual C++
UFM_STATUS ufm_res; HUFMatcher hMatcher; // Create matcher ufm_res = UFM_Create(&hMatcher); // Always check status return codes after running SDK functions // Meaning of status return code can be retrieved using UFM_GetErrorString() // In the tutorial, we omit error check codes
Visual Basic 6.0
Dim ufm_res As UFM_STATUS Dim hMatcher As Long ' Create matcher ufm_res = UFM_Create(hMatcher) ' Always check status return codes after running SDK functions ' Meaning of status return code can be retrieved using UFM_GetErrorString() ' In the tutorial, we omit error check codes
Visual C#
UFMatcher Matcher; // Create matcher Matcher = new UFMatcher(); // Always check status return codes after running SDK functions // Meaning of status return code can be retrieved using 20 Confidencial
Manual de Referencia SDK BioMini UFMatcher.GetErrorString() // In the tutorial, we omit error check codes
Visual Basic .NET
Dim Matcher As UFMatcher ' Create matcher Matcher = New UFMatcher() ' Always check status return codes after running SDK functions ' Meaning of status return code can be retrieved using UFMatcher.GetErrorString() ' In the tutorial, we omit error check codes
3. Asigna parmetros.
Visual C++
// hMatcher comes from section 2 UFM_STATUS ufm_res; int value; // Set security level to 4 value = 4; ufm_res = UFM_SetParameter(hMatcher, UFM_PARAM_SECURITY_LEVEL, &value); // Set fast mode on value = TRUE; ufm_res = UFM_SetParameter(hMatcher, UFM_PARAM_FAST_MODE, &value);
Visual Basic 6.0
// hMatcher comes from section 2 Dim ufm_res As UFM_STATUS ' Set security level to 4 ufm_res = UFM_SetParameter(hMatcher, UFM_PARAM.SECURITY_LEVEL, 4) ' Set fast mode on ufm_res = UFM_SetParameter(hMatcher, UFM_PARAM.FAST_MODE, 1)
Visual C#
Manual de Referencia SDK BioMini Matcher.SecurityLevel = 4; // Set fast mode on Matcher.FastMode = true;
Visual Basic .NET
' Matcher comes from section 2 ' Set security level to 4 Matcher.SecurityLevel = 4 ' Set fast mode on Matcher.FastMode = true
4. Identifica
Visual C++
// hMatcher comes from section 2 UFM_STATUS ufm_res; unsigned char Template1[MAX_TEMPLATE_SIZE]; int Template1Size; unsigned char* Template2Array[MAX_TEMPLATE_NUM]; int Template2SizeArray[MAX_TEMPLATE_NUM]; int Template2Num; int nMatchIndex; // Allocate Template2Array for (i = 0; i < MAX_TEMPLATE_NUM; i++) { Template2Array[i] = (unsigned char*)malloc(MAX_TEMPLATE_SIZE); memset(Template2Array[i], 0, MAX_TEMPLATE_SIZE); } // Get Template1 from scanner or image or database // Get Template2Array from scanner or image or database // Identify Template1 from Template2Array, set timeout to 5 seconds ufm_res = UFM_Identify(hMatcher, Template1, Template1Size, Template2Array, Template2SizeArray, Template2Num, 5000, &nMatchIndex); if (ufm_res != UFM_OK) { // Execute error handling codes } else { if (nMatchIndex != -1) { 22 Confidencial
Manual de Referencia SDK BioMini // Identification succeed } else { // Identification failed } } // Free Template2Array for (i = 0; i < MAX_TEMPLATE_NUM; i++) { free(Template2Array[i]); }
Visual Basic 6.0
' hMatcher comes from section 2 Dim ufm_res As UFM_STATUS Dim Template1(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template1Size As Long Dim Template2Array(MAX_TEMPLATE_SIZE - 1, MAX_TEMPLATE_NUM - 1) As Byte Dim Template2SizeArray(MAX_TEMPLATE_NUM - 1) As Long Dim Template2Num As Long Dim MatchIndex As Long ' Get Template1 from scanner or image or database ' Get Template2Array from scanner or image or database ' Make template pointer array to pass two dimensional template data Dim Template2Ptr(MAX_TEMPLATE_NUM - 1) As Long Dim i As Long For i = 0 To MAX_TEMPLATE_NUM - 1 Template2Ptr(i) = VarPtr(Template2Array(0, i)) Next ' Identify Template1 from Template2Array, set timeout to 5 seconds ufm_res = UFM_Identify(hMatcher, Template1(0), Template1Size, Template2Ptr(0), Template2SizeArray(0), Template2Num, 5000, nMatchIndex); If (ufm_res <> UFM_STATUS.OK) Then ' Execute error handling codes Else If (nMatchIndex <> -1) Then ' Identification succeed Else ' Identification failed End If 23 Confidencial
// Matcher comes from section 2 UFM_STATUS ufm_res; byte[] Template1 = new byte[MAX_TEMPLATE_SIZE]; int Template1Size; byte[][] Template2Array; int[] Template2SizeArray = new int[MAX_TEMPLATE_NUM]; int Template2Num; int nMatchIndex; // Allocate Template2Array Template2Array = new byte[MAX_TEMPLATE_NUM][]; for (i = 0; i < MAX_TEMPLATE_NUM; i++) { Template2Array[i] = new byte[MAX_TEMPLATE_SIZE]; } // Get Template1 from scanner or image or database // Get Template2Array from scanner or image or database // Identify Template1 from Template2Array, set timeout to 5 seconds ufm_res = Matcher.Identify(Template1, Template1Size, Template2, Template2Size, Template2Num, 5000, out MatchIndex); if (ufm_res != UFM_OK) { // Execute error handling codes } else { if (nMatchIndex != -1) { // Identification succeed } else { // Identification failed } }
Visual Basic .NET
' hMatcher comes from section 2 Dim ufm_res As UFM_STATUS Dim Template1 As Byte() = New Byte(MAX_TEMPLATE_SIZE) {} Dim Template1Size As Integer = Nothing Dim Template2Array As Byte()() Dim Template2SizeArray As Integer() = New Integer(MAX_TEMPLATE_NUM) {} Dim Template2Num As Integer Dim MatchIndex As Integer 24 Confidencial
' Allocate Template2Array Template2Array = New Byte(MAX_TEMPLATE_NUM)() {} For i As Integer = 0 To MAX_TEMPLATE_NUM - 1 Template2Array(i) = New Byte(MAX_TEMPLATE_SIZE) {} Next ' Get Template1 from scanner or image or database ' Get Template2Array from scanner or image or database ' Identify Template1 from Template2Array, set timeout to 5 seconds ufm_res = Matcher.Identify(Template1, Template1Size, Template2Array, Template2SizeArray, Template2Num, 5000, MatchIndex) If (ufm_res <> UFM_STATUS.OK) Then ' Execute error handling codes Else If (MatchIndex <> -1) Then ' Identification succeed Else ' Identification failed End If End If
5. Borra matcher
Visual C++
' hMatcher comes from section 2 UFM_STATUS ufm_res; // Delete matcher ufm_res = UFM_Delete(&hMatcher);
Visual Basic 6.0
' hMatcher comes from section 2 Dim ufm_res As UFM_STATUS ' Delete matcher ufm_res = UFM_Delete(hMatcher)
Visual C#
25 Confidencial
26 Confidencial
1. Declaraciones
Visual C++
// Add Suprema UFDatabase lib (lib\UFDatabase.lib) to the Project // Add following statements in the source #include "UFDatabase.h" // We use 384 bytes template size in this tutorial #define MAX_TEMPLATE_SIZE 384
Visual Basic 6.0
' Add Suprema type library (bin\Suprema.tlb) using browse button in the References dialog (drop down the Project menu and select the References item) Option Explicit Option Base 0 ' We use 384 bytes template size in this tutorial Const MAX_TEMPLATE_SIZE As Long = 384
Visual C#
// Add Suprema UFDatabase library (bin\Suprema.UFDatabase.dll) using browse tap in the Add References dialog // Add following statements in the source using Suprema // We use 384 bytes template size in this tutorial const int MAX_TEMPLATE_SIZE = 384;
Visual Basic .NET
' Add Suprema UFDatabase library (bin\Suprema.UFDatabase.dll) using browse tap in the Add References dialog ' Add following statements in the source Imports Suprema ' We use 384 bytes template size in this tutorial 27 Confidencial
UFD_STATUS ufd_res; HUFDatabase hDatabase; // Generate connection string CString szConnection; CString szDataSource("mdb_path\\UFDatabase.mdb"); szConnection.Format(TEXT("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s;"), szDataSource); // Open database ufd_res = UFD_Open(szConnection, NULL, NULL, &hDatabase); // Always check status return codes after running SDK functions // Meaning of status return code can be retrieved using UFD_GetErrorString() // In the tutorial, we omit error check codes
Visual Basic 6.0
Dim ufd_res As UFD_STATUS Dim hDatabase As Long ' Generate connection string Dim Connection As String Dim DataSource As String DataSource = "mdb_path\\UFDatabase.mdb" Connection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DataSource & ";" ' Open database ufd_res = UFD_Open(Connection, "", "", hDatabase) ' Always check status return codes after running SDK functions ' Meaning of status return code can be retrieved using UFD_GetErrorString() ' In the tutorial, we omit error check codes
Visual C#
UFS_STATUS ufd_res; UFDatabase Database; // Generate connection string string Connection; string DataSource = "mdb_path\\UFDatabase.mdb"; 28 Confidencial
Manual de Referencia SDK BioMini Connection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DataSource & ";"; // Open database ufd_res = Database.Open(Connection, null, null); // Always check status return codes after running SDK functions // Meaning of status return code can be retrieved using UFDatabase.GetErrorString() // In the tutorial, we omit error check codes
Visual Basic .NET
Dim ufd_res As UFD_STATUS Dim hDatabase As UFDatabase ' Generate connection string Dim Connection As String Dim DataSource As String DataSource = "mdb_path\\UFDatabase.mdb" Connection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DataSource & ";" ' Open database ufd_res = Database.Open(Connection, "", "") ' Always check status return codes after running SDK functions ' Meaning of status return code can be retrieved using UFDatabase.GetErrorString() ' In the tutorial, we omit error check codes
// hDatabase comes from section 2 UFD_STATUS ufd_res; CString strUserID; int nFingerIndex; unsigned char Template1[MAX_TEMPLATE_SIZE]; int Template1Size; unsigned char Template2[MAX_TEMPLATE_SIZE]; int Template2Size; CString strMemo; // // // // // Get Get Get Get Get strUserID from user nFingerIndex from user Template1 from scanner or image or database Template2 from scanner or image or database strMemo from user 29 Confidencial
// Add data ufd_res = UFD_AddData(hDatabase, strUserID, nFingerIndex, Template1, Template1Size, Template2, Template2Size, strMemo);
Visual Basic 6.0
' hDatabase comes from section 2 Dim ufd_res As UFD_STATUS Dim UserID As String Dim FingerIndex As Long Dim Template1(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template1Size As Long Dim Template2(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template2Size As Long Dim Memo As String ' ' ' ' ' Get Get Get Get Get UserID from user FingerIndex from user Template1 from scanner or image or database Template2 from scanner or image or database Memo from user
' Add data ufd_res = UFD_AddData(hDatabase, UserID, FingerIndex, Template1(0), Template1Size, Template2(0), Template2Size, Memo)
Visual C#
// Database comes from section 2 UFD_STATUS ufd_res; string UserID; int FingerIndex; byte[] Template1 = new byte[MAX_TEMPLATE_SIZE]; int Template1Size; byte[] Template2 = new byte[MAX_TEMPLATE_SIZE]; int Template2Size; string Memo; // // // // // Get Get Get Get Get strUserID from user nFingerIndex from user Template1 from scanner or image or database Template2 from scanner or image or database strMemo from user
// Add data ufd_res = Database.AddData(UserID, FingerIndex, Template1, Template1Size, Template2, Template2Size, Memo); 30 Confidencial
' Database comes from section 2 Dim ufd_res As UFD_STATUS Dim UserID As String Dim FingerIndex As Integer Dim Template1 As Byte() = New Byte(MAX_TEMPLATE_SIZE) {} Dim Template1Size As Integer = Nothing Dim Template2 As Byte() = New Byte(MAX_TEMPLATE_SIZE) {} Dim Template2Size As Integer = Nothing Dim Memo As String ' ' ' ' ' Get Get Get Get Get UserID from user FingerIndex from user Template1 from scanner or image or database Template2 from scanner or image or database Memo from user
' Add data ufd_res = Database.AddData(UserID, FingerIndex, Template1, Template1Size, Template2, Template2Size, Memo)
// hDatabase comes from section 2 UFD_STATUS ufd_res; int nSerial; CString strUserID; int nFingerIndex; unsigned char Template1[MAX_TEMPLATE_SIZE]; int Template1Size; unsigned char Template2[MAX_TEMPLATE_SIZE]; int Template2Size; CString strMemo; // Get data ufd_res = UFD_GetDataByIndex(hDatabase, 0, nSerial, strUserID, nFingerIndex, Template1, Template1Size, Template2, Template2Size, strMemo);
Visual Basic 6.0
' hDatabase comes from section 2 Dim ufd_res As UFD_STATUS Dim Serial As Long Dim UserID As String 31 Confidencial
Manual de Referencia SDK BioMini Dim Dim Dim Dim Dim Dim FingerIndex As Long Template1(MAX_TEMPLATE_SIZE - 1) As Byte Template1Size As Long Template2(MAX_TEMPLATE_SIZE - 1) As Byte Template2Size As Long Memo As String
' Get data ufd_res = UFD_GetDataByIndex(hDatabase, 0, Serial, UserID, FingerIndex, Template1(0), Template1Size, Template2(0), Template2Size, Memo)
Visual C#
// Database comes from section 2 UFD_STATUS ufd_res; int Serial; string UserID; int FingerIndex; byte[] Template1 = new byte[MAX_TEMPLATE_SIZE]; int Template1Size; byte[] Template2 = new byte[MAX_TEMPLATE_SIZE]; int Template2Size; string Memo; // Add data ufd_res = Database.GetDataByIndex(UserID, 0, out Serial, out FingerIndex, Template1, out Template1Size, Template2, out Template2Size, out Memo);
Visual Basic .NET
' Database comes from section 2 Dim ufd_res As UFD_STATUS Dim Serial As Integer Dim UserID As String Dim FingerIndex As Integer Dim Template1 As Byte() = New Byte(MAX_TEMPLATE_SIZE) {} Dim Template1Size As Integer = Nothing Dim Template2 As Byte() = New Byte(MAX_TEMPLATE_SIZE) {} Dim Template2Size As Integer = Nothing Dim Memo As String ' Get data ufd_res = Database.GetDataByIndex(UserID, 0, Serial, FingerIndex, Template1, Template1Size, Template2, Template2Size, Memo)
32 Confidencial
// hDatabase comes from section 2 UFD_STATUS ufd_res; // Close database ufd_res = UFD_Close(hDatabase);
Visual Basic 6.0
' hDatabase comes from section 2 Dim ufd_res As UFD_STATUS ' Close database ufd_res = UFD_Close(hDatabase)
Visual C#
// Database comes from section 2 UFS_STATUS ufd_res; // Close database ufd_res = Database.Close();
Visual Basic .NET
' Database comes from section 2 Dim ufd_res As UFD_STATUS ' Close database ufd_res = Database.Close()
33 Confidencial
4. Ejemplos.
El SDK UF300/BioMIni contiene diversos ejemplos de aplicaciones: Proyecto UFR30_Demo UFE30_DatabaseDemo UFE30_MultiScannerDemo Descripcin Provee el manejo bsico acerca del uso de los lectores para el enrolamiento, verificacin e identificacin de huellas. Provee una demostracin de cmo administrar las huellas en la base de datos. Provee un ejemplo de cmo emplear diversos lectores simultneamente.
Para emplear las aplicaciones de ejemplo: Conecte el lector de huella a la PC Instale el driver del lector (install\drivers) correspondiente al lector que emplee. Confirme que los DLL del SDK se encuentren en el mismo directorio del ejecutable del ejemplo o los DLL estn instalados en la carpeta System de Windows. Confirme que el archivo de licencia (UFLicense.DAT) se encuentre en el mismo directorio donde se encuentran los DLL del SDK.
34 Confidencial
UFE30_Demo
UFE30_Demo provee el manejo bsico acerca del uso de los lectores para el enrolamiento, verificacin e identificacin de huellas. Este programa emplea los mdulos UFScanner y UFMatcher.
Productos requeridos.
Products BioMini SDK Remarks No restriction
Lenguajes disponibles.
Languages Visual C++ 6.0 Visual Basic 6.0 Visual C# Visual Basic .NET Locations samples\VS60\UFE30_DemoVC60 samples\VS60\UFE30_DemoVB60 samples\VS80\UFE30_DemoCS samples\VS80\UFE30_DemoVBNET
35 Confidencial
UFE30_DatabaseDemo
UFE30_DatabaseDemo Provee una demostracin de cmo administrar las huellas en la base de datos. Este programa emplea los mdulos UFDatabase, UFScanner,y UFMatcher.
Required products
Products Suprema BioMini SDK Remarks No restriction
Lenguajes disponibles.
Languages Visual C++ 6.0 Visual Basic 6.0 Visual C# Visual Basic .NET Locations samples\VS60\UFE30_DatabaseDemoVC60 samples\VS60\UFE30_DatabaseDemoVB60 samples\VS80\UFE30_DatabaseDemoCS samples\VS80\UFE30_DatabaseDemoVBNET
36 Confidencial
UFE30_MultiScannerDemo
UFE30_MultiScannerDemo Provee un ejemplo de cmo emplear diversos lectores simultneamente. Este programa emplea los mdulos UFScanner y UFMatcher..
Productos requeridos
Products Suprema BioMini SDK Remarks No restriction
Lenguajes disponibles.
Languages Visual C++ 6.0 Locations samples\VS60\UFE30_MuliScannerDemoVC60
37 Confidencial
5. Referencias
Este captulo contiene las referencias de todos los mdulos incluidos en el SDK UF300/BioMini para su uso por parte de los desarrolladores en los siguientes lenguajes.
Los APIs son descritos usando lenguaje C. Los Mdulos son creados usando Visual C++ 6.0 y son compatibles con Visual C++ 7.0 / 7.1 / 8.0 o superior.
Para interpretar el estilo de C/C++ de los API, se provee en el SDK de una Librera de Tipos (Type Library) para Visual Basic (bin\Suprema.tlb). Los usuarios pueden agregar esta librera a sus proyectos usando en la seccin de Referencias el botn de Examinar. Como la librera de tipos es un traductor de los mdulos del SDK, no se han agregado referencias distintas a la librera de tipos requeridos por los DLL. La definicin de los parmetros de la librera pueden ser visualizados usando el Visor de Objetos (Object Browser) y pueden ser empleados como esta descrito en el tutorial o los ejemplos.
1)
38 Confidencial
Mdulo UFScanner
El modulo UFScanner provee la funcionalidad para la administracin de los lectores, la captura de imgenes desde los lectores, extraccin de templates generados desde la captura de imgenes desde los lectores, entre otros.
Requerimientos
Visual C++
Scanners soportados
Scanner UF300 UF300(Ver.2) BioMini Scanner name in module SFR200 SFR300v2 / SFR300-S(Ver.2) SFR300v2 / SFR300-S(Ver.2) Support for multi-device No Si Si
39 Confidencial
Definitions
Parameters
UFS_GetParameter(), UFS_SetParameter() functions use parameters defined as follows,
40 Confidencial
Parameter value definition UFS_PARAM_TIMEOUT UFS_PARAM_BRIGHTNESS UFS_PARAM_SENSITIVITY UFS_PARAM_SERIAL UFS_PARAM_DETECT_CORE UFS_PARAM_TEMPLATE_SIZE UFS_PARAM_USE_SIF
Meaning Timeout (millisecond unit) (0: infinite) Brightness (0 ~ 255); Higher value means darker image Sensitivity (0 ~ 7); Higher value means more sensitive Serial (get only) Detect core (0: not use core, 1: use core) Template size (byte unit) (256 ~ 1024, 32 bytes step size) Use SIF (0: not use SIF, 1: use SIF)
0 384 0
Scanner type
UFS_GetScannerType() function gives type values defined as follows, Scanner type definition UFS_SCANNER_TYPE_SFR200 UFS_SCANNER_TYPE_SFR300 UFS_SCANNER_TYPE_SFR300v2 Code 1001 1002 1003 Meaning Suprema SFR200 Suprema SFR300-S Suprema SFR300-S(Ver.2)
Scanner handle
HUFScanner defines handle to UFScanner object. typedef void* HUFScanner;
41 Confidencial
Manual de Referencia SDK BioMini Parameters szScannerID bSensorOn pParam ID of the scanner which is occurred this event 1: scanner is connected, 0: scanner is disconnected Receives the scanner callback data passed to the UFS_SetScannerCallback function using the pParam parameter
42 Confidencial
UFS_Init
Initializes scanner module.
UFS_STATUS UFS_API UFS_Init();
Possible return values UFS_OK, UFS_ERROR, UFS_ERR_ALREADY_INITIALIZED, UFS_ERR_NO_LICENSE, UFS_ERR_LICENSE_NOT_MATCH, UFS_ERR_LICENSE_EXPIRED, UFS_ERR_DEVICE_NUMBER_EXCEED See also UFS_Update, UFS_Uninit Examples
Visual C++
UFS_STATUS ufs_res; ufs_res = UFS_Init(); if (ufs_res == UFS_OK) { // UFS_Init is succeeded } else { // UFS_Init is failed // Use UFS_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufs_res As UFS_STATUS ufs_res = UFS_Init() If (ufs_res = UFS_STATUS.OK) Then ' UFS_Init is succeeded Else ' UFS_Init is failed ' Use UFS_GetErrorString function to show error string End If
43 Confidencial
UFS_Update
Enforces scanner module to update current connectivity of scanners. UFS_STATUS UFS_API UFS_Update(); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_NOT_INITIALIZED, UFS_ERR_NO_LICENSE, UFS_ERR_LICENSE_NOT_MATCH, UFS_ERR_LICENSE_EXPIRED, UFS_ERR_DEVICE_NUMBER_EXCEED See also UFS_Init, UFS_Uninit Examples
Visual C++
UFS_STATUS ufs_res; ufs_res = UFS_Update(); if (ufs_res == UFS_OK) { // UFS_Update is succeeded } else { // UFS_Update is failed // Use UFS_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufs_res As UFS_STATUS ufs_res = UFS_Update() If (ufs_res = UFS_STATUS.OK) Then ' UFS_Update is succeeded Else ' UFS_Update is failed ' Use UFS_GetErrorString function to show error string End If
44 Confidencial
UFS_Uninit
Un-initializes scanner module. UFS_STATUS UFS_API UFS_Uninit(); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_NOT_INITIALIZED, UFS_ERR_NO_LICENSE, UFS_ERR_LICENSE_NOT_MATCH, UFS_ERR_LICENSE_EXPIRED, UFS_ERR_DEVICE_NUMBER_EXCEED See also UFS_Init, UFS_Update Examples
Visual C++
UFS_STATUS ufs_res; ufs_res = UFS_Uninit(); if (ufs_res == UFS_OK) { // UFS_Uninit is succeeded } else { // UFS_Uninit is failed // Use UFS_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufs_res As UFS_STATUS ufs_res = UFS_Uninit() If (ufs_res = UFS_STATUS.OK) Then ' UFS_Update is succeeded Else ' UFS_Update is failed ' Use UFS_GetErrorString function to show error string End If
45 Confidencial
UFS_SetScannerCallback
Registers scanner callback function. Scanner callback is not working for every scanner model. Currently this function is working for Suprema SFR300-S(Ver.2) in windows 2000 / 2003 / XP only. UFS_STATUS UFS_API UFS_SetScannerCallback( UFS_SCANNER_PROC* pScannerProc, void* pParam ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_INVALID_PARAMETERS Parameters pScannerProc pParam Remarks This function is not supported on Visual Basic 6.0. See also UFS_RemoveScannerCallback Examples
Visual C++
[in] Handle to the UFS_SCANNER_PROC function which receives scanner events [in] Pointer to the scanner callback data which will be transmitted with a scanner callback event
// Define scanner procedure int UFS_CALLBACK ScannerProc(const char* szScannerID, int bSensorOn, void* pParam) { // ... } UFS_STATUS ufs_res; void* pParam; // Assign pParam, for example, application data ufs_res = UFS_SetScannerCallback(ScannerProc, pParam); if (ufs_res == UFS_OK) { 46 Confidencial
Manual de Referencia SDK BioMini // UFS_SetScannerCallback is succeeded } else { // UFS_SetScannerCallback is failed // Use UFS_GetErrorString function to show error string }
47 Confidencial
UFS_RemoveScannerCallback
Removes registered scanner callback function. UFS_STATUS UFS_API UFS_RemoveScannerCallback(); Possible return values UFS_OK, UFS_ERROR Remarks This function is not supported on Visual Basic 6.0. See also UFS_SetScannerCallback Examples
Visual C++
UFS_STATUS ufs_res; ufs_res = UFS_RemoveScannerCallback(); if (ufs_res == UFS_OK) { // UFS_RemoveScannerCallback is succeeded } else { // UFS_RemoveScannerCallback is failed // Use UFS_GetErrorString function to show error string }
48 Confidencial
UFS_GetScannerNumber
Gets the number of scanners. UFS_STATUS UFS_API UFS_GetScannerNumber( int* pnScannerNumber ); Possible return values UFS_OK, UFS_ERROR Parameters pnScannerNumber See also UFS_GetScannerHandle, UFS_GetScannerIndex Examples
Visual C++
UFS_STATUS ufs_res; int nScannerNumber; ufs_res = UFS_GetScannerNumber(&nScannerNumber); if (ufs_res == UFS_OK) { // UFS_GetScannerNumber is succeeded } else { // UFS_GetScannerNumber is failed // Use UFS_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufs_res As UFS_STATUS Dim nScannerNumber As Long ufs_res = UFS_GetScannerNumber(nScannerNumber) If (ufs_res = UFS_STATUS.OK) Then ' UFS_GetScannerNumber is succeeded Else ' UFS_GetScannerNumber is failed ' Use UFS_GetErrorString function to show error string End If 49 Confidencial
50 Confidencial
UFS_GetScannerHandle
Gets scanner handle using scanner index. UFS_STATUS UFS_API UFS_GetScannerHandle( int nScannerIndex, HUFScanner* phScanner ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_INVALID_PARAMETERS Parameters nScannerIndex phScanner See also UFS_GetScannerNumber, UFS_GetScannerIndex Examples
Visual C++
[in] Scanner index (0 ~ number of scanners - 1) [out] Pointer to handle of the scanner object
UFS_STATUS ufs_res; int nScannerIndex; HUFScanner hScanner; // Set nScannerIndex to (0 ~ number of scanners - 1 ) // Number of scanner can be retrieved using UFS_GetScannerNumber function ufs_res = UFS_GetScannerHandle(nScannerIndex, &hScanner); if (ufs_res == UFS_OK) { // UFS_GetScannerHandle is succeeded } else { // UFS_GetScannerHandle is failed // Use UFS_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufs_res As UFS_STATUS Dim nScannerIndex As Long Dim hScanner As Long ' Set nScannerIndex to (0 ~ number of scanners - 1 ) 51 Confidencial
Manual de Referencia SDK BioMini ' Number of scanner can be retrieved using UFS_GetScannerNumber function ufs_res = UFS_GetScannerHandle(nScannerIndex, hScanner) If (ufs_res = UFS_STATUS.OK) Then ' UFS_GetScannerHandle is succeeded Else ' UFS_GetScannerHandle is failed ' Use UFS_GetErrorString function to show error string End If
52 Confidencial
UFS_GetScannerHandleByID
Gets scanner handle using scanner ID. UFS_STATUS UFS_API UFS_GetScannerHandleByID( const char* szScannerID, HUFScanner* phScanner ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_INVALID_PARAMETERS Parameters szScannerID phScanner See also UFS_GetScannerID Examples
Visual C++
UFS_STATUS ufs_res; char strID[64]; HUFScanner hScanner; // Assign scanner ID to strID // Scanner ID can be retrieved using UFS_GetScannerID function ufs_res = UFS_GetScannerHandleByID(strID, &hScanner); if (ufs_res == UFS_OK) { // UFS_GetScannerHandleByID is succeeded } else { // UFS_GetScannerHandleByID is failed // Use UFS_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufs_res As UFS_STATUS Dim strID As String Dim hScanner As Long ' Assign scanner ID to strID 53 Confidencial
Manual de Referencia SDK BioMini ' Scanner ID can be retrieved using UFS_GetScannerID function ufs_res = UFS_GetScannerHandleByID(strID, hScanner) If (ufs_res = UFS_STATUS.OK) Then ' UFS_GetScannerHandleByID is succeeded Else ' UFS_GetScannerHandleByID is failed ' Use UFS_GetErrorString function to show error string End If
54 Confidencial
UFS_GetScannerIndex
Gets scanner index assigned to scanner handle. UFS_STATUS UFS_API UFS_GetScannerIndex( HUFScanner hScanner, int* pnScannerIndex ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_INVALID_PARAMETERS Parameters hScanner pnScannerIndex See also UFS_GetScannerNumber, UFS_GetScannerHandle Examples
Visual C++
[in] Handle to the scanner object [out] Receive scanner index of specified scanner handle
UFS_STATUS ufs_res; HUFScaner hScanner; int nScannerIndex; // Get hScanner handle ufs_res = UFS_GetScannerIndex(hScanner, &nScannerIndex); if (ufs_res == UFS_OK) { // UFS_GetScannerIndex is succeeded } else { // UFS_GetScannerIndex is failed // Use UFS_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufs_res As UFS_STATUS Dim hScanner As Long Dim nScannerIndex As Long ' Get hScanner handle
55 Confidencial
Manual de Referencia SDK BioMini ufs_res = UFS_GetScannerIndex(hScanner, nScannerIndex) If (ufs_res = UFS_STATUS.OK) Then ' UFS_GetScannerIndex is succeeded Else ' UFS_GetScannerIndex is failed ' Use UFS_GetErrorString function to show error string End If
56 Confidencial
UFS_GetScannerID
Gets scanner ID assigned to scanner handle. UFS_STATUS UFS_API UFS_GetScannerID( HUFScanner hScanner, char* szScannerID ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_INVALID_PARAMETERS Parameters hScanner szScannerID [in] Handle to the scanner object [out] Receive scanner ID of specified scanner handle; Scanner ID has maximum 32 characters. szScannerID must be allocated in user's applications and allocated size must be larger than 33 bytes for considering null character in 33th byte position.
UFS_STATUS ufs_res; HUFScaner hScanner; char strID[64]; // Should be larger than 33 bytes // Get hScanner handle ufs_res = UFS_GetScannerID(hScanner, strID); if (ufs_res == UFS_OK) { // UFS_GetScannerID is succeeded } else { // UFS_GetScannerID is failed // Use UFS_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufs_res As UFS_STATUS Dim hScanner As Long Dim strID As String // In Visual basic, string is assigned from the SDK 57 Confidencial
' Get hScanner handle ufs_res = UFS_GetScannerID(hScanner, strID) If (ufs_res = UFS_STATUS.OK) Then ' UFS_GetScannerID is succeeded Else ' UFS_GetScannerID is failed ' Use UFS_GetErrorString function to show error string End If
58 Confidencial
UFS_GetScannerType
Gets scanner type assigned to scanner handle. UFS_STATUS UFS_API UFS_GetScannerType( HUFScanner hScanner, int* pnScannerType ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_INVALID_PARAMETERS Parameters hScanner pnScannerType Examples
Visual C++
[in] Handle to the scanner object [out] Receives one of scanner type
UFS_STATUS ufs_res; HUFScaner hScanner; int nScannerType; // Get hScanner handle ufs_res = UFS_GetScannerType(hScanner, &nScannerType); if (ufs_res == UFS_OK) { // UFS_GetScannerType is succeeded } else { // UFS_GetScannerType is failed // Use UFS_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufs_res As UFS_STATUS Dim hScanner As Long Dim nScannerType As Long ' Get hScanner handle ufs_res = UFS_GetScannerType(hScanner, nScannerType) If (ufs_res = UFS_STATUS.OK) Then ' UFS_GetScannerType is succeeded Else 59 Confidencial
Manual de Referencia SDK BioMini ' UFS_GetScannerType is failed ' Use UFS_GetErrorString function to show error string End If
60 Confidencial
UFS_GetParameter
Gets parameter value. UFS_STATUS UFS_API UFS_GetParameter( HUFScanner hScanner, int nParam, void* pValue ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_INVALID_PARAMETERS Parameters hScanner nParam pValue See also UFS_SetParameter Examples
Visual C++
[in] Handle to the scanner object [in] Parameter type; one of parameters [out] Receives parameter value of specified parameter type; pValue must point to adequate storage type matched to parameter type
UFS_STATUS ufs_res; HUFScaner hScanner; int nValue; char strSerial[64]; // Get hScanner handle // Get timeout ufs_res = UFS_GetParameter(hScanner, UFS_PARAM_TIMEOUT, &nValue); // Error handling routine is omitted // Get brightness ufs_res = UFS_GetParameter(hScanner, UFS_PARAM_BRIGHTNESS, &nValue); // Error handling routine is omitted // Get sensitivity ufs_res = UFS_GetParameter(hScanner, UFS_PARAM_SENSITIVITY, &nValue); // Error handling routine is omitted 61 Confidencial
// Get serial ufs_res = UFS_GetParameter(hScanner, UFS_PARAM_SERIAL, strSerial); // Error handling routine is omitted // Get detect core ufs_res = UFS_GetParameter(hScanner, UFS_PARAM_DETECT_CORE, &nValue); // Error handling routine is omitted // Get template size ufs_res = UFS_GetParameter(hScanner, UFS_PARAM_TEMPLATE_SIZE, &nValue); // Error handling routine is omitted // Get use SIF ufs_res = UFS_GetParameter(hScanner, UFS_PARAM_USE_SIF, &nValue); // Error handling routine is omitted
Visual Basic 6.0
Dim ufs_res As UFS_STATUS Dim hScanner As Long Dim nValue As Long Dim strSerial As String ' Get hScanner handle ' Get timeout ufs_res = UFS_GetParameter(hScanner, UFS_PARAM.TIMEOUT, nValue) ' Error handling routine is omitted ' Get brightness ufs_res = UFS_GetParameter(hScanner, UFS_PARAM.BRIGHTNESS, nValue) ' Error handling routine is omitted ' Get sensitivity ufs_res = UFS_GetParameter(hScanner, UFS_PARAM.SENSITIVITY, nValue) ' Error handling routine is omitted ' Get serial ' Caution: for get serial, UFS_GetParameter_B is used ufs_res = UFS_GetParameter_B(hScanner, UFS_PARAM.SERIAL, strSerial) ' Error handling routine is omitted ' Get detect core ufs_res = UFS_GetParameter(hScanner, UFS_PARAM.DETECT_CORE, nValue) ' Error handling routine is omitted
62 Confidencial
Manual de Referencia SDK BioMini ' Get template size ufs_res = UFS_GetParameter(hScanner, UFS_PARAM.TEMPLATE_SIZE, nValue) ' Error handling routine is omitted ' Get use SIF ufs_res = UFS_GetParameter(hScanner, UFS_PARAM.USE_SIF, nValue) ' Error handling routine is omitted
63 Confidencial
UFS_SetParameter
Sets parameter value. UFS_STATUS UFS_API UFS_SetParameter( HUFScanner hScanner, int nParam, void* pValue ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_INVALID_PARAMETERS Parameters hScanner nParam pValue See also UFS_GetParameter Examples
Visual C++
[in] Handle to the scanner object [in] Parameter type; one of parameters [in] Pointer to parameter value of specified parameter type; pValue must point to adequate storage type matched to parameter type
UFS_STATUS ufs_res; HUFScaner hScanner; int nValue; // Get hScanner handle // Set timeout to nValue ufs_res = UFS_SetParameter(hScanner, UFS_PARAM_TIMEOUT, &nValue); // Error handling routine is omitted // Set brightness to nValue ufs_res = UFS_SetParameter(hScanner, UFS_PARAM_BRIGHTNESS, &nValue); // Error handling routine is omitted // Set sensitivity to nValue ufs_res = UFS_SetParameter(hScanner, UFS_PARAM_SENSITIVITY, &nValue); // Error handling routine is omitted 64 Confidencial
Manual de Referencia SDK BioMini // Set detect core to nValue ufs_res = UFS_SetParameter(hScanner, UFS_PARAM_DETECT_CORE, &nValue); // Error handling routine is omitted // Set template size to nValue ufs_res = UFS_SetParameter(hScanner, UFS_PARAM_TEMPLATE_SIZE, &nValue); // Error handling routine is omitted // Set use SIF to nValue ufs_res = UFS_SetParameter(hScanner, UFS_PARAM_USE_SIF, &nValue); // Error handling routine is omitted
Visual Basic 6.0
Dim ufs_res As UFS_STATUS Dim hScanner As Long Dim nValue As Long ' Get hScanner handle ' Set timeout to nValue ufs_res = UFS_SetParameter(hScanner, UFS_PARAM.TIMEOUT, nValue) ' Error handling routine is omitted ' Set brightness to nValue ufs_res = UFS_SetParameter(hScanner, UFS_PARAM.BRIGHTNESS, nValue) ' Error handling routine is omitted ' Set sensitivity to nValue ufs_res = UFS_SetParameter(hScanner, UFS_PARAM.SENSITIVITY, nValue) ' Error handling routine is omitted ' Set detect core to nValue ufs_res = UFS_SetParameter(hScanner, UFS_PARAM.DETECT_CORE, nValue) ' Error handling routine is omitted ' Set template size to nValue ufs_res = UFS_SetParameter(hScanner, UFS_PARAM.TEMPLATE_SIZE, nValue) ' Error handling routine is omitted ' Set use SIF to nValue ufs_res = UFS_SetParameter(hScanner, UFS_PARAM.USE_SIF, nValue) ' Error handling routine is omitted
65 Confidencial
UFS_IsSensorOn
Checks the scanner is connected or not. UFS_STATUS UFS_API UFS_IsSensorOn( HUFScanner hScanner, int* pbSensorOn ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_INVALID_PARAMETERS Parameters hScanner pbSensorOn Examples
Visual C++
[in] Handle to the scanner object [out] Receive the status of specified scanner object; 1: the scanner is connected, 0: the scanner is disconnected
UFS_STATUS ufs_res; HUFScaner hScanner; int bSensorOn; // Get hScanner handle ufs_res = UFS_IsSensorOn(hScanner, &bSensorOn); if (ufs_res == UFS_OK) { // UFS_IsSensorOn is succeeded } else { // UFS_IsSensorOn is failed // Use UFS_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufs_res As UFS_STATUS Dim hScanner As Long Dim bSensorOn As Long ' Get hScanner handle ufs_res = UFS_IsSensorOn(hScanner, bSensorOn) If (ufs_res = UFS_STATUS.OK) Then ' UFS_IsSensorOn is succeeded 66 Confidencial
Manual de Referencia SDK BioMini Else ' UFS_IsSensorOn is failed ' Use UFS_GetErrorString function to show error string End If
67 Confidencial
UFS_IsFingerOn
Checks a finger is placed on the scanner or not. UFS_STATUS UFS_API UFS_IsFingerOn( HUFScanner hScanner, int* pbFingerOn ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_INVALID_PARAMETERS Parameters hScanner pbFingerOn Examples
Visual C++
[in] Handle to the scanner object [out] Checks if a finger is placed on the specified scanner; 1: a finger is on the scanner, 0: a finger is not on the scanner
UFS_STATUS ufs_res; HUFScaner hScanner; int bFingerOn; // Get hScanner handle ufs_res = UFS_IsFingerOn(hScanner, &bFingerOn); if (ufs_res == UFS_OK) { // UFS_IsFingerOn is succeeded } else { // UFS_IsFingerOn is failed // Use UFS_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufs_res As UFS_STATUS Dim hScanner As Long Dim bFingerOn As Long ' Get hScanner handle ufs_res = UFS_IsFingerOn(hScanner, bFingerOn) 68 Confidencial
Manual de Referencia SDK BioMini If (ufs_res = UFS_STATUS.OK) Then ' UFS_IsFingerOn is succeeded Else ' UFS_IsFingerOn is failed ' Use UFS_GetErrorString function to show error string End If
69 Confidencial
UFS_CaptureSingleImage
Captures single image. Captured image is stored to the internal buffer. UFS_STATUS UFS_API UFS_CaptureSingleImage( HUFScanner hScanner, ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_INVALID_PARAMETERS, UFS_ERR_CAPTURE_RUNNING Parameters hScanner See also UFS_IsCapturing, UFS_GetCaptureImageBufferInfo, UFS_GetCaptureImageBuffer, UFS_DrawCaptureImageBuffer, UFS_SaveCaptureImageBufferToBMP, UFS_ClearCaptureImageBuffer Examples
Visual C++
UFS_STATUS ufs_res; HUFScaner hScanner; // Get hScanner handle ufs_res = UFS_CaptureSingleImage(hScanner); if (ufs_res == UFS_OK) { // UFS_CaptureSingleImage is succeeded } else { // UFS_CaptureSingleImage is failed // Use UFS_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufs_res As UFS_STATUS Dim hScanner As Long ' Get hScanner handle ufs_res = UFS_CaptureSingleImage(hScanner) 70 Confidencial
Manual de Referencia SDK BioMini If (ufs_res = UFS_STATUS.OK) Then ' UFS_CaptureSingleImage is succeeded Else ' UFS_CaptureSingleImage is failed ' Use UFS_GetErrorString function to show error string End If
71 Confidencial
UFS_StartCapturing
Starts capturing. Currently this function is working for Suprema SFR300-S(Ver.2) only. UFS_STATUS UFS_API UFS_StartCapturing( HUFScanner hScanner, UFS_CAPTURE_PROC* pCaptureProc, void* pParam ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_NOT_SUPPORTED, UFS_ERR_INVALID_PARAMETERS, UFS_ERR_CAPTURE_RUNNING Parameters hScanner pCaptureProc pParam Remarks This function is not supported on Visual Basic 6.0. Supported scanners Suprema SFR300-S(Ver.2) See also UFS_IsCapturing, UFS_AbortCapturing, UFS_GetCaptureImageBufferInfo, UFS_GetCaptureImageBuffer, UFS_DrawCaptureImageBuffer, UFS_SaveCaptureImageBufferToBMP, UFS_ClearCaptureImageBuffer Examples
Visual C++
[in] Handle to the scanner object [in] Handle to the UFS_CAPTURE_PROC function which receives capture events [in] Pointer to the capture callback data which will be transmitted with a capture callback event
// Define capture procedure int UFS_CALLBACK CaptureProc(HUFScanner hScanner, int bFingerOn, unsigned char* pImage, int nWidth, int nHeight, int nResolution, void* pParam) { // ... } 72 Confidencial
UFS_STATUS ufs_res; HUFScaner hScanner; void* pParam; // Get hScanner handle // Assign pParam, for example, application data ufs_res = UFS_StartCapturing(hScanner, CaptureProc, pParam); if (ufs_res == UFS_OK) { // UFS_StartCapturing is succeeded } else { // UFS_StartCapturing is failed // Use UFS_GetErrorString function to show error string }
73 Confidencial
UFS_IsCapturing
Checks if the specified scanner is running capturing which is started by UFS_CaptureSingleImage or UFS_StartCapturing. UFS_STATUS UFS_API UFS_IsCapturing( HUFScanner hScanner, int* pbCapturing ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_INVALID_PARAMETERS Parameters hScanner pbCapturing See also UFS_CaptureSingleImage, UFS_StartCapturing Examples
Visual C++
[in] Handle to the scanner object [out] Checks if the specified scanner is running capturing; 1: the capture is running, 0: the capture is not running
UFS_STATUS ufs_res; HUFScaner hScanner; int bCapturing; // Get hScanner handle ufs_res = UFS_IsCapturing(hScanner, &bCapturing); if (ufs_res == UFS_OK) { // UFS_IsCapturing is succeeded } else { // UFS_IsCapturing is failed // Use UFS_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufs_res As UFS_STATUS Dim hScanner As Long Dim bCapturing As Long 74 Confidencial
Manual de Referencia SDK BioMini ' Get hScanner handle ufs_res = UFS_IsSensorOn(hScanner, bCapturing) If (ufs_res = UFS_STATUS.OK) Then ' UFS_IsCapturing is succeeded Else ' UFS_IsCapturing is failed ' Use UFS_GetErrorString function to show error string End If
75 Confidencial
UFS_AbortCapturing
Aborts capturing which is started by UFS_CaptureSingleImage or UFS_StartCapturing. UFS_STATUS UFS_API UFS_AbortCapturing( HUFScanner hScanner, ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_NOT_SUPPORTED, UFS_ERR_INVALID_PARAMETERS Parameters hScanner See also UFS_CaptureSingleImage, UFS_StartCapturing, UFS_IsCapturing Examples
Visual C++
UFS_STATUS ufs_res; HUFScaner hScanner; // Get hScanner handle // Start capturing ufs_res = UFS_AbortCapturing(hScanner); if (ufs_res == UFS_OK) { // UFS_AbortCapturing is succeeded } else { // UFS_AbortCapturing is failed // Use UFS_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufs_res As UFS_STATUS Dim hScanner As Long ' Get hScanner handle ' Start capturing 76 Confidencial
ufs_res = UFS_AbortCapturing(hScanner) If (ufs_res = UFS_STATUS.OK) Then ' UFS_AbortCapturing is succeeded Else ' UFS_AbortCapturing is failed ' Use UFS_GetErrorString function to show error string End If
77 Confidencial
UFS_Extract
Extracts a template from the stored image buffer which is acquired using UFS_CaptureSingleImage() or UFS_StartCapturing(). UFS_STATUS UFS_API UFS_Extract( HUFScanner hScanner, unsigned char* pTemplate, int* pnTemplateSize, int* pnEnrollQuality ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_LICENSE_EXPIRED, UFS_ERR_LICENSE_NOT_MATCH, UFS_ERR_INVALID_PARAMETERS, UFS_ERR_NOT_GOOD_IMAGE, UFS_ERR_EXTRACTION_FAILED, UFS_ERR_CORE_NOT_DETECTED, UFS_ERR_CORE_TO_LEFT, UFS_ERR_CORE_TO_LEFT_TOP, UFS_ERR_CORE_TO_TOP, UFS_ERR_CORE_TO_RIGHT_TOP, UFS_ERR_CORE_TO_RIGHT, UFS_ERR_CORE_TO_RIGHT_BOTTOM, UFS_ERR_CORE_TO_BOTTOM, UFS_ERR_CORE_TO_LEFT_BOTTOM Parameters hScanner pTemplate pnTemplateSize pnEnrollQuality [in] Handle to the scanner object [out] Pointer to the template array; The array must be allocated in advance [out] Receives the size (in bytes) of pTemplate [out] Receives the quality of enrollment; Quality value ranges from 1 to 100. Typically this value should be above 30 for further processing such as enroll and matching. Especially in case of enrollment, the use of good quality image ( above 50 ) is highly recommended.
// Template size can be controlled using UFS_SetParameter function // Default value is 384 bytes #define MAX_TEMPLATE_SIZE 384 UFS_STATUS ufs_res; 78 Confidencial
Manual de Referencia SDK BioMini HUFScaner hScanner; unsigned char Template[MAX_TEMPLATE_SIZE]; int TemplateSize; int nEnrollQuality; // Get hScanner handle ufs_res = UFS_Extract(hScanner, Template, &TemplateSize, &nEnrollQuality); if (ufs_res == UFS_OK) { // UFS_Extract is succeeded } else { // UFS_Extract is failed // Use UFS_GetErrorString function to show error string }
Visual Basic 6.0
' Template size can be controlled using UFS_SetParameter function ' Default value is 384 bytes Const MAX_TEMPLATE_SIZE As Long = 384 Dim ufs_res As UFS_STATUS Dim hScanner As Long Dim Template(MAX_TEMPLATE_SIZE - 1) As Byte Dim TemplateSize As Long Dim EnrollQuality As Long ' Get hScanner handle ufs_res = UFS_Extract(hScanner, Template(0), TemplateSize, EnrollQuality) If (ufs_res = UFS_STATUS.OK) Then ' UFS_Extract is succeeded Else ' UFS_Extract is failed ' Use UFS_GetErrorString function to show error string End If
79 Confidencial
UFS_SetEncryptionKey
Sets encryption key. UFS_STATUS UFS_API UFS_SetEncryptionKey( HUFScanner hScanner, unsigned char* pKey ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_INVALID_PARAMETERS Parameters hScanner pKey See also UFS_EncryptTemplate, UFS_DecryptTemplate Examples
Visual C++
[in] Handle to the scanner object [in] Pointer to the 32 bytes key array; default key is first byte is 1 and second to 32th byte are all 0
UFS_STATUS ufs_res; HUFScaner hScanner; unsigned char UserKey[32]; // Get hScanner handle // Generate 32 byte encryption key to UserKey ufs_res = UFS_SetEncryptionKey(hScanner, UserKey); if (ufs_res == UFS_OK) { // UFS_SetEncryptionKey is succeeded } else { // UFS_SetEncryptionKey is failed // Use UFS_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufs_res As UFS_STATUS Dim hScanner As Long Dim UserKey(32 - 1) As Byte 80 Confidencial
' Get hScanner handle ' Generate 32 byte encryption key to UserKey ufs_res = UFS_SetEncryptionKey(hScanner, UserKey) If (ufs_res = UFS_STATUS.OK) Then ' UFS_SetEncryptionKey is succeeded Else ' UFS_SetEncryptionKey is failed ' Use UFS_GetErrorString function to show error string End If
81 Confidencial
UFS_EncryptTemplate
Encrypts template. UFS_STATUS UFS_API UFS_EncryptTemplate( HUFScanner hScanner, unsigned char* pTemplateInput, int nTemplateInputSize, unsigned char* pTemplateOutput, int* pnTemplateOutputSize ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_INVALID_PARAMETERS Parameters hScanner pTemplateInput nTemplateInputSize pTemplateOutput pnTemplateOutputSize See also UFS_SetEncryptionKey, UFS_DecryptTemplate Examples
Visual C++
[in] Handle to the scanner object [in] Pointer to input template array [in] Input template size [out] Pointer to output template array [in / out] Inputs allocated size of output template array; Receives output template size
// Assume template size is 384 bytes #define MAX_TEMPLATE_SIZE 384 UFS_STATUS ufs_res; HUFScaner hScanner; unsigned char TemplateInput[MAX_TEMPLATE_SIZE]; unsigned char TemplateOutput[MAX_TEMPLATE_SIZE]; int TemplateInputSize; int TemplateOutputSize; // Get hScanner handle // Get an input template to encrypt, TemplateInput and TemplateInputSize 82 Confidencial
// Set output template buffer size TemplateoutputSize = MAX_TEMPLATE_SIZE; ufs_res = UFS_EncryptTemplate(hScanner, TemplateInput, TemplateInputSize, TemplateOutput, &TemplateOutputSize); if (ufs_res == UFS_OK) { // UFS_EncryptTemplate is succeeded } else { // UFS_EncryptTemplate is failed // Use UFS_GetErrorString function to show error string }
Visual Basic 6.0
' Assume template size is 384 bytes Const MAX_TEMPLATE_SIZE As Long = 384 Dim ufs_res As UFS_STATUS Dim hScanner As Long Dim TemplateInput(MAX_TEMPLATE_SIZE - 1) As Byte Dim TemplateOutput(MAX_TEMPLATE_SIZE - 1) As Byte Dim TemplateInputSize As Long Dim TemplateOutputSize As Long ' Get hScanner handle ' Get an input template to encrypt, TemplateInput and TemplateInputSize ' Set output template buffer size TemplateoutputSize = MAX_TEMPLATE_SIZE ufs_res = UFS_EncryptTemplate(hScanner, TemplateInput(0), TemplateInputSize, TemplateOutput(0), TemplateOutputSize) If (ufs_res = UFS_STATUS.OK) Then ' UFS_EncryptTemplate is succeeded Else ' UFS_EncryptTemplate is failed ' Use UFS_GetErrorString function to show error string End If
83 Confidencial
UFS_DecryptTemplate
Decrypts template. UFS_STATUS UFS_API UFS_DecryptTemplate( HUFScanner hScanner, unsigned char* pTemplateInput, int nTemplateInputSize, unsigned char* pTemplateOutput, int* pnTemplateOutputSize ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_INVALID_PARAMETERS Parameters hScanner pTemplateInput nTemplateInputSize pTemplateOutput pnTemplateOutputSize See also UFS_SetEncryptionKey, UFS_EncryptTemplate Examples
Visual C++
[in] Handle to the scanner object [in] Pointer to input template array [in] Input template size [out] Pointer to output template array [in / out] Inputs allocated size of output template array; Receives output template size
// Assume template size is 384 bytes #define MAX_TEMPLATE_SIZE 384 UFS_STATUS ufs_res; HUFScaner hScanner; unsigned char TemplateInput[MAX_TEMPLATE_SIZE]; unsigned char TemplateOutput[MAX_TEMPLATE_SIZE]; int TemplateInputSize; int TemplateOutputSize; // Get hScanner handle // Get an encrypted template, TemplateInput and TemplateInputSize 84 Confidencial
// Set output template buffer size TemplateoutputSize = MAX_TEMPLATE_SIZE; ufs_res = UFS_DecryptTemplate(hScanner, TemplateInput, TemplateInputSize, TemplateOutput, &TemplateOutputSize); if (ufs_res == UFS_OK) { // UFS_DecryptTemplate is succeeded } else { // UFS_DecryptTemplate is failed // Use UFS_GetErrorString function to show error string }
Visual Basic 6.0
' Assume template size is 384 bytes Const MAX_TEMPLATE_SIZE As Long = 384 Dim ufs_res As UFS_STATUS Dim hScanner As Long Dim TemplateInput(MAX_TEMPLATE_SIZE - 1) As Byte Dim TemplateOutput(MAX_TEMPLATE_SIZE - 1) As Byte Dim TemplateInputSize As Long Dim TemplateOutputSize As Long ' Get hScanner handle ' Get an encrypted template, TemplateInput and TemplateInputSize ' Set output template buffer size TemplateoutputSize = MAX_TEMPLATE_SIZE ufs_res = UFS_DecryptTemplate(hScanner, TemplateInput(0), TemplateInputSize, TemplateOutput(0), TemplateOutputSize) If (ufs_res = UFS_STATUS.OK) Then ' UFS_DecryptTemplate is succeeded Else ' UFS_DecryptTemplate is failed ' Use UFS_GetErrorString function to show error string End If
85 Confidencial
UFS_GetCaptureImageBufferInfo
Gets the information of the capture image buffer. UFS_STATUS UFS_API UFS_GetCaptureImageBufferInfo( HUFScanner hScanner, int* pnWidth, int* pnHeight, int* pnResolution ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_INVALID_PARAMETERS Parameters hScanner pnWidth pnHeight pnResolution See also UFS_CaptureSingleImage, UFS_StartCapturing, UFS_GetCaptureImageBuffer, UFS_DrawCaptureImageBuffer, UFS_SaveCaptureImageBufferToBMP, UFS_ClearCaptureImageBuffer Examples
Visual C++
[in] Handle to the scanner object [out] Receives the width of the capture image buffer [out] Receives the height of the capture image buffer [out] Receives the resolution of the capture image buffer
UFS_STATUS ufs_res; HUFScaner hScanner; int nWidth; int nHeight; int nResolution; // Get hScanner handle ufs_res = UFS_GetCaptureImageBufferInfo(hScanner, &nWidth, &nHeight, &nResolution); if (ufs_res == UFS_OK) { // UFS_GetCaptureImageBufferInfo is succeeded } else { // UFS_GetCaptureImageBufferInfo is failed // Use UFS_GetErrorString function to show error string 86 Confidencial
Dim ufs_res As UFS_STATUS Dim hScanner As Long Dim nWidth As Long Dim nHeight As Long Dim nResolution As Long ' Get hScanner handle ufs_res = UFS_GetCaptureImageBufferInfo(hScanner, nWidth, nHeight, nResolution) If (ufs_res = UFS_STATUS.OK) Then ' UFS_GetCaptureImageBufferInfo is succeeded Else ' UFS_GetCaptureImageBufferInfo is failed ' Use UFS_GetErrorString function to show error string End If
87 Confidencial
UFS_GetCaptureImageBuffer
Copies the capture image buffer to the specified image data array. UFS_STATUS UFS_API UFS_GetCaptureImageBuffer( HUFScanner hScanner, unsigned char* pImageData ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_INVALID_PARAMETERS Parameters hScanner pImageData See also UFS_CaptureSingleImage, UFS_StartCapturing, UFS_GetCaptureImageBufferInfo, UFS_DrawCaptureImageBuffer, UFS_SaveCaptureImageBufferToBMP, UFS_ClearCaptureImageBuffer Examples
Visual C++
[in] Handle to the scanner object [out] Pointer to image data array; The array must be allocated bigger than the size of capture image buffer in advance
UFS_STATUS ufs_res; HUFScaner hScanner; int nWidth; int nHeight; int nResolution; unsigned char* pImageData // Get hScanner handle // Get capture image buffer information ufs_res = UFS_GetCaptureImageBufferInfo(hScanner, &nWidth, &nHeight, &nResolution); // Error handling routine is omitted // Allocate image buffer pImageData = (unsigned char*)malloc(nWidth * nHeight * sizeof(unsigned char)); ufs_res = UFS_GetCaptureImageBuffer(hScanner, pImageData); if (ufs_res == UFS_OK) { 88 Confidencial
Manual de Referencia SDK BioMini // UFS_GetCaptureImageBuffer is succeeded } else { // UFS_GetCaptureImageBuffer is failed // Use UFS_GetErrorString function to show error string } // Free image buffer after usage free(pImageBuffer)
Visual Basic 6.0
Dim ufs_res As UFS_STATUS Dim hScanner As Long Dim nWidth As Long Dim nHeight As Long Dim nResolution As Long Dim ImageData As Byte ' Get hScanner handle ' Get capture image buffer information ufs_res = UFS_GetCaptureImageBufferInfo(hScanner, nWidth, nHeight, nResolution) ' Error handling routine is omitted ' Allocate image buffer ReDim ImageData(nWidth * nHeight - 1) As Byte ufs_res = UFS_GetCaptureImageBuffer(hScanner, ImageData(0)) If (ufs_res = UFS_STATUS.OK) Then ' UFS_GetCaptureImageBuffer is succeeded Else ' UFS_GetCaptureImageBuffer is failed ' Use UFS_GetErrorString function to show error string End If
89 Confidencial
UFS_DrawCaptureImageBuffer
Draws the fingerprint image which is acquired using UFS_CaptureSingleImage() or UFS_StartCapturing(). UFS_STATUS UFS_API UFS_DrawCaptureImageBuffer( HUFScanner hScanner, HDC hDC, int nLeft, int nTop, int nRight, int nBottom, int bCore ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_INVALID_PARAMETERS Parameters hScanner hDC nLeft nTop nRight nBottom bCore See also UFS_CaptureSingleImage, UFS_StartCapturing, UFS_GetCaptureImageBufferInfo, UFS_GetCaptureImageBuffer, UFS_SaveCaptureImageBufferToBMP, UFS_ClearCaptureImageBuffer Examples
Visual C++
[in] Handle to the scanner object [in] Handle to the DC where the fingerprint image is drawn [in] Specifies the logical x-coordinate of the upper-left corner of the rectangle [in] Specifies the logical y-coordinate of the upper-left corner of the rectangle [in] Specifies the logical x-coordinate of the lower-right corner of the rectangle [in] Specifies the logical y-coordinate of the lower-right corner of the rectangle [in] Specifies whether the core of fingerprint is drawn of not
UFS_STATUS ufs_res; HUFScaner hScanner; HDC hDC; int nLeft; int nTop; int nRight; 90 Confidencial
Manual de Referencia SDK BioMini int nBottom; int bCore; // Get hScanner handle // Get HDC and determine rectangle to draw image, hDC, nLeft, nTop, nRight, nBottom // Determine core to be drawn, bCore ufs_res = UFS_DrawCaptureImageBuffer(hScanner, hDC, nLeft, nTop, nRight, nBottom, bCore); if (ufs_res == UFS_OK) { // UFS_DrawCaptureImageBuffer is succeeded } else { // UFS_DrawCaptureImageBuffer is failed // Use UFS_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufs_res As UFS_STATUS Dim hScanner As Long Dim nLeft As Long Dim nTop As Long Dim nRight As Long Dim nBottom As Long Dim bCore As Long ' Get hScanner handle ' Get HDC and determine rectangle to draw image, hDC, nLeft, nTop, nRight, nBottom ' Determine core to be drawn, bCore ufs_res = UFS_DrawCaptureImageBuffer(hScanner, hDC, nLeft, nTop, nRight, nBottom, bCore) If (ufs_res = UFS_STATUS.OK) Then ' UFS_DrawCaptureImageBuffer is succeeded Else ' UFS_DrawCaptureImageBuffer is failed ' Use UFS_GetErrorString function to show error string End If
91 Confidencial
UFS_SaveCaptureImageBufferToBMP
Saves the capture image buffer to the specified file of the bitmap format. UFS_STATUS UFS_API UFS_SaveCaptureImageBufferToBMP( HUFScanner hScanner, char* szFileName ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_INVALID_PARAMETERS Parameters hScanner szFileName See also UFS_CaptureSingleImage, UFS_StartCapturing, UFS_GetCaptureImageBufferInfo, UFS_GetCaptureImageBuffer, UFS_DrawCaptureImageBuffer, UFS_ClearCaptureImageBuffer Examples
Visual C++
[in] Handle to the scanner object [in] Specifies file name to save image buffer
UFS_STATUS ufs_res; HUFScaner hScanner; char szFileName[128]; // Get hScanner handle // Get file name, szFileName ufs_res = UFS_SaveCaptureImageBufferToBMP(hScanner, szFileName); if (ufs_res == UFS_OK) { // UFS_SaveCaptureImageBufferToBMP is succeeded } else { // UFS_SaveCaptureImageBufferToBMP is failed // Use UFS_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufs_res As UFS_STATUS Dim hScanner As Long Dim FileName As String 92 Confidencial
' Get hScanner handle ' Get file name, FileName ufs_res = UFS_SaveCaptureImageBufferToBMP(hScanner, FileName) If (ufs_res = UFS_STATUS.OK) Then ' UFS_SaveCaptureImageBufferToBMP is succeeded Else ' UFS_SaveCaptureImageBufferToBMP is failed ' Use UFS_GetErrorString function to show error string End If
93 Confidencial
UFS_ClearCaptureImageBuffer
Clears the capture image buffer. UFS_STATUS UFS_API UFS_ClearCaptureImageBuffer( HUFScanner hScanner, ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_INVALID_PARAMETERS Parameters hScanner See also UFS_CaptureSingleImage, UFS_StartCapturing, UFS_GetCaptureImageBufferInfo, UFS_GetCaptureImageBuffer, UFS_DrawCaptureImageBuffer, UFS_SaveCaptureImageBufferToBMP Examples
Visual C++
UFS_STATUS ufs_res; HUFScaner hScanner; // Get hScanner handle ufs_res = UFS_ClearCaptureImageBuffer(hScanner); if (ufs_res == UFS_OK) { // UFS_ClearCaptureImageBuffer is succeeded } else { // UFS_ClearCaptureImageBuffer is failed // Use UFS_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufs_res As UFS_STATUS Dim hScanner As Long ' Get hScanner handle ufs_res = UFS_ClearCaptureImageBuffer(hScanner) If (ufs_res = UFS_STATUS.OK) Then 94 Confidencial
Manual de Referencia SDK BioMini ' UFS_ClearCaptureImageBuffer is succeeded Else ' UFS_ClearCaptureImageBuffer is failed ' Use UFS_GetErrorString function to show error string End If
95 Confidencial
UFS_GetErrorString
Gets the error string for specified UFS_STAUS value. UFS_STATUS UFS_API UFS_GetErrorString( UFS_STATUS res, char* szErrorString ); Possible return values UFS_OK, UFS_ERROR, UFS_ERR_INVALID_PARAMETERS Parameters res szErrorString Examples
Visual C++
UFS_STATUS ufs_res; char char strError[128]; // Get status return code, ufs_res ufs_res = UFS_GetErrorString(ufs_res, strError); if (ufs_res == UFS_OK) { // UFS_GetErrorString is succeeded } else { // UFS_GetErrorString is failed }
Visual Basic 6.0
Dim ufs_res As UFS_STATUS Dim m_strError As String ' Get status return code, ufs_res ufs_res = UFS_GetErrorString(ufs_res, strError) If (ufs_res = UFS_STATUS.OK) Then ' UFS_GetErrorString is succeeded Else ' UFS_GetErrorString is failed End If 96 Confidencial
UFMatcher module
UFMatcher module provides functionality for verifying fingerprints using two templates, identifying fingerprints using the template array, etc.
Requirements
Visual C++
97 Confidencial
Definitions
98 Confidencial
Manual de Referencia SDK BioMini Parameters UFM_GetParameter(), UFM_SetParameter() functions use parameters defined as follows, Parameter value definition UFM_PARAM_FAST_MODE Code 301 Meaning Fast Mode (0: not use fast mode, 1: use fast mode) False Accept Ratio (FAR) Below 1 % (1e-2) Below 0.1 % (1e-3) Below 0.01 % (1e-4) Below 0.001 % (1e-5) Below 0.0001 % (1e-6) Below 0.00001 % (1e-7) Below 0.000001 % (1e-8) 4 Default value 1
UFM_PARAM_USE_SIF
311
Matcher handle
HUFMatcher defines handle to UFMatcher object. typedef void* HUFMatcher;
99 Confidencial
UFM_Create
Creates a matcher. UFM_STATUS UFM_API UFM_Create( HUFMatcher* phMatcher ); Possible return values UFM_OK, UFM_ERROR, UFM_ERR_NO_LICENSE, UFM_ERR_LICENSE_NOT_MATCH, UFM_ERR_LICENSE_EXPIRED, UFM_ERR_INVALID_PARAMETERS Parameters phMatcher See also UFM_Delete Examples
Visual C++
UFM_STATUS ufm_res; HUFMatcher hMatcher; ufm_res = UFM_Create(&hMatcher); if (ufm_res == UFM_OK) { // UFM_Create is succeeded } else { // UFM_Create is failed // Use UFM_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufm_res As UFM_STATUS Dim hMatcher As Long ufm_res = UFM_Create(hMatcher) If (ufm_res = UFM_STATUS.OK) Then ' UFM_Create is succeeded Else ' UFM_Create is failed ' Use UFM_GetErrorString function to show error string End If 100 Confidencial
101 Confidencial
UFM_Delete
Deletes specified matcher. UFM_STATUS UFM_API UFM_Delete( HUFMatcher pMatcher ); Possible return values UFM_OK, UFM_ERROR, UFM_ERR_INVALID_PARAMETERS Parameters hMatcher See also UFM_Create Examples
Visual C++
UFM_STATUS ufm_res; HUFMatcher hMatcher; // Create hMatcher and use ufm_res = UFM_Delete(hMatcher); if (ufm_res == UFM_OK) { // UFM_Delete is succeeded } else { // UFM_Delete is failed // Use UFM_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufm_res As UFM_STATUS Dim hMatcher As Long ' Create hMatcher and use ufm_res = UFM_Delete(hMatcher) If (ufm_res = UFM_STATUS.OK) Then ' UFM_Delete is succeeded Else 102 Confidencial
Manual de Referencia SDK BioMini ' UFM_Delete is failed ' Use UFM_GetErrorString function to show error string End If
103 Confidencial
UFM_GetParameter
Gets parameter value. UFM_STATUS UFM_API UFM_GetParameter( HUFMatcher pMatcher, int nParam, void* pValue ); Possible return values UFM_OK, UFM_ERROR, UFM_ERR_INVALID_PARAMETERS Parameters hMatcher nParam pValue See also UFM_SetParameter Examples
Visual C++
[in] Handle of the matcher object [in] Parameter type; one of parameters [out] Receives parameter value of specified parameter type; pValue must point to adequate storage type matched to parameter type
UFM_STATUS ufm_res; HUFMatcher hMatcher; int nValue; // Create hMatcher // Get fast mode ufm_res = UFM_GetParameter(hMatcher, UFM_PARAM_FAST_MODE, &nValue); // Error handling routine is omitted // Get security level ufm_res = UFM_GetParameter(hMatcher, UFM_PARAM_SECURITY_LEVEL, &nValue); // Error handling routine is omitted // Get use SIF ufm_res = UFM_GetParameter(hMatcher, UFM_PARAM_USE_SIF, &nValue); // Error handling routine is omitted 104 Confidencial
Dim ufm_res As UFM_STATUS Dim hMatcher As Long Dim nValue As Long ' Create hMatcher ' Get fast mode ufm_res = UFM_GetParameter(hMatcher, UFM_PARAM.FAST_MODE, nValue) ' Error handling routine is omitted ' Get security level ufm_res = UFM_GetParameter(hMatcher, UFM_PARAM.SECURITY_LEVEL, nValue) ' Error handling routine is omitted ' Get use SIF ufm_res = UFM_GetParameter(hMatcher, UFM_PARAM.USE_SIF, nValue) ' Error handling routine is omitted
105 Confidencial
UFM_SetParameter
Sets parameter value. UFM_STATUS UFM_API UFM_SetParameter( HUFMatcher pMatcher, int nParam, void* pValue ); Possible return values UFM_OK, UFM_ERROR, UFM_ERR_INVALID_PARAMETERS Parameters hMatcher nParam pValue See also UFM_GetParameter Examples
Visual C++
[in] Handle of the matcher object [in] Parameter type; one of parameters [in] Pointer to parameter value of specified parameter type; pValue must point to adequate storage type matched to parameter type
UFM_STATUS ufm_res; HUFMatcher hMatcher; int nValue; // Create hMatcher // Set fast mode to nValue ufm_res = UFM_SetParameter(hMatcher, UFM_PARAM_FAST_MODE, &nValue); // Error handling routine is omitted // Set security level to nValue ufm_res = UFM_SetParameter(hMatcher, UFM_PARAM_SECURITY_LEVEL, &nValue); // Error handling routine is omitted // Set use SIF to nValue ufm_res = UFM_SetParameter(hMatcher, UFM_PARAM_USE_SIF, &nValue); // Error handling routine is omitted 106 Confidencial
Dim ufm_res As UFM_STATUS Dim hMatcher As Long Dim nValue As Long ' Create hMatcher ' Set fast mode to nValue ufm_res = UFM_SetParameter(hMatcher, UFM_PARAM.FAST_MODE, nValue) ' Error handling routine is omitted ' Set security level to nValue ufm_res = UFM_SetParameter(hMatcher, UFM_PARAM.SECURITY_LEVEL, nValue) ' Error handling routine is omitted ' Set use SIF to nValue ufm_res = UFM_SetParameter(hMatcher, UFM_PARAM.USE_SIF, nValue) ' Error handling routine is omitted
107 Confidencial
UFM_Verify
Compares two extracted templates. UFM_STATUS UFM_API UFM_Verify( HUFMatcher pMatcher, unsigned char* pTemplate1, int nTemplate1Size, unsigned char* pTemplate2, int nTemplate2Size, int* bVerifySucceed ); Possible return values UFM_OK, UFM_ERROR, UFM_ERR_LICENSE_NOT_MATCH, UFM_ERR_LICENSE_EXPIRED, UFM_ERR_INVALID_PARAMETERS, UFM_ERR_TEMPLATE_TYPE Parameters hMatcher pTemplate1 nTemplate1Size pTemplate2 nTemplate2Size bVerifySucceed Examples
Visual C++
[in] Handle of the matcher object [in] Pointer to the template [in] Specifies the size of the template [in] Pointer to the template array [in] Specifies the size of the template array [out] Receives whether verification is succeed; 1: verification is succeed, 0: verification is failed
// Assume template size is 384 bytes #define MAX_TEMPLATE_SIZE 384 UFM_STATUS ufm_res; HUFMatcher hMatcher; unsigned char Template1[MAX_TEMPLATE_SIZE]; unsigned char Template2[MAX_TEMPLATE_SIZE]; int nTemplate1Size; int nTemplate2Size; int bVerifySucceed; // Create hMatcher 108 Confidencial
Manual de Referencia SDK BioMini // Get two templates, Template1 and Template2 ufm_res = UFM_Verify(hMatcher, Template1, nTemplate1Size, Template2, nTemplate2Size, &bVerifySucceed); if (ufm_res == UFM_OK) { // UFM_Verify is succeeded if (bVerifySucceed) { // Template1 is matched to Template2 } else { // Template1 is not matched to Template2 } } else { // UFM_Verify is failed // Use UFM_GetErrorString function to show error string }
Visual Basic 6.0
' Assume template size is 384 bytes Const MAX_TEMPLATE_SIZE As Long = 384 Dim ufm_res As UFM_STATUS Dim hMatcher As Long Dim Template1(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template2(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template1Size As Long Dim Template2Size As Long Dim VerifySucceed As Long ' Create hMatcher ' Get two templates, Template1 and Template2 ufm_res = UFM_Verify(hMatcher, Template1(0), Template1Size, Template2(0), Tempalte2Size, VerifySucceed) If (ufm_res = UFM_STATUS.OK) Then ' UFM_Verify is succeeded If (VerifySucceed = 1) Then ' Template1 is matched to Template2 Else ' Template1 is not matched to Template2 End If Else ' UFM_Verify is failed ' Use UFM_GetErrorString function to show error string End If
109 Confidencial
UFM_Identify, UFM_IdentifyMT
Compares a template with given template array. UFM_IdentifyMT function uses multi threads internally for faster identifying in multi-core systems. UFM_STATUS UFM_API UFM_Identify( HUFMatcher pMatcher, unsigned char* pTemplate1, int nTemplate1Size, unsigned char** ppTemplate2, int* pnTemplate2Size, int nTemplate2Num, int nTimeout, int* pnMatchTemplate2Index ); UFM_STATUS UFM_API UFM_IdentifyMT( HUFMatcher pMatcher, unsigned char* pTemplate1, int nTemplate1Size, unsigned char** ppTemplate2, int* pnTemplate2Size, int nTemplate2Num, int nTimeout, int* pnMatchTemplate2Index ); Possible return values UFM_OK, UFM_ERROR, UFM_ERR_LICENSE_NOT_MATCH, UFM_ERR_LICENSE_EXPIRED, UFM_ERR_INVALID_PARAMETERS, UFM_ERR_MATCH_TIMEOUT, UFM_ERR_MATCH_ABORTED, UFM_ERR_TEMPLATE_TYPE Parameters hMatcher pTemplate1 nTemplate1Size ppTemplate2 pnTemplate2Size nTemplate2Num nTimeout [in] Handle of the matcher object [in] Pointer to the template [in] Specifies the size of the template [in] Pointer to the template array [in] Pointer to the template size array [in] Specifies the number of templates in the template array [in] Specifies maximum time for identifying in milliseconds; If elapsed time for identifying exceeds nTimeout, function stops further identifying and returns UFM_ERR_MATCH_TIMEOUT; 110 Confidencial
Manual de Referencia SDK BioMini 0 means infinity pnMatchTemplate2Index [out] Receives the index of matched template in the template array; -1 means pTemplate1 is not matched to all of templates in ppTemplate2
// Assume template size is 384 bytes #define MAX_TEMPLATE_SIZE 384 UFM_STATUS ufm_res; HUFMatcher hMatcher; unsigned char Template1[MAX_TEMPLATE_SIZE]; unsigned char** ppTemplate2; int nTemplate1Size; int* pnTemplate2Size; int nTemplate2Num; int nTimeout; int nMatchTemplate2Index; int i; // Create hMatcher // Get input template from user, Template1 // Make template array from DB or something // Get number of template to nTemplate2Num ppTemplate2 = (unsigned char**)malloc(nTemplate2Num * sizeof(unsigned char*)); pnTemplate2Size = (int*)malloc(nTemplate2Num * sizeof(int)); for (i = 0; i < nTemplate2Num; i++) { ppTemplate2[i] = (unsigned char*)malloc(MAX_TEMPLATE_SIZE * sizeof(unsigned char)); // Copy i th template to ppTemplate2[i] // Set i th template size to pnTemplateSize[i] } // Set match timeout to nTimeout ufm_res = UFM_Identify(hMatcher, Template1, Template1Size, ppTemplate2, pnTemplate2Size, nTemplate2Num, nTimeout, &nMatchTemplate2Index); 111 Confidencial
Manual de Referencia SDK BioMini if (ufm_res == UFM_OK) { // UFM_Identify is succeeded if (nMatchTemplate2Index != -1) { // Input fingerprint Template1 is matched to ppTemplate2[nMatchTemplate2Index] } else { // Input fingerprint is not in ppTemplate2 } } else { // UFM_Identify is failed // Use UFM_GetErrorString function to show error string } // Free template array free(pnTemplate2Size); for (i = 0; i < nTemplate2Num; i++) { free(ppTemplate2[i]); } free(ppTemplate2);
Visual Basic 6.0
' Assume template size is 384 bytes Const MAX_TEMPLATE_SIZE As Long = 384 Dim ufm_res As UFM_STATUS Dim hMatcher As Long Dim Template1(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template1Size As Long Dim Template2() As Byte Dim Template2Size() As Long Dim Template2Ptr() As Long Dim Template2Num As Long Dim Timeout As Long Dim MatchTemplate2Index As Long Dim i As Long ' Create hMatcher ' Get input template from user, Template1 ' Make template array from DB or something ' Get number of template to nTemplate2Num ReDim Template2(MAX_TEMPLATE_SIZE - 1, Template2Num - 1) As Byte ReDim Template2Size(Template2Num - 1) As Long ' Copy i th template to Template2(i) 112 Confidencial
Manual de Referencia SDK BioMini ' Set i th template size to Template2Size(i) ' Make template pointer array to pass two dimensional template data ReDim Template2Ptr(Template2Num - 1) As Long For i = 0 To Template2Num - 1 Template2Ptr(i) = VarPtr(Template2(0, i)) Next
ufm_res = UFM_Identify(hMatcher,
Template1(0), Template1Size, Template2Ptr(0), Template2Size(0), nTemplate2Num, Timeout, MatchTemplate2Index) If (ufm_res = UFM_STATUS.OK) Then ' UFM_Identify is succeeded If (MatchTemplate2Index <> -1) Then ' Input fingerprint Template1 is matched to Template2(MatchTemplate2Index) Else ' Input fingerprint is not in Template2 End If Else ' UFM_Identify is failed ' Use UFM_GetErrorString function to show error string End If
113 Confidencial
UFM_AbortIdentify
Aborts current identifying procedure started using UFM_Identify(). UFM_STATUS UFM_API UFM_AbortIdentify( HUFMatcher pMatcher ); Possible return values UFM_OK, UFM_ERROR, UFM_ERR_INVALID_PARAMETERS Parameters hMatcher See Also UFM_Identify Examples
Visual C++
UFM_STATUS ufm_res; HUFMatcher hMatcher; // Create hMatcher // Start UFM_Identify ufm_res = UFM_AbortIdentify(hMatcher); if (ufm_res == UFM_OK) { // UFM_AbortIdentify is succeeded } else { // UFM_AbortIdentify is failed // Use UFM_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufm_res As UFM_STATUS Dim hMatcher As Long ' Create hMatcher ' Start UFM_Identify
114 Confidencial
If (ufm_res = UFM_STATUS.OK) Then ' UFM_AbortIdentify is succeeded Else ' UFM_AbortIdentify is failed ' Use UFM_GetErrorString function to show error string End If
115 Confidencial
UFM_IdentifyInit
Initializes identify with input template. UFM_STATUS UFM_API UFM_IdentifyInit( HUFMatcher pMatcher, unsigned char* pTemplate1, int nTemplate1Size, ); Possible return values UFM_OK, UFM_ERROR, UFM_ERR_LICENSE_NOT_MATCH, UFM_ERR_LICENSE_EXPIRED, UFM_ERR_INVALID_PARAMETERS Parameters hMatcher pTemplate1 nTemplate1Size See also UFM_IdentifyNext Examples
Visual C++
[in] Handle of the matcher object [in] Pointer to the template [in] Specifies the size of the template
// Assume template size is 384 bytes #define MAX_TEMPLATE_SIZE 384 UFM_STATUS ufm_res; HUFMatcher hMatcher; unsigned char Template1[MAX_TEMPLATE_SIZE]; int nTemplate1Size; // Create hMatcher // Get Template1 ufm_res = UFM_IdentifyInit(hMatcher, Template1, nTemplate1Size); if (ufm_res == UFM_OK) { // UFM_IdentifyInit is succeeded } else { // UFM_IdentifyInit is failed // Use UFM_GetErrorString function to show error string 116 Confidencial
' Assume template size is 384 bytes Const MAX_TEMPLATE_SIZE As Long = 384 Dim ufm_res As UFM_STATUS Dim hMatcher As Long Dim Template1(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template1Size As Long ' Create hMatcher ' Get Template1 ufm_res = UFM_IdentifyInit(hMatcher, Template1(0), Template1Size) If (ufm_res = UFM_STATUS.OK) Then ' UFM_IdentifyInit is succeeded Else ' UFM_IdentifyInit is failed ' Use UFM_GetErrorString function to show error string End If
117 Confidencial
UFM_IdentifyNext
Matches one input template to the template specified in UFM_IdentifyInit(). UFM_STATUS UFM_API UFM_IdentifyNext( HUFMatcher pMatcher, unsigned char* pTemplate2, int nTemplate2Size, int* bIdentifySucceed ); Possible return values UFM_OK, UFM_ERROR, UFM_ERR_LICENSE_NOT_MATCH, UFM_ERR_LICENSE_EXPIRED, UFM_ERR_INVALID_PARAMETERS, UFM_ERR_TEMPLATE_TYPE Parameters hMatcher pTemplate2 nTemplate2Size bIdentifySucceed See also UFM_IdentifyInit Examples
Visual C++
[in] Handle of the matcher object [in] Pointer to the template array [in] Specifies the size of the template array [out] Receives whether identification is succeed; 1: identification is succeed, 0: identification is failed
// Assume template size is 384 bytes #define MAX_TEMPLATE_SIZE 384 UFM_STATUS ufm_res; HUFMatcher hMatcher; unsigned char Template2[MAX_TEMPLATE_SIZE]; int nTemplate2Size; int nTemplate2Num; int bIdentifySucceed; int i; // Create hMatcher
118 Confidencial
Manual de Referencia SDK BioMini // Execute UFM_IdentifyInit with query template // Get number of templates in DB or something, and save it to nTemplate2Num bIdentifySucceed = 0; for (i = 0; i < nTemplate2Num; i++) { // Get one template in DB or something, and save it to Template2 and nTemplate2Size ufm_res = UFM_IdentifyNext(hMatcher, Template2, nTemplate2Size, bIdentifySucceed); if (ufm_res == UFM_OK) { // UFM_IdentifyNext is succeeded } else { // UFM_IdentifyNext is failed // Use UFM_GetErrorString function to show error string // return; } if (bIdentifySucceed) { // Identification is succeed break; } } if (!bIdentifySucceed) { // Identification is failed }
Visual Basic 6.0
' Assume template size is 384 bytes Const MAX_TEMPLATE_SIZE As Long = 384 Dim ufm_res As UFM_STATUS Dim hMatcher As Long Dim Template2(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template2Size As Long Dim Template2Num As Long Dim IdentifySucceed As Long Dim i As Long ' Create hMatcher ' Execute UFM_IdentifyInit with query template ' Get number of templates in DB or something, and save it to Template2Num IdentifySucceed = 0 119 Confidencial
Manual de Referencia SDK BioMini for i = 0 To Template2Num - 1 ' Get one template in DB or something, and save it to Template2 and Template2Size ufm_res = UFM_IdentifyNext(hMatcher, Template2, Template2Size, IdentifySucceed) If (ufm_res = UFM_STATUS.OK) Then ' UFM_IdentifyNext is succeeded Else ' UFM_IdentifyNext is failed ' Use UFM_GetErrorString function to show error string ' Exit End If If (bIdentifySucceed = 1) Then // Identification is succeed Exit For End If Next If (bIdentifySucceed = 0) Then // Identification is failed End If
120 Confidencial
UFM_RotateTemplate
Rotates the specified template to the amount of 180 degrees. UFM_STATUS UFM_API UFM_RotateTemplate( HUFMatcher pMatcher, unsigned char* pTemplate, int nTemplateSize ); Possible return values UFM_OK, UFM_ERROR, UFM_ERR_INVALID_PARAMETERS Parameters hMatcher pTemplate nTemplateSize Examples
Visual C++
[in] Handle of the matcher object [in / out] Pointer to the template [in] Specifies the size of the template
// Assume template size is 384 bytes #define MAX_TEMPLATE_SIZE 384 UFM_STATUS ufm_res; HUFMatcher hMatcher; unsigned char Template2[MAX_TEMPLATE_SIZE]; int nTemplateSize; // Create hMatcher // Get a template, and save it to Template and nTemplateSize ufm_res = UFM_RotateTemplate(hMatcher, Template, nTemplateSize); if (ufm_res == UFM_OK) { // UFM_RotateTemplate is succeeded } else { // UFM_RotateTemplate is failed // Use UFM_GetErrorString function to show error string }
Visual Basic 6.0
Manual de Referencia SDK BioMini Const MAX_TEMPLATE_SIZE As Long = 384 Dim ufm_res As UFM_STATUS Dim hMatcher As Long Dim Template(MAX_TEMPLATE_SIZE - 1) As Byte Dim TemplateSize As Long ' Create hMatcher ' Get a template, and save it to Template and TemplateSize ufm_res = UFM_RotateTemplate(hMatcher, Template(0), TemplateSize) If (ufm_res = UFM_STATUS.OK) Then ' UFM_RotateTemplate is succeeded Else ' UFM_RotateTemplate is failed ' Use UFM_GetErrorString function to show error string End If
122 Confidencial
UFM_GetErrorString
Gets the error string for specified UFM_STAUS value. UFM_STATUS UFM_API UFM_GetErrorString( UFM_STATUS res, char* szErrorString ); Possible return values UFM_OK, UFM_ERROR, UFM_ERR_INVALID_PARAMETERS Parameters res szErrorString Examples
Visual C++
UFM_STATUS ufm_res; char char strError[128]; // Get status return code, ufm_res ufm_res = UFM_GetErrorString(ufm_res, strError); if (ufm_res == UFM_OK) { // UFM_GetErrorString is succeeded } else { // UFM_GetErrorString is failed }
Visual Basic 6.0
Dim ufm_res As UFM_STATUS Dim m_strError As String ' Get status return code, ufm_res ufm_res = UFM_GetErrorString(ufm_res, strError) If (ufm_res = UFM_STATUS.OK) Then ' UFM_GetErrorString is succeeded Else ' UFM_GetErrorString is failed End If 123 Confidencial
UFDatabase module
UFDatabase module provides functionality for managing database, adding / updating / removing / getting templates with user data, etc.
Requirements
Visual C++
124 Confidencial
Definitions
Database handle
HUFDatabase defines handle to UFDatabase object. typedef void* HUFDatabase;
125 Confidencial
UFD_Open
Opens a database using specified connection string. UFD_STATUS UFD_API UFD_Open( const char* szConnection, const char* szUserID, const char* szPassword, HUFDatabase* phDatabase ); Possible return values UFD_OK, UFD_ERROR, UFD_ERR_INVALID_PARAMETERS Parameters [in] Specifies ADO connection strings; to connect to an Access file using the JET OLE DB Provider, use "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=mdb_file_path;"; if database is password protected, use "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=mdb_file_path;Jet OLEDB:Database Password=mdb_password;" [in] Specifies user ID directly passed to ADO open method (can be NULL) [in] Specifies password directly passed to ADO open method (can be NULL) [out] Pointer to handle of the database object
szConnection
UFD_STATUS ufd_res; HUFDatabase hDatabase; ufd_res = UFD_Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=UFDatabase.mdb;", NULL, NULL, &hDatabase); if (ufd_res == UFD_OK) { // UFD_Open is succeeded } else { // UFD_Open is failed // Use UFD_GetErrorString function to show error string }
126 Confidencial
Dim ufd_res As UFD_STATUS Dim hDatabase As Long ufd_res = UFD_Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=UFDatabase.mdb;", "", "", hDatabase) If (ufd_res = UFD_STATUS.OK) Then ' UFD_Open is succeeded Else ' UFD_Open is failed ' Use UFD_GetErrorString function to show error string End If
127 Confidencial
UFD_Close
Closes specified database. UFD_STATUS UFD_API UFD_Close( HUFDatabase hDatabase ); Possible return values UFD_OK, UFD_ERROR, UFD_ERR_INVALID_PARAMETERS Parameters hDatabase See also UFD_Open Examples
Visual C++
UFD_STATUS ufd_res; HUFDatabase hDatabase; // Get database handle, hDatabase ufd_res = UFD_Close(hDatabase); if (ufd_res == UFD_OK) { // UFD_Close is succeeded } else { // UFD_Close is failed // Use UFD_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufd_res As UFD_STATUS Dim hDatabase As Long ' Get database handle, hDatabase ufd_res = UFD_Close(hDatabase) If (ufd_res = UFD_STATUS.OK) Then ' UFD_Close is succeeded Else 128 Confidencial
Manual de Referencia SDK BioMini ' UFD_Close is failed ' Use UFD_GetErrorString function to show error string End If
129 Confidencial
UFD_AddData
Adds data into the specified database. If there is a database entry of same user ID with finger index with input data, the function returns UFD_ERR_SAME_FINGER_EXIST. UFD_STATUS UFD_API UFD_AddData( HUFDatabase hDatabase, const char* szUserID, int nFingerIndex, unsigned char* pTemplate1, int nTemplate1Size, unsigned char* pTemplate2, int nTemplate2Size, const char* szMemo ); Possible return values UFD_OK, UFD_ERROR, UFD_ERR_INVALID_PARAMETERS, UFD_ERR_SAME_FINGER_EXIST Parameters hDatabase szUserID nFingerIndex pTemplate1 nTemplate1Size pTemplate2 nTemplate2Size szMemo Examples
Visual C++
[in] Handle of the database object [in] Specifies user ID Information [in] Specifies finger index for Identifying finger [in] Specifies first fingerprint template data [in] Specifies the size of template [in] Specifies second fingerprint template data [in] Specifies the size of template [in] Specifies additional user data
#define MAX_USERID_SIZE 50 #define MAX_TEMPLATE_SIZE 1024 #define MAX_MEMO_SIZE 100 UFD_STATUS ufd_res; HUFDatabase hDatabase; char szUserID[MAX_USERID_SIZE]; int nFingerIndex; unsigned char Template1[MAX_TEMPLATE_SIZE]; 130 Confidencial
Manual de Referencia SDK BioMini int nTemplate1Size; unsigned char Template2[MAX_TEMPLATE_SIZE]; int nTemplate2Size; char szMemo[MAX_MEMO_SIZE]; // Get database handle, hDatabase // Get user data, and save them to szUserID, nFingerIndex, Template1, nTemplate1Size, Template2, nTemplate2Size, szMemo ufd_res = UFD_AddData(hDatabase, szUserID, nFingerIndex, Template1, nTemplate1Size, Template2, nTemplate2Size, szMemo); if (ufd_res == UFD_OK) { // UFD_AddData is succeeded } else { // UFD_AddData is failed // Use UFD_GetErrorString function to show error string }
Visual Basic 6.0
Const MAX_USERID_SIZE As Long = 50 Const MAX_TEMPLATE_SIZE As Long = 1024 Const MAX_MEMO_SIZE As Long = 100 Dim ufd_res As UFD_STATUS Dim hDatabase As Long Dim UserID As String Dim FingerIndex As Long Dim Template1(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template1Size As Long Dim Template2(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template2Size As Long Dim Memo As String ' Get database handle, hDatabase ' Get user data, and save them to UserID, FingerIndex, Template1, Template1Size, Template2, Template2Size, Memo ufd_res = UFD_AddData(hDatabase, UserID, FingerIndex, Template1(0), Template1Size, Template2(0), Template2Size, Memo) If (ufd_res = UFD_STATUS.OK) Then ' UFD_AddData is succeeded Else ' UFD_AddData is failed ' Use UFD_GetErrorString function to show error string 131 Confidencial
132 Confidencial
UFD_UpdateDataByUserInfo
Updates the database entry having specified user ID and finger index. UFD_STATUS UFD_API UFD_UpdateDataByUserInfo( HUFDatabase hDatabase, const char* szUserID, int nFingerIndex, unsigned char* pTemplate1, int nTemplate1Size, unsigned char* pTemplate2, int nTemplate2Size, const char* szMemo ); Possible return values UFD_OK, UFD_ERROR, UFD_ERR_INVALID_PARAMETERS Parameters hDatabase szUserID nFingerIndex pTemplate1 nTemplate1Size pTemplate2 nTemplate2Size szMemo See also UFD_UpdateDataBySerial Examples
Visual C++
[in] Handle of the database object [in] Specifies user ID Information [in] Specifies finger index for Identifying finger [in] Specifies first fingerprint template data to update; NULL indicates no update for template1 [in] Specifies the size of template; 0 indicates no update for template1 [in] Specifies second fingerprint template data to update; NULL indicates no update for template2 [in] Specifies the size of template; 0 indicates no update for template2 [in] Specifies additional user data to update; NULL indicates no update for memo
133 Confidencial
Manual de Referencia SDK BioMini UFD_STATUS ufd_res; HUFDatabase hDatabase; char szUserID[MAX_USERID_SIZE]; int nFingerIndex; unsigned char Template1[MAX_TEMPLATE_SIZE]; int nTemplate1Size; unsigned char Template2[MAX_TEMPLATE_SIZE]; int nTemplate2Size; char szMemo[MAX_MEMO_SIZE]; // Get database handle, hDatabase // Get user data, and save them to szUserID, nFingerIndex, Template1, nTemplate1Size, Template2, nTemplate2Size, szMemo ufd_res = UFD_UpdateDataByUserInfo(hDatabase, szUserID, nFingerIndex, Template1, nTemplate1Size, Template2, nTemplate2Size, szMemo); if (ufd_res == UFD_OK) { // UFD_UpdateDataByUserInfo is succeeded } else { // UFD_UpdateDataByUserInfo is failed // Use UFD_GetErrorString function to show error string }
Visual Basic 6.0
Const MAX_USERID_SIZE As Long = 50 Const MAX_TEMPLATE_SIZE As Long = 1024 Const MAX_MEMO_SIZE As Long = 100 Dim ufd_res As UFD_STATUS Dim hDatabase As Long Dim UserID As String Dim FingerIndex As Long Dim Template1(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template1Size As Long Dim Template2(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template2Size As Long Dim Memo As String ' Get database handle, hDatabase ' Get user data, and save them to UserID, FingerIndex, Template1, Template1Size, Template2, Template2Size, Memo ufd_res = UFD_UpdateDataByUserInfo(hDatabase, UserID, FingerIndex, Template1(0), Template1Size, Template2(0), Template2Size, Memo) 134 Confidencial
Manual de Referencia SDK BioMini If (ufd_res = UFD_STATUS.OK) Then ' UFD_UpdateDataByUserInfo is succeeded Else ' UFD_UpdateDataByUserInfo is failed ' Use UFD_GetErrorString function to show error string End If
135 Confidencial
UFD_UpdateDataBySerial
Updates the database entry having specified serial number. UFD_STATUS UFD_API UFD_UpdateDataBySerial( HUFDatabase hDatabase, int nSerial, unsigned char* pTemplate1, int nTemplate1Size, unsigned char* pTemplate2, int nTemplate2Size, const char* szMemo ); Possible return values UFD_OK, UFD_ERROR, UFD_ERR_INVALID_PARAMETERS Parameters hDatabase nSerial pTemplate1 nTemplate1Size pTemplate2 nTemplate2Size szMemo See also UFD_UpdateDataByUserInfo Examples
Visual C++
[in] Handle of the database object [in] Specifies serial number [in] Specifies first fingerprint template data to update; NULL indicates no update for template1 [in] Specifies the size of template; 0 indicates no update for template1 [in] Specifies second fingerprint template data to update; NULL indicates no update for template2 [in] Specifies the size of template; 0 indicates no update for template2 [in] Specifies additional user data to update; NULL indicates no update for memo
#define MAX_TEMPLATE_SIZE 1024 #define MAX_MEMO_SIZE 100 UFD_STATUS ufd_res; HUFDatabase hDatabase; int nSerial; 136 Confidencial
Manual de Referencia SDK BioMini unsigned char Template1[MAX_TEMPLATE_SIZE]; int nTemplate1Size; unsigned char Template2[MAX_TEMPLATE_SIZE]; int nTemplate2Size; char szMemo[MAX_MEMO_SIZE]; // Get database handle, hDatabase // Get user data, and save them to nSerial, Template1, nTemplate1Size, Template2, nTemplate2Size, szMemo ufd_res = UFD_UpdateDataBySerial(hDatabase, nSerial, Template1, nTemplate1Size, Template2, nTemplate2Size, szMemo); if (ufd_res == UFD_OK) { // UFD_UpdateDataBySerial is succeeded } else { // UFD_UpdateDataBySerial is failed // Use UFD_GetErrorString function to show error string }
Visual Basic 6.0
Const MAX_TEMPLATE_SIZE As Long = 1024 Const MAX_MEMO_SIZE As Long = 100 Dim ufd_res As UFD_STATUS Dim hDatabase As Long Dim Serial As Long Dim Template1(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template1Size As Long Dim Template2(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template2Size As Long Dim Memo As String ' Get database handle, hDatabase ' Get user data, and save them to Serial, Template1, Template1Size, Template2, Template2Size, Memo ufd_res = UFD_UpdateDataBySerial(hDatabase, Serial, Template1(0), Template1Size, Template2(0), Template2Size, Memo) If (ufd_res = UFD_STATUS.OK) Then ' UFD_UpdateDataBySerial is succeeded Else ' UFD_UpdateDataBySerial is failed ' Use UFD_GetErrorString function to show error string End If 137 Confidencial
138 Confidencial
UFD_RemoveDataByUserID
Removes the database entries having specified user ID. UFD_STATUS UFD_API UFD_RemoveDataByUserID( HUFDatabase hDatabase, const char* szUserID ); Possible return values UFD_OK, UFD_ERROR, UFD_ERR_INVALID_PARAMETERS Parameters hDatabase szUserID See also UFD_RemoveDataByUserInfo, UFD_RemoveDataBySerial, UFD_RemoveAllData Examples
Visual C++
#define MAX_USERID_SIZE 50 UFD_STATUS ufd_res; HUFDatabase hDatabase; char szUserID[MAX_USERID_SIZE]; // Get database handle, hDatabase // Get szUserID from user ufd_res = UFD_RemoveDataByUserID(hDatabase, szUserID); if (ufd_res == UFD_OK) { // UFD_RemoveDataByUserID is succeeded } else { // UFD_RemoveDataByUserID is failed // Use UFD_GetErrorString function to show error string }
Visual Basic 6.0
Manual de Referencia SDK BioMini Dim ufd_res As UFD_STATUS Dim hDatabase As Long Dim UserID As String ' Get database handle, hDatabase ' Get UserID from user ufd_res = UFD_RemoveDataByUserID(hDatabase, UserID) If (ufd_res = UFD_STATUS.OK) Then ' UFD_RemoveDataByUserID is succeeded Else ' UFD_RemoveDataByUserID is failed ' Use UFD_GetErrorString function to show error string End If
140 Confidencial
UFD_RemoveDataByUserInfo
Removes the database entries having specified user ID and finger index. UFD_STATUS UFD_API UFD_RemoveDataByUserInfo( HUFDatabase hDatabase, const char* szUserID, int nFingerIndex ); Possible return values UFD_OK, UFD_ERROR, UFD_ERR_INVALID_PARAMETERS Parameters hDatabase szUserID nFingerIndex See also UFD_RemoveDataByUserID, UFD_RemoveDataBySerial, UFD_RemoveAllData Examples
Visual C++
[in] Handle of the database object [in] Specifies user ID Information [in] Specifies finger index for Identifying finger
#define MAX_USERID_SIZE 50 UFD_STATUS ufd_res; HUFDatabase hDatabase; char szUserID[MAX_USERID_SIZE]; int nFingerIndex; // Get database handle, hDatabase // Get szUserID, nFingerIndex from user ufd_res = UFD_RemoveDataByUserInfo(hDatabase, szUserID, nFingerIndex); if (ufd_res == UFD_OK) { // UFD_RemoveDataByUserInfo is succeeded } else { // UFD_RemoveDataByUserInfo is failed // Use UFD_GetErrorString function to show error string } 141 Confidencial
Const MAX_USERID_SIZE As Long = 50 Dim ufd_res As UFD_STATUS Dim hDatabase As Long Dim UserID As String Dim FingerIndex As Long ' Get database handle, hDatabase ' Get UserID, FingerIndex from user ufd_res = UFD_RemoveDataByUserInfo(hDatabase, UserID, FingerIndex) If (ufd_res = UFD_STATUS.OK) Then ' UFD_RemoveDataByUserInfo is succeeded Else ' UFD_RemoveDataByUserInfo is failed ' Use UFD_GetErrorString function to show error string End If
142 Confidencial
UFD_RemoveDataBySerial
Removes the database entries having specified serial number. UFD_STATUS UFD_API UFD_RemoveDataBySerial( HUFDatabase hDatabase, int nSerial ); Possible return values UFD_OK, UFD_ERROR, UFD_ERR_INVALID_PARAMETERS Parameters hDatabase nSerial See also UFD_RemoveDataByUserID, UFD_RemoveDataByUserInfo, UFD_RemoveAllData Examples
Visual C++
UFD_STATUS ufd_res; HUFDatabase hDatabase; int nSerial; // Get database handle, hDatabase // Get nSerial from user ufd_res = UFD_RemoveDataBySerial(hDatabase, nSerial); if (ufd_res == UFD_OK) { // UFD_RemoveDataBySerial is succeeded } else { // UFD_RemoveDataBySerial is failed // Use UFD_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufd_res As UFD_STATUS Dim hDatabase As Long Dim Serial As Long 143 Confidencial
Manual de Referencia SDK BioMini ' Get database handle, hDatabase ' Get Serial from user ufd_res = UFD_RemoveDataBySerial(hDatabase, Serial) If (ufd_res = UFD_STATUS.OK) Then ' UFD_RemoveDataBySerial is succeeded Else ' UFD_RemoveDataBySerial is failed ' Use UFD_GetErrorString function to show error string End If
144 Confidencial
UFD_RemoveAllData
Removes all database entries. UFD_STATUS UFD_API UFD_UFD_RemoveAllData( HUFDatabase hDatabase ); Possible return values UFD_OK, UFD_ERROR, UFD_ERR_INVALID_PARAMETERS Parameters hDatabase See also UFD_RemoveDataByUserID, UFD_RemoveDataByUserInfo, UFD_RemoveDataBySerial Examples
Visual C++
UFD_STATUS ufd_res; HUFDatabase hDatabase; // Get database handle, hDatabase ufd_res = UFD_RemoveAllData(hDatabase); if (ufd_res == UFD_OK) { // UFD_RemoveAllData is succeeded } else { // UFD_RemoveAllData is failed // Use UFD_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufd_res As UFD_STATUS Dim hDatabase As Long ' Get database handle, hDatabase ufd_res = UFD_RemoveAllData(hDatabase) If (ufd_res = UFD_STATUS.OK) Then ' UFD_RemoveAllData is succeeded Else 145 Confidencial
Manual de Referencia SDK BioMini ' UFD_RemoveAllData is failed ' Use UFD_GetErrorString function to show error string End If
146 Confidencial
UFD_GetDataNumber
Gets the number of database entries. UFD_STATUS UFD_API UFD_GetDataNumber( HUFDatabase hDatabase, int* pnDataNumber ); Possible return values UFD_OK, UFD_ERROR, UFD_ERR_INVALID_PARAMETERS Parameters hDatabase pnDataNumber See also UFD_GetDataByIndex, UFD_GetDataByUserInfo, UFD_GetDataBySerial Examples
Visual C++
[in] Handle of the database object [out] Receives the number of database entries
UFD_STATUS ufd_res; HUFDatabase hDatabase; int nDataNumber; // Get database handle, hDatabase ufd_res = UFD_GetDataNumber(hDatabase, &nDataNumber); if (ufd_res == UFD_OK) { // UFD_GetDataNumber is succeeded } else { // UFD_GetDataNumber is failed // Use UFD_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufd_res As UFD_STATUS Dim hDatabase As Long Dim DataNumber As Long ' Get database handle, hDatabase 147 Confidencial
Manual de Referencia SDK BioMini ufd_res = UFD_GetDataNumber(hDatabase, DataNumber) If (ufd_res = UFD_STATUS.OK) Then ' UFD_GetDataNumber is succeeded Else ' UFD_GetDataNumber is failed ' Use UFD_GetErrorString function to show error string End If
148 Confidencial
UFD_GetDataByIndex
Gets the database entry having specified index. UFD_STATUS UFD_API UFD_GetDataByIndex( HUFDatabase hDatabase, int nIndex, int* pnSerial, char* szUserID, int* pnFingerIndex, unsigned char* pTemplate1, int* pnTemplate1Size, unsigned char* pTemplate2, int* pnTemplate2Size, char* szMemo ); Possible return values UFD_OK, UFD_ERROR, UFD_ERR_INVALID_PARAMETERS Parameters hDatabase nIndex pnSerial szUserID pnFingerIndex pTemplate1 pnTemplate1Size pTemplate2 pnTemplate2Size szMemo See also UFD_GetDataNumber, UFD_GetDataByUserInfo, UFD_GetDataBySerial Examples
Visual C++
[in] Handle of the database object [in] Specifies the index [out] Receives the serial number [out] Receives user ID Information [out] Receives finger index [out] Receives first fingerprint template data [out] Receives the size of template [out] Receives second fingerprint template data [out] Receives the size of template [out] Receives additional user data
Manual de Referencia SDK BioMini #define MAX_MEMO_SIZE 100 UFD_STATUS ufd_res; HUFDatabase hDatabase; int nIndex; int nSerial; char szUserID[MAX_USERID_SIZE]; int nFingerIndex; unsigned char Template1[MAX_TEMPLATE_SIZE]; int nTemplate1Size; unsigned char Template2[MAX_TEMPLATE_SIZE]; int nTemplate2Size; char szMemo[MAX_MEMO_SIZE]; // Get database handle, hDatabase // Get nIndex from user ufd_res = UFD_GetDataByIndex(hDatabase, nIndex, &nSerial, szUserID, &nFingerIndex, Template1, &nTemplate1Size, Template2, &nTemplate2Size, szMemo); if (ufd_res == UFD_OK) { // UFD_GetDataByIndex is succeeded } else { // UFD_GetDataByIndex is failed // Use UFD_GetErrorString function to show error string }
Visual Basic 6.0
Const MAX_USERID_SIZE As Long = 50 Const MAX_TEMPLATE_SIZE As Long = 1024 Const MAX_MEMO_SIZE As Long = 100 Dim ufd_res As UFD_STATUS Dim hDatabase As Long Dim Index As Long Dim Serial As Long Dim UserID As String Dim FingerIndex As Long Dim Template1(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template1Size As Long Dim Template2(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template2Size As Long Dim Memo As String ' Get database handle, hDatabase
150 Confidencial
Manual de Referencia SDK BioMini ' Get Index from user ufd_res = UFD_GetDataByIndex(hDatabase, Index, Serial, UserID, FingerIndex, Template1(0), Template1Size, Template2(0), Template2Size, Memo) If (ufd_res = UFD_STATUS.OK) Then ' UFD_GetDataByIndex is succeeded Else ' UFD_GetDataByIndex is failed ' Use UFD_GetErrorString function to show error string End If
151 Confidencial
UFD_GetDataByUserInfo
Gets the database entry having specified user ID and finger index. UFD_STATUS UFD_API UFD_GetDataByUserInfo( HUFDatabase hDatabase, const char* szUserID, int nFingerIndex, unsigned char* pTemplate1, int* pnTemplate1Size, unsigned char* pTemplate2, int* pnTemplate2Size, char* szMemo ); Possible return values UFD_OK, UFD_ERROR, UFD_ERR_INVALID_PARAMETERS Parameters hDatabase szUserID pnFingerIndex pTemplate1 pnTemplate1Size pTemplate2 pnTemplate2Size szMemo See also UFD_GetDataNumber, UFD_GetDataByIndex, UFD_GetDataBySerial Examples
Visual C++
[in] Handle of the database object [in] Specifies user ID Information [in] Specifies finger index [out] Receives first fingerprint template data [out] Receives the size of template [out] Receives second fingerprint template data [out] Receives the size of template [out] Receives additional user data
#define MAX_USERID_SIZE 50 #define MAX_TEMPLATE_SIZE 1024 #define MAX_MEMO_SIZE 100 UFD_STATUS ufd_res; HUFDatabase hDatabase; char szUserID[MAX_USERID_SIZE]; 152 Confidencial
Manual de Referencia SDK BioMini int nFingerIndex; unsigned char Template1[MAX_TEMPLATE_SIZE]; int nTemplate1Size; unsigned char Template2[MAX_TEMPLATE_SIZE]; int nTemplate2Size; char szMemo[MAX_MEMO_SIZE]; // Get database handle, hDatabase // Get szUserID, nFingerIndex from user ufd_res = UFD_GetDataByUserInfo(hDatabase, szUserID, nFingerIndex, Template1, &nTemplate1Size, Template2, &nTemplate2Size, szMemo); if (ufd_res == UFD_OK) { // UFD_GetDataByUserInfo is succeeded } else { // UFD_GetDataByUserInfo is failed // Use UFD_GetErrorString function to show error string }
Visual Basic 6.0
Const MAX_USERID_SIZE As Long = 50 Const MAX_TEMPLATE_SIZE As Long = 1024 Const MAX_MEMO_SIZE As Long = 100 Dim ufd_res As UFD_STATUS Dim hDatabase As Long Dim UserID As String Dim FingerIndex As Long Dim Template1(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template1Size As Long Dim Template2(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template2Size As Long Dim Memo As String ' Get database handle, hDatabase ' Get UserID, FingerIndex from user ufd_res = UFD_GetDataByUserInfo(hDatabase, UserID, FingerIndex, Template1(0), Template1Size, Template2(0), Template2Size, Memo) If (ufd_res = UFD_STATUS.OK) Then ' UFD_GetDataByUserInfo is succeeded Else ' UFD_GetDataByUserInfo is failed ' Use UFD_GetErrorString function to show error string 153 Confidencial
154 Confidencial
UFD_GetDataBySerial
Gets the database entry having specified serial number. UFD_STATUS UFD_API UFD_GetDataBySerial( HUFDatabase hDatabase, int nSerial, const char* szUserID, int* pnFingerIndex, unsigned char* pTemplate1, int* pnTemplate1Size, unsigned char* pTemplate2, int* pnTemplate2Size, char* szMemo ); Possible return values UFD_OK, UFD_ERROR, UFD_ERR_INVALID_PARAMETERS Parameters hDatabase nSerial szUserID pnFingerIndex pTemplate1 pnTemplate1Size pTemplate2 pnTemplate2Size szMemo See also UFD_GetDataNumber, UFD_GetDataByIndex, UFD_GetDataByUserInfo Examples
Visual C++
[in] Handle of the database object [in] Specifies the serial number [out] Receives user ID Information [out] Receives finger index [out] Receives first fingerprint template data [out] Receives the size of template [out] Receives second fingerprint template data [out] Receives the size of template [out] Receives additional user data
#define MAX_USERID_SIZE 50 #define MAX_TEMPLATE_SIZE 1024 #define MAX_MEMO_SIZE 100 UFD_STATUS ufd_res; 155 Confidencial
Manual de Referencia SDK BioMini HUFDatabase hDatabase; int nSerial; char szUserID[MAX_USERID_SIZE]; int nFingerIndex; unsigned char Template1[MAX_TEMPLATE_SIZE]; int nTemplate1Size; unsigned char Template2[MAX_TEMPLATE_SIZE]; int nTemplate2Size; char szMemo[MAX_MEMO_SIZE]; // Get database handle, hDatabase // Get nSerial from user ufd_res = UFD_GetDataBySerial(hDatabase, Serial, szUserID, &nFingerIndex, Template1, &nTemplate1Size, Template2, &nTemplate2Size, szMemo); if (ufd_res == UFD_OK) { // UFD_GetDataBySerial is succeeded } else { // UFD_GetDataBySerial is failed // Use UFD_GetErrorString function to show error string }
Visual Basic 6.0
Const MAX_USERID_SIZE As Long = 50 Const MAX_TEMPLATE_SIZE As Long = 1024 Const MAX_MEMO_SIZE As Long = 100 Dim ufd_res As UFD_STATUS Dim hDatabase As Long Dim Serial As Long Dim UserID As String Dim FingerIndex As Long Dim Template1(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template1Size As Long Dim Template2(MAX_TEMPLATE_SIZE - 1) As Byte Dim Template2Size As Long Dim Memo As String ' Get database handle, hDatabase ' Get Serial from user ufd_res = UFD_GetDataBySerial(hDatabase, Serial, UserID, FingerIndex, Template1(0), Template1Size, Template2(0), Template2Size, Memo) If (ufd_res = UFD_STATUS.OK) Then 156 Confidencial
Manual de Referencia SDK BioMini ' UFD_GetDataBySerial is succeeded Else ' UFD_GetDataBySerial is failed ' Use UFD_GetErrorString function to show error string End If
157 Confidencial
UFD_GetTemplateNumber
Gets the number of templates in specified database. UFD_STATUS UFD_API UFD_GetTemplateNumber( HUFDatabase hDatabase, int* pnTemplateNumber ); Possible return values UFD_OK, UFD_ERROR, UFD_ERR_INVALID_PARAMETERS Parameters hDatabase pnTemplateNumber See also UFD_GetTemplateListWithSerial Examples
Visual C++
[in] Handle of the database object [out] Receives the number of templates in the database
UFD_STATUS ufd_res; HUFDatabase hDatabase; int nTemplateNumber; // Get database handle, hDatabase ufd_res = UFD_GetTemplateNumber(hDatabase, &nTemplateNumber); if (ufd_res == UFD_OK) { // UFD_GetTemplateNumber is succeeded } else { // UFD_GetTemplateNumber is failed // Use UFD_GetErrorString function to show error string }
Visual Basic 6.0
Dim ufd_res As UFD_STATUS Dim hDatabase As Long Dim TemplateNumber As Long ' Get database handle, hDatabase 158 Confidencial
Manual de Referencia SDK BioMini ufd_res = UFD_GetTemplateNumber(hDatabase, TemplateNumber) If (ufd_res = UFD_STATUS.OK) Then ' UFD_GetTemplateNumber is succeeded Else ' UFD_GetTemplateNumber is failed ' Use UFD_GetErrorString function to show error string End If
159 Confidencial
UFD_GetTemplateListWithSerial
Gets all the template list with corresponding serial number list from specified database. UFD_STATUS UFD_GetTemplateListWithSerial( HUFDatabase hDatabase, unsigned char** ppTemplate, int* pnTemplateSize, int* pnSerial ); Possible return values UFD_OK, UFD_ERROR, UFD_ERR_INVALID_PARAMETERS Parameters hDatabase ppTemplate pnTemplateSize pnSerial See also UFD_GetTemplateNumber Examples
Visual C++
[in] Handle of the database object [out] Receives the template list [out] Receives the tempalte size list [out] Receives the serial number list
#define MAX_TEMPLATE_SIZE 1024 UFD_STATUS ufd_res; HUFDatabase hDatabase; int nTemplateNumber; unsigned char** ppTemplate; int* pnTemplateSize; int* pnSerial; int i; // Get database handle, hDatabase // Get nTemplateNumber using UFD_GetTemplateNumber function // Allocate templates list and serial list ppTemplate = (unsigned char**)malloc(nTemplateNumber * sizeof(unsigned char*)); 160 Confidencial
Manual de Referencia SDK BioMini for (i = 0; i < nTemplate2Num; i++) { ppTemplate[i] = (unsigned char*)malloc(MAX_TEMPLATE_SIZE * sizeof(unsigned char)); } pnTemplateSize = (int*)malloc(nTemplateNumber * sizeof(int)); pnSerial = (int*)malloc(nTemplateNumber * sizeof(int)); ufd_res = UFD_GetTemplateListWithSerial(hDatabase, ppTemplate, pnTemplateSize, pnSerial); if (ufd_res == UFD_OK) { // UFD_GetTemplateListWithSerial is succeeded } else { // UFD_GetTemplateListWithSerial is failed // Use UFD_GetErrorString function to show error string } // Use template list and serial list // Free templates list for (i = 0; i < nTemplateNumber; i++) { free(ppTemplate[i]); } free(ppTemplate); free(pnTemplateSize); free(pnSerial);
Visual Basic 6.0
Const MAX_TEMPLATE_SIZE As Long = 1024 Dim ufd_res As UFD_STATUS Dim hDatabase As Long Dim TemplateNumber As Long Dim Template() As Byte Dim TemplateSize() As Long Dim TemplatePtr() As Long Dim Serial() As Long ' Get database handle, hDatabase ' Get TemplateNumber using UFD_GetTemplateNumber function ' Allocate templates list and serial list ReDim Template(MAX_TEMPLATE_SIZE - 1, TemplateNumber - 1) As Byte ReDim TemplateSize(TemplateNumber - 1) As Long ReDim Serial(TemplateNumber - 1) As Long ' Make template pointer array to pass two dimensional template data 161 Confidencial
Manual de Referencia SDK BioMini ReDim TemplatePtr(TemplateNumber - 1) As Long For i = 0 To TemplateNumber - 1 TemplatePtr(i) = VarPtr(Template2(0, i)) Next ufd_res = UFD_GetTemplateListWithSerial(hDatabase, TemplatePtr(0), TemplateSize(0), Serial(0)) If (ufd_res = UFD_STATUS.OK) Then ' UFD_GetDataBySerial is succeeded Else ' UFD_GetDataBySerial is failed ' Use UFD_GetErrorString function to show error string End If
162 Confidencial
UFD_GetErrorString
Gets the error string for specified UFD_STAUS value. UFD_STATUS UFD_GetErrorString( UFD_STATUS res, char* szErrorString ); Possible return values UFD_OK, UFD_ERROR, UFD_ERR_INVALID_PARAMETERS Parameters res szErrorString Examples
Visual C++
UFD_STATUS ufd_res; char char strError[128]; // Get status return code, ufd_res ufd_res = UFD_GetErrorString(ufd_res, strError); if (ufd_res == UFD_OK) { // UFD_GetErrorString is succeeded } else { // UFD_GetErrorString is failed }
Visual Basic 6.0
Dim ufd_res As UFD_STATUS Dim m_strError As String ' Get status return code, ufd_res ufd_res = UFD_GetErrorString(ufd_res, strError) If (ufd_res = UFD_STATUS.OK) Then ' UFD_GetErrorString is succeeded Else ' UFD_GetErrorString is failed End If 163 Confidencial
164 Confidencial
Suprema.UFScanner module
Suprema.UFScanner module provides functionality for managing scanners, capture finger images from scanners, extracting templates from captured images using scanners, etc. Actually, Suprema.UFScanner module is C# wrapper dll of UFScanner.dll. The module is created using Visual C# 7.1 and compatible with .NET Framework 1.1 / 2.0 or higher.
Requirements
Visual C#, Visual Basic .NET
Supported scanners
List of supported scanners could be found in Mdulo UFScanner
165 Confidencial
Suprema namespace
Enumerations UFS_STATUS UFS_SCANNER_TYPE Delegates UFS_SCANNER_PROC UFS_CAPTURE_PROC Classes UFScannerManagerScannerEventArgs UFScannerCaptureEventArgs UFScannerManager UFScannerManager.ScannerList UFScanner Contains data of event ScannerEvent of UFScannerManager class Contains data of event CaptureEvent of UFScanner class Provides functionality for managing scanners Holds UFScanner list of the connected scanners Provides functionality for capturing finger images from scanners, extracting templates from captured images using scanners, etc Defines the delegate for the scanner event ScannerEvent Defines the delegate for the capture event CaptureEvent Every method in UFScanner module returns UFS_STATUS enumeration value UFScanner.ScannerType property gives UFS_SCANNER_TYPE enumeration value
166 Confidencial
UFS_STATUS enumeration
Every function in UFScanner module returns UFS_STATUS enumeration value.
public enum UFS_STATUS : int
Members UFS_STATUS member name OK ERROR ERR_NO_LICENSE ERR_LICENSE_NOT_MATCH ERR_LICENSE_EXPIRED ERR_NOT_SUPPORTED ERR_INVALID_PARAMETERS ERR_ALREADY_INITIALIZED ERR_NOT_INITIALIZED ERR_DEVICE_NUMBER_EXCEED ERR_LOAD_SCANNER_LIBRARY ERR_CAPTURE_RUNNING ERR_CAPTURE_FAILED ERR_NOT_GOOD_IMAGE ERR_EXTRACTION_FAILED ERR_CORE_NOT_DETECTED ERR_CORE_TO_LEFT ERR_CORE_TO_LEFT_TOP ERR_CORE_TO_TOP ERR_CORE_TO_RIGHT_TOP ERR_CORE_TO_RIGHT ERR_CORE_TO_RIGHT_BOTTOM ERR_CORE_TO_BOTTOM ERR_CORE_TO_LEFT_BOTTOM Code 0 -1 -101 -102 -103 -111 -112 -201 -202 -203 -204 -211 -212 -301 -302 -351 -352 -353 -354 -355 -356 -357 -358 -359 Meaning Success General error System has no license License is not match License is expired This function is not supported Input parameters are invalid Module is already initialized Module is not initialized Device number is exceed Error on loading scanner library Capturing is started using UFScanner.CaptureSingleImage or UFScanner.StartCapturing Capturing is timeout or aborted Input image is not good Extraction is failed Core is not detected Move finger to left Move finger to left-top Move finger to top Move finger to right-top Move finger to right Move finger to right-bottom Move finger to bottom Move finger to left-bottom
167 Confidencial
UFS_SCANNER_TYPE enumeration
UFScanner.ScannerType property gives UFS_SCANNER_TYPE enumeration value.
public enum UFS_SCANNER_TYPE : int
Members UFS_SCANNER_TYPE member name SFR200 SFR300 SFR300v2 Code 1001 1002 1003 Meaning Suprema SFR200 Suprema SFR300-S Suprema SFR300-S(Ver.2)
168 Confidencial
UFS_SCANNER_PROC delegate
Defines the delegate for the scanner event ScannerEvent
public delegate void UFS_SCANNER_PROC(object sender, UFScannerManagerScannerEventArgs e);
Parameters sender e The sender of the event A UFScannerManagerScannerEventArgs that contains the event data
169 Confidencial
UFS_CAPTURE_PROC delegate
Defines the delegate for the capture event CaptureEvent
public delegate void UFS_CAPTURE_PROC(object sender, UFScannerCaptureEventArgs e);
Parameters sender e The sender of the event A UFScannerCaptureEventArgs that contains the event data
170 Confidencial
UFScannerManagerScannerEventArgs class
Contains data of event ScannerEvent of UFScannerManager class.
public class UFScannerManagerScannerEventArgs : EventArgs
{ public string ScannerID; public bool SensorOn; } Properties ScannerID SensorOn Receives ID of the scanner which is occurred this event true: scanner is connected, false: scanner is disconnected
171 Confidencial
UFScannerCaptureEventArgs class
Contains data of event CaptureEvent of UFScanner class.
public class UFScannerCaptureEventArgs : EventArgs
{ public Bitmap ImageFrame; public int Resolution; public bool FingerOn; } Properties ImageFrame Resolution FingerOn Receives a captured image Receives the resolution of ImageFrame true: finger is on the scanner, false: finger is not on the scanner
172 Confidencial
UFScannerManager class
Constructors UFScannerManager Properties Scanners Events ScannerEvent Methods Init Update Uninit GetScannerNumber Initializes scanner module Enforces scanner module to update current connectivity of scanners Un-initializes scanner module Gets the number of scanners Occurs when the scanner is connected or disconnected Gets connected scanners as UFScannerManager.ScannerList Initializes a new instance of the UFScannerManager class
173 Confidencial
UFScannerManager constructor
Initializes a new instance of the UFScannerManager class. public UFScannerManager( ISynchronizeInvoke synInvoke ); Parameters synInvoke An ISynchronizeInvoke object
174 Confidencial
Scanners property
Gets connected scanners as UFScannerManager.ScannerList.
public UFScannerManager.ScannerList Scanners { get; }
175 Confidencial
ScannerEvent event
Occurs when the scanner is connected or disconnected. Scanner event is not working for every scanner model. Currently this functionality is working for Suprema SFR300-S(Ver.2) in windows 2000 / 2003 / XP only.
public event UFS_SCANNER_PROC ScannerEvent;
176 Confidencial
Init method
Initializes scanner module.
public UFS_STATUS Init();
Possible return values UFS_STATUS.OK, UFS_STATUS.ERROR, UFS_STATUS.ERR_ALREADY_INITIALIZED, UFS_STATUS.ERR_NO_LICENSE, UFS_STATUS.ERR_LICENSE_NOT_MATCH, UFS_STATUS.ERR_LICENSE_EXPIRED, UFS_STATUS.ERR_DEVICE_NUMBER_EXCEED
177 Confidencial
Update method
Enforces scanner module to update current connectivity of scanners.
public UFS_STATUS Update();
Possible return values UFS_STATUS.OK, UFS_STATUS.ERROR, UFS_STATUS.ERR_NOT_INITIALIZED, UFS_STATUS.ERR_NO_LICENSE, UFS_STATUS.ERR_LICENSE_NOT_MATCH, UFS_STATUS.ERR_LICENSE_EXPIRED, UFS_STATUS.ERR_DEVICE_NUMBER_EXCEED
178 Confidencial
Uninit method
Un-initializes scanner module.
public UFS_STATUS Uninit();
179 Confidencial
UFScannerManager.ScannerList class
Properties Count Item Gets the number of connected scanners Gets UFScanner reference by index or handle or ID of scanner
180 Confidencial
Count property
Gets the number of connected scanners.
public int Count { get; }
181 Confidencial
Item property
Gets UFScanner reference by index or handle or ID of scanner. public UFScanner this[int Index] { get; } public UFScanner this[IntPtr ScannerHandle] { get; } public UFScanner this[string ScannerID] { get; }
182 Confidencial
UFScanner class
Events CaptureEvent Properties ID Timeout Brightness Sensitivity Serial DetectCore TemplateSize UseSIF ScannerType IsSensorOn IsFingerOn IsCapturing Handle Methods SetScanner CaptureSingleImage StartCapturing AbortCapturing Extract SetEncryptionKey EncryptTemplate DecryptTemplate Sets current scanner instance using index / handle / ID information Captures single image. Captured image is stored to the internal buffer Starts capturing Aborts capturing Extracts a template from the stored image buffer Sets encryption key Encrypts template Decrypts template Gets scanner ID assigned to the scanner Gets or sets timeout value of the scanner Gets or sets brightness value of the scanner Gets or sets sensitivity value of the scanner Gets scanner serial assigned to the scanner Gets or sets whether detecting core when extracting templates Gets or sets template size limitation of the scanner Gets or sets whether using SIF for templates Gets scanner type of the scanner Checks the scanner is connected of not Checks a finger in placed on the scanner or not Checks capture process is running Gets handle assigned to the scanner Occurs when an image frame is captured from the scanner
183 Confidencial
Gets captured image from the buffer Draws the fingerprint image Saves the capture image buffer to the specified file of the bitmap format Saves the capture image buffer to the specified file of the tiff format Saves the capture image buffer to the specified file of the jpeg format Clears the capture image buffer Gets the error string
184 Confidencial
CaptureEvent event
After a capturing is started using StartCapturing, this event occurs when an image frame is captured from the scanner.
public event UFS_CAPTURE_PROC CaptureEvent;
185 Confidencial
ID property
Gets scanner ID assigned to the scanner.
public string ID { get; }
186 Confidencial
Timeout property
Gets or sets timeout value of the scanner. The unit is millisecond and 0 means infinity. Default value is 5000.
public int Timeout { get; set; }
187 Confidencial
Brightness property
Gets or sets brightness value of the scanner. The value ranges from 0 to 255. Higher value means darker image. Default value is 100.
public int Brightness { get; set; }
188 Confidencial
Sensitivity property
Gets or sets sensitivity value of the scanner. The value ranges from 0 to 7. Higher value means more sensitive. Default value is 4.
public int Sensitivity { get; set; }
189 Confidencial
Serial property
Gets scanner serial assigned to the scanner.
public string Serial { get; }
190 Confidencial
DetectCore property
Gets or sets whether detecting core when extracting templates. Default value is false.
public bool DetectCore { get; set; }
191 Confidencial
TemplateSize property
Gets or sets template size limitation of the scanner. The unit is bytes and the value ranges from 256 to 1024 and step size is 32. Default value is 384.
public int TemplateSize { get; set; }
192 Confidencial
UseSIF property
Gets or sets whether using SIF (biometric data standard interchange format) for templates. Default value is false.
public bool UseSIF { get; set; }
193 Confidencial
ScannerType property
Gets scanner type of the scanner.
public UFS_SCANNER_TYPE ScannerType { get; }
194 Confidencial
IsSensorOn property
Checks the scanner is connected of not.
public bool IsSensorOn { get; }
195 Confidencial
IsFingerOn property
Checks a finger in placed on the scanner or not.
public bool IsSensorOn { get; }
196 Confidencial
IsCapturing property
Checks if the specified scanner is running capturing which is started by CaptureSingleImage or StartCapturing.
public bool IsCapturing { get; }
197 Confidencial
Handle property
Gets handle assigned to the scanner.
public IntPtr Handle { get; }
198 Confidencial
SetScanner method
Sets current scanner instance using index / handle / ID information.
public UFS_STATUS SetScanner( int ScannerIndex ); public UFS_STATUS SetScanner(
IntPtr ScannerHandle ); public UFS_STATUS SetScanner( string ScannerID ); Possible return values UFS_STATUS.OK, UFS_STATUS.ERROR Parameters ScannerIndex ScannerHandle ScannerID [in] Set scanner instance using scanner index [in] Set scanner instance using scanner handle [in] Set scanner instance using scanner ID
199 Confidencial
CaptureSingleImage method
Captures single image. Captured image is stored to the internal buffer.
public UFS_STATUS CaptureSingleImage();
Possible return values UFS_STATUS.OK, UFS_STATUS.ERROR, UFS_STATUS.ERR_INVALID_PARAMETERS, UFS_STATUS.ERR_CAPTURE_RUNNING See also IsCapturing, AbortCapturing
200 Confidencial
StartCapturing method
Starts capturing. Whenever an image frame is captured, CaptureEvent is raised. Currently this method is working for Suprema SFR300-S(Ver.2) only.
public UFS_STATUS StartCapturing();
Possible return values UFS_STATUS.OK, UFS_STATUS.ERROR, UFS_STATUS.ERR_NOT_SUPPORTED, UFS_STATUS.ERR_INVALID_PARAMETERS, UFS_STATUS.ERR_CAPTURE_RUNNING Supported scanners Suprema SFR300-S(Ver.2) See also IsCapturing, AbortCapturing
201 Confidencial
AbortCapturing method
Aborts capturing which is started by CaptureSingleImage or StartCapturing.
public UFS_STATUS AbortCapturing();
Possible return values UFS_STATUS.OK, UFS_STATUS.ERROR, UFS_STATUS.ERR_NOT_SUPPORTED, UFS_STATUS.ERR_INVALID_PARAMETERS, UFS_STATUS.ERR_CAPTURE_RUNNING See also CaptureSingleImage, StartCapturing, IsCapturing
202 Confidencial
Extract method
Extracts a template from the stored image buffer which is acquired using CaptureSingleImage() or StartCapturing().
public UFS_STATUS Extract( byte[] Template, out int TemplateSize, out int EnrollQuality );
Possible return values UFS_STATUS.OK, UFS_STATUS.ERROR, UFS_STATUS.ERR_LICENSE_NOT_MATCH, UFS_STATUS.ERR_LICENSE_EXPIRED, UFS_STATUS.ERR_INVALID_PARAMETERS, UFS_STATUS.ERR_NOT_GOOD_IMAGE, UFS_STATUS.ERR_EXTRACTION_FAILED, UFS_STATUS.ERR_CORE_NOT_DETECTED, UFS_STATUS.ERR_CORE_TO_LEFT, UFS_STATUS.ERR_CORE_TO_LEFT_TOP, UFS_STATUS.ERR_CORE_TO_TOP, UFS_STATUS.ERR_CORE_TO_RIGHT_TOP, UFS_STATUS.ERR_CORE_TO_RIGHT, UFS_STATUS.ERR_CORE_TO_RIGHT_BOTTOM, UFS_STATUS.ERR_CORE_TO_BOTTOM, UFS_STATUS.ERR_CORE_TO_LEFT_BOTTOM Parameters Template TemplateSize EnrollQuality [out] Receives the template array; The array must be allocated in advance [out] Receives the size (in bytes) of Template [out] Receives the quality of enrollment; Quality value ranges from 1 to 100. Typically this value should be above 30 for further processing such as enroll and matching. Especially in case of enrollment, the use of good quality image ( above 50 ) is highly recommended.
203 Confidencial
SetEncryptionKey method
Sets encryption key.
public UFS_STATUS SetEncryptionKey( byte[] Key );
Possible return values UFS_STATUS.OK, UFS_STATUS.ERROR, UFS_STATUS.ERR_INVALID_PARAMETERS Parameters Key [in] 32 bytes key array; default key is first byte is 1 and second to 32th byte are all 0
204 Confidencial
EncryptTemplate method
Encrypts template.
public UFS_STATUS EncryptTemplate( byte[] TemplateInput, int TemplateInputSize, byte[] TemplateOutput, ref int TemplateOutputSize );
Possible return values UFS_STATUS.OK, UFS_STATUS.ERROR, UFS_STATUS.ERR_INVALID_PARAMETERS Parameters TemplateInput TemplateInputSize TemplateOutput TemplateOutputSize [in] Input template array [in] Input template size [out] Output template array [in / out] Inputs allocated size of output template array; Receives output template size
205 Confidencial
DecryptTemplate method
Decrypts template.
public UFS_STATUS DecryptTemplate( byte[] TemplateInput, int TemplateInputSize, byte[] TemplateOutput, ref int TemplateOutputSize );
Possible return values UFS_STATUS.OK, UFS_STATUS.ERROR, UFS_STATUS.ERR_INVALID_PARAMETERS Parameters TemplateInput TemplateInputSize TemplateOutput TemplateOutputSize [in] Input template array [in] Input template size [out] Output template array [in / out] Inputs allocated size of output template array; Receives output template size
206 Confidencial
GetCaptureImageBuffer method
Gets captured image from the buffer.
public UFS_STATUS GetCaptureImageBuffer( out Bitmap bitmap, out int Resolution );
Possible return values UFS_STATUS.OK, UFS_STATUS.ERROR, UFS_STATUS.ERR_INVALID_PARAMETERS Parameters bitmap Resolution [out] Receives a bitmap instance [out] Receives the resolution of bitmap
207 Confidencial
DrawCaptureImageBuffer method
Draws the fingerprint image which is acquired using CaptureSingleImage() or StartCapturing().
public UFS_STATUS DrawCaptureImageBuffer( Graphics g, Rectangle rect, bool DrawCore );
Possible return values UFS_STATUS.OK, UFS_STATUS.ERROR, UFS_STATUS.ERR_INVALID_PARAMETERS Parameters g rect DrawCore [in] Specifies graphics object to draw image buffer [in] Specifies position and size of image to be drawn [in] Specifies whether the core of fingerprint is drawn of not
208 Confidencial
SaveCaptureImageBufferToBMP method
Saves the capture image buffer to the specified file of the bitmap format.
public UFS_STATUS SaveCaptureImageBufferToBMP( string FileName );
Possible return values UFS_STATUS.OK, UFS_STATUS.ERROR, UFS_STATUS.ERR_INVALID_PARAMETERS Parameters FileName [in] Specifies file name to save image buffer
209 Confidencial
SaveCaptureImageBufferToTIF method
Saves the capture image buffer to the specified file of the tiff format.
public UFS_STATUS SaveCaptureImageBufferToTIF( string FileName );
Possible return values UFS_STATUS.OK, UFS_STATUS.ERROR, UFS_STATUS.ERR_INVALID_PARAMETERS Parameters FileName [in] Specifies file name to save image buffer
210 Confidencial
SaveCaptureImageBufferToJPG method
Saves the capture image buffer to the specified file of the jpeg format.
public UFS_STATUS SaveCaptureImageBufferToJPG( string FileName );
Possible return values UFS_STATUS.OK, UFS_STATUS.ERROR, UFS_STATUS.ERR_INVALID_PARAMETERS Parameters FileName [in] Specifies file name to save image buffer
211 Confidencial
ClearCaptureImageBuffer method
Clears the capture image buffer.
public UFS_STATUS ClearCaptureImageBuffer();
212 Confidencial
GetErrorString method
Gets the error string for specified UFS_STAUS value.
public static UFS_STATUS GetErrorString( UFS_STATUS res, out string ErrorString );
Possible return values UFS_STATUS.OK, UFS_STATUS.ERROR, UFS_STATUS.ERR_INVALID_PARAMETERS Parameters res ErrorString [in] Status return value [out] Receives error string
213 Confidencial
Suprema.UFMatcher module
Suprema.UFMatcher module provides functionality for verifying fingerprints using two templates, identifying fingerprints using the template array, etc. Actually, Suprema.UFMatcher module is C# wrapper dll of UFMatcher.dll. The module is created using Visual C# 7.1 and compatible with .NET Framework 1.1 / 2.0 or higher.
Requirements
Visual C#, Visual Basic .NET
214 Confidencial
Suprema namespace
Enumerations UFM_STATUS Classes UFMatcher UFMatcher class provides functionality for verifying fingerprints using two templates, identifying fingerprints using the template array, etc Every function in UFMatcher module returns UFM_STATUS enumeration value
215 Confidencial
UFM_STATUS enumeration
Every function in UFMatcher module returns UFM_STATUS enumeration value.
public enum UFM_STATUS : int
Members UFM_STATUS member name OK ERROR ERR_NO_LICENSE ERR_LICENSE_NOT_MATCH ERR_LICENSE_EXPIRED ERR_NOT_SUPPORTED ERR_INVALID_PARAMETERS ERR_MATCH_TIMEOUT ERR_MATCH_ABORTED ERR_TEMPLATE_TYPE Code 0 -1 -101 -102 -103 -111 -112 -401 -402 -411 Meaning Success General error System has no license License is not match License is expired This function is not supported Input parameters are invalid Matching is timeout Matching is aborted Template type is not match
216 Confidencial
UFMatcher class
Properties FastMode SecurityLevel UseSIF Methods Verify Identify IdentifyMT AbortIdentify IdentifyInit IdentifyNext RotateTemplate GetErrorString Compares two extracted templates Compares a template with given template array Use multi threads internally for faster identifying in multi-core systems Aborts current identifying procedure Initializes identify with input template Matches one input template to the template Rotates the specified template to the amount of 180 degrees Gets the error string Gets or sets whether fast mode is enable in identify method Gets or sets security level used in verify and identify method Gets or sets whether using SIF for templates
217 Confidencial
FastMode property
Gets or sets whether fast mode is enable in identify method. Default value is true.
public bool FastMode { get; set; }
218 Confidencial
SecurityLevel property
Gets or sets security level used in verify and identify method. The value ranges from 1 to 7. Default value is 4.
public int SecurityLevel { get; set; }
Relation between security level and false accept ratio Level 1 2 3 4 5 6 7 False Accept Ratio (FAR) Below 1 % (1e-2) Below 0.1 % (1e-3) Below 0.01 % (1e-4) Below 0.001 % (1e-5) Below 0.0001 % (1e-6) Below 0.00001 % (1e-7) Below 0.000001 % (1e-8)
219 Confidencial
UseSIF property
Gets or sets whether using SIF (biometric data standard interchange format) for templates. Default value is false.
public bool UseSIF { get; set; }
220 Confidencial
Verify method
Compares two extracted templates.
public UFM_STATUS Verify( byte[] Template1,
Possible return values UFM_STATUS.OK, UFM_STATUS.ERROR, UFM_STATUS.ERR_LICENSE_NOT_MATCH, UFM_STATUS.ERR_LICENSE_EXPIRED, UFM_STATUS.ERR_INVALID_PARAMETERS, UFM_STATUS.ERR_TEMPLATE_TYPE Parameters Template1 Template1Size Template2 Template2Size VerifySucceed [in] Specifies first template [in] Specifies the size of first template [in] Specifies second template [in] Specifies the size of second template [out] Receives whether verification is succeed; true: verification is succeed, false: verification is failed
221 Confidencial
int Template1Size, byte[][] Template2Array, int[] Template2SizeArray, int Template2Num, int Timeout, out int MatchTemplate2Index
); public UFM_STATUS Identify( byte[] Template1,
int Template1Size, byte[,] Template2Array, int[] Template2SizeArray, int Template2Num, int Timeout, out int MatchTemplate2Index
); public UFM_STATUS IdentifyMT( byte[] Template1, int Template1Size, byte[][] Template2Array, int[] Template2SizeArray, int Template2Num, int Timeout, out int MatchTemplate2Index ); public UFM_STATUS IdentifyMT( byte[] Template1, int Template1Size, byte[,] Template2Array, int[] Template2SizeArray, int Template2Num, int Timeout, out int MatchTemplate2Index ); Possible return values UFM_STATUS.OK, UFM_STATUS.ERROR, UFM_STATUS.ERR_LICENSE_NOT_MATCH, UFM_STATUS.ERR_LICENSE_EXPIRED, UFM_STATUS.ERR_INVALID_PARAMETERS, UFM_STATUS.ERR_MATCH_TIMEOUT, UFM_STATUS.ERR_MATCH_ABORTED, UFM_STATUS.ERR_TEMPLATE_TYPE Parameters
222 Confidencial
[in] Specifies input template [in] Specifies the size of input template [in] Specifies the template array [in] Specifies the template size array [in] Specifies the size of Template2Array or Template2SizeArray [in] Specifies maximum time for identifying in milliseconds; If elapsed time for identifying exceeds nTimeout, function stops further identifying and returns UFM_STATUS.ERR_MATCH_TIMEOUT; 0 means infinity [out] Receives the index of matched template in the template array; 1 means Template1 is not matched to all of templates in Template2Array
MatchTemplate2Index
223 Confidencial
AbortIdentify method
Aborts current identifying procedure started using Identify().
public UFM_STATUS AbortIdentify();
224 Confidencial
IdentifyInit method
Initializes identify with input template.
public UFM_STATUS IdentifyInit( byte[] Template1, int Template1Size );
Possible return values UFM_STATUS.OK, UFM_STATUS.ERROR, UFM_STATUS.ERR_LICENSE_NOT_MATCH, UFM_STATUS.ERR_LICENSE_EXPIRED, UFM_STATUS.ERR_INVALID_PARAMETERS Parameters Template1 Template1Size [in] Specifies input template [in] Specifies the size of input template
225 Confidencial
IdentifyNext method
Matches one input template to the template specified in IdentifyInit().
public UFM_STATUS IdentifyNext( byte[] Template2, int Template2Size,
Possible return values UFM_STATUS.OK, UFM_STATUS.ERROR, UFM_STATUS.ERR_LICENSE_NOT_MATCH, UFM_STATUS.ERR_LICENSE_EXPIRED, UFM_STATUS.ERR_INVALID_PARAMETERS, UFM_STATUS.ERR_TEMPLATE_TYPE Parameters Template2 Template2Size IdentifySucceed [in] Specifies the template [in] Specifies the size of the template [out] Receives whether identification is succeed; true: identification is succeed, false: identification is failed
226 Confidencial
RotateTemplate method
Rotates the specified template to the amount of 180 degrees.
public UFM_STATUS RotateTemplate(
byte[] Template, int TemplateSize ); Possible return values UFM_STATUS.OK, UFM_STATUS.ERROR, UFM_STATUS.ERR_INVALID_PARAMETERS Parameters Template TemplateSize [in / out] The template [in] Specifies the size of the template
227 Confidencial
GetErrorString method
Gets the error string for specified UFM_STAUS value.
public UFM_STATUS GetErrorString( UFM_STATUS res,
out string ErrorString ); Possible return values UFM_STATUS.OK, UFM_STATUS.ERROR, UFM_STATUS.ERR_INVALID_PARAMETERS Parameters res szErrorString [in] Status return value [out] Receives error sting
228 Confidencial
Suprema.UFDatabase module
Suprema.UFDatabase module provides functionality for managing database, adding / updating / removing / getting templates with user data, etc. Actually, Suprema.UFDatabase module is C# wrapper dll of UFDatabase.dll. The module is created using Visual C# 7.1 and compatible with .NET Framework 1.1 / 2.0 or higher.
Requirements
Visual C#, Visual Basic .NET
229 Confidencial
Suprema namespace
Enumerations UFD_STATUS Classes UFDatabase UFDatabse class provides functionality for managing database, adding / updating / removing / getting templates with user data, etc Every function in UFDatabase module returns UFE_STATUS enumeration value
230 Confidencial
UFD_STATUS enumeration
Every function in UFDatabase module returns UFD_STATUS enumeration value.
public enum UFD_STATUS : int
Members UFD_STATUS member name OK ERROR ERR_NO_LICENSE ERR_LICENSE_NOT_MATCH ERR_LICENSE_EXPIRED ERR_NOT_SUPPORTED ERR_INVALID_PARAMETERS ERR_SAME_FINGER_EXIST Code 0 -1 -101 -102 -103 -111 -112 -501 Meaning Success General error System has no license License is not match License is expired This function is not supported Input parameters are invalid Same finger exists on database
231 Confidencial
UFDatabase class
Methods Open Close AddData UpdateDataByUserInfo UpdateDataBySerial RemoveDataByUserID RemoveDataByUserInfo RemoveDataBySerial RemoveAllData GetDataNumber GetDataByIndex GetDataByUserInfo GetDataBySerial GetTemplateListWithSerial GetErrorString Opens a database Closes specified database Adds data into the specified database Updates the database entry having specified user ID and finger index Updates the database entry having specified serial number Removes the database entries having specified user ID Removes the database entries having specified user ID and finger index Removes the database entries having specified serial number Removes all database entries Gets the number of database entries Gets the database entry having specified index Gets the database entry having specified user ID and finger index Gets the database entry having specified serial number Gets all the template list with corresponding serial number list from specified database Gets the error string
232 Confidencial
Open method
Opens a database using specified connection string.
public UFD_STATUS Open( string Connection,
Possible return values UFD_STATUS.OK, UFD_STATUS.ERROR, UFD_STATUS.ERR_INVALID_PARAMETERS Parameters [in] Specifies ADO connection strings; to connect to an Access file using the JET OLE DB Provider, use "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=mdb_file_path;"; if database is password protected, use "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=mdb_file_path;Jet OLEDB:Database Password=mdb_password;" [in] Specifies user ID directly passed to ADO open method (can be null) [in] Specifies password directly passed to ADO open method (can be null)
Connection
UserID Password
233 Confidencial
Close method
Closes specified database.
public UFD_STATUS Close();
234 Confidencial
AddData method
Adds data into the specified database. If there is a database entry of same user ID with finger index with input data, the function returns UFD_STATUS.ERR_SAME_FINGER_EXIST.
public UFD_STATUS AddData(
string UserID, int FingerIndex, byte[] Template1, int Template1Size, byte[] Template2, int Template2Size, string Memo
);
Possible return values UFD_STATUS.OK, UFD_STATUS.ERROR, UFD_STATUS.ERR_INVALID_PARAMETERS, UFD_STATUS.ERR_SAME_FINGER_EXIST Parameters UserID FingerIndex Template1 Template1Size Template2 Template2Size Memo [in] Specifies user ID Information [in] Specifies finger index for Identifying finger [in] Specifies first fingerprint template data [in] Specifies the size of template [in] Specifies second fingerprint template data [in] Specifies the size of template [in] Specifies additional user data
235 Confidencial
UpdateDataByUserInfo method
Updates the database entry having specified user ID and finger index.
public UFD_STATUS UpdateDataByUserInfo(
string UserID, int FingerIndex, byte[] Template1, int Template1Size, byte[] Template2, int Template2Size, string Memo
);
Possible return values UFD_STATUS.OK, UFD_STATUS.ERROR, UFD_STATUS.ERR_INVALID_PARAMETERS Parameters UserID FingerIndex Template1 Template1Size Template2 Template2Size Memo [in] Specifies user ID Information [in] Specifies finger index for Identifying finger [in] Specifies first fingerprint template data; null indicates no update for template1 [in] Specifies the size of template; 0 indicates no update for template1 [in] Specifies second fingerprint template data; null indicates no update for template2 [in] Specifies the size of template; 0 indicates no update for template2 [in] Specifies additional user data; null indicates no update for memo
236 Confidencial
UpdateDataBySerial method
Updates the database entry having specified serial number.
public UFD_STATUS UpdateDataBySerial( int Serial,
byte[] Template1, int Template1Size, byte[] Template2, int Template2Size, string Memo
);
Possible return values UFD_STATUS.OK, UFD_STATUS.ERROR, UFD_STATUS.ERR_INVALID_PARAMETERS Parameters Serial Template1 Template1Size Template2 Template2Size Memo [in] Specifies serial number [in] Specifies first fingerprint template data; null indicates no update for template1 [in] Specifies the size of template; 0 indicates no update for template1 [in] Specifies second fingerprint template data; null indicates no update for template2 [in] Specifies the size of template; 0 indicates no update for template2 [in] Specifies additional user data; null indicates no update for memo
237 Confidencial
RemoveDataByUserID method
Removes the database entries having specified user ID.
public UFD_STATUS RemoveDataByUserID(
string UserID
);
Possible return values UFD_STATUS.OK, UFD_STATUS.ERROR, UFD_STATUS.ERR_INVALID_PARAMETERS Parameters UserID [in] Specifies user ID Information
238 Confidencial
RemoveDataByUserInfo method
Removes the database entries having specified user ID and finger index.
public UFD_STATUS RemoveDataByUserInfo(
Possible return values UFD_STATUS.OK, UFD_STATUS.ERROR, UFD_STATUS.ERR_INVALID_PARAMETERS Parameters UserID FingerIndex [in] Specifies user ID Information [in] Specifies finger index for Identifying finger
239 Confidencial
RemoveDataBySerial method
Removes the database entries having specified serial number.
public UFD_STATUS RemoveDataBySerial(
int Serial
);
Possible return values UFD_STATUS.OK, UFD_STATUS.ERROR, UFD_STATUS.ERR_INVALID_PARAMETERS Parameters Serial [in] Specifies serial number
240 Confidencial
RemoveAllData method
Removes all database entries.
public UFD_STATUS RemoveAllData();
241 Confidencial
GetDataNumber method
Gets the number of database entries.
public UFD_STATUS GetDataNumber( out int DataNumber );
Possible return values UFD_STATUS.OK, UFD_STATUS.ERROR, UFD_STATUS.ERR_INVALID_PARAMETERS Parameters DataNumber [out] Receives the number of database entries
242 Confidencial
GetDataByIndex method
Gets the database entry having specified index.
public UFD_STATUS GetDataByIndex( int Index,
out int Serial, out string UserID, out int FingerIndex, byte[] Template1, out int Template1Size, byte[] Template2, out int Template2Size, out string Memo
);
Possible return values UFD_STATUS.OK, UFD_STATUS.ERROR, UFD_STATUS.ERR_INVALID_PARAMETERS Parameters Index Serial UserID FingerIndex Template1 Template1Size Template2 Template2Size Memo [in] Specifies the index [out] Receives the serial number [out] Receives user ID Information [out] Receives finger index [out] Receives first fingerprint template data [out] Receives the size of template [out] Receives second fingerprint template data [out] Receives the size of template [out] Receives additional user data
243 Confidencial
GetDataByUserInfo method
Gets the database entry having specified user ID and finger index.
public UFD_STATUS GetDataByUserInfo( int Index,
out int Serial, out string UserID, out int FingerIndex, byte[] Template1, out int Template1Size, byte[] Template2, out int Template2Size, out string Memo
);
Possible return values UFD_STATUS.OK, UFD_STATUS.ERROR, UFD_STATUS.ERR_INVALID_PARAMETERS Parameters UserID FingerIndex Template1 Template1Size Template2 Template2Size Memo [in] Specifies user ID Information [in] Specifies finger index [out] Receives first fingerprint template data [out] Receives the size of template [out] Receives second fingerprint template data [out] Receives the size of template [out] Receives additional user data
244 Confidencial
GetDataBySerial method
Gets the database entry having specified serial number.
public UFD_STATUS GetDataBySerial( int Serial,
out string UserID, out int FingerIndex, byte[] Template1, out int Template1Size, byte[] Template2, out int Template2Size, out string Memo
);
Possible return values UFD_STATUS.OK, UFD_STATUS.ERROR, UFD_STATUS.ERR_INVALID_PARAMETERS Parameters Serial UserID FingerIndex Template1 Template1Size Template2 Template2Size Memo [in] Specifies the serial number [out] Receives user ID Information [out] Receives finger index [out] Receives first fingerprint template data [out] Receives the size of template [out] Receives second fingerprint template data [out] Receives the size of template [out] Receives additional user data
245 Confidencial
GetTemplateListWithSerial method
Gets all the template list with corresponding serial number list from specified database.
public UFD_STATUS GetTemplateListWithSerial(
out byte[][] TemplateArray, out int[] TemplateSizeArray, out int TemplateNum, out int[] SerialArray
);
Possible return values UFD_STATUS.OK, UFD_STATUS.ERROR, UFD_STATUS.ERR_INVALID_PARAMETERS Parameters TemplateArray TemplateSizeArray TemplateNum SerialArray [out] Receives the template list [out] Receives the tempalte size list [out] Receives the size of template list [out] Receives the serial number list
246 Confidencial
GetErrorString method
Gets the error string for specified UFD_STAUS value. public static UFD_STATUS GetErrorString( UFD_STATUS res, out string ErrorString ); Possible return values UFD_STATUS.OK, UFD_STATUS.ERROR, UFD_STATUS.ERR_INVALID_PARAMETERS Parameters res ErrorString [in] Status return value [out] Receives error sting
247 Confidencial
Apndice A. Contacto.
Oficinas
Sistemas Integrales de Automatizacin, S.A. de C.V. Tel: +55-99-99-30-25-75 Fax: +55-99-99-30-25-75
E-mail de Soporte.
Si usted desea solicitar apoyo a una duda o problema del SDK UF300/BioMini, enve un mail a [email protected] o a [email protected]
248 Confidencial
La distribucin de archivos del SDK UF300/BioMini est contenida en los siguientes directorios:
249 Confidencial
bin
Archivo Suprema.tlb Suprema.UFDatabase.dll Suprema.UFMatcher.dll Suprema.UFScanner.dll UFDatabase.dll UFDatabase.mdb UFE30_DatabaseDemoCS.exe UFE30_DatabaseDemoVBNET.exe UFE30_DatabaseDemoVC60.exe UFE30_DemoCS.exe UFE30_DemoVBNET.exe UFE30_DemoVC60.exe UFE30_MultiScannerDemoVC60.exe UFLicense.dat UFMatcher.dll UFScanner.dll UFScanner_IZZIX.dll
1)
Descripcin Type library for Visual Basic 6.0 Database module wrapper for .NET Matcher module wrapper for .NET Scanner module wrapper for .NET Database module Database file Database demo for C# Database demo for VB .NET Database demo for VC++ 6.0 Demo for C# Demo for VB .NET Demo for VC++ 6.0 Multi scanner demo License file Matcher module Scanner module Scanner sub module for SFR200
Producto Soportado
1)
250 Confidencial
docs
Archivo Manual de Referencia SDK UF300_BioMini.pdf
1)
251 Confidencial
include
Archivo UFDatabase.h UFMatcher.h UFScanner.h
1)
Descripcin Header file for database module Header file for matcher module Header file for scanner module PE = BioMini Enroll SDK, PS = BioMini SDK, PM = Match SDK
252 Confidencial
install
Archivo drivers\SFR200\IZZIX.98_ drivers\SFR200\IZZIX.cat drivers\SFR200\IZZIX.inf drivers\SFR200\IZZIX.xp_ drivers\SFR300-S\sfudusb.inf drivers\SFR300-S\sfudusb.sys drivers\SFR300S(Ver.2)\2000_XP\CyLoad.sys drivers\SFR300S(Ver.2)\2000_XP\CyUSB.sys drivers\SFR300S(Ver.2)\2000_XP\SFR300V2.inf drivers\SFR300S(Ver.2)\2000_XP\SFR300V2.spt drivers\SFR300S(Ver.2)\98_ME\firmware.sys drivers\SFR300S(Ver.2)\98_ME\Sfu-Usb.inf drivers\SFR300S(Ver.2)\98_ME\Sfu-Usb.sys
1)
Descripcin Driver file for SFR200 Driver file for SFR200 Driver file for SFR200 Driver file for SFR200 Driver file for SFR300-S Driver file for SFR300-S Driver file for SFR300-S(Ver.2), For Windows 2000, XP Driver file for SFR300-S(Ver.2), For Windows 2000, XP Driver file for SFR300-S(Ver.2), For Windows 2000, XP Driver file for SFR300-S(Ver.2), For Windows 2000, XP Driver file for SFR300-S(Ver.2), For Windows 98, ME Driver file for SFR300-S(Ver.2), For Windows 98, ME Driver file for SFR300-S(Ver.2), For Windows 98, ME
Producto Soportado 1) PE, PS PE, PS PE, PS PE, PS PE, PS PE, PS PE, PS PE, PS PE, PS PE, PS PE, PS PE, PS PE, PS
253 Confidencial
lib
Archivo UFDatabase.lib UFMatcher.lib UFScanner.lib
1)
Descripcin Library file for database module Library file for matcher module Library file for scanner module PE = BioMini Enroll SDK, PS = BioMini SDK, PM = Match SDK
254 Confidencial
samples
Archivo VS60\UFE30_DatabaseDemoVB60 VS60\UFE30_DatabaseDemoVC60 VS60\UFE30_DemoVB60 VS60\UFE30_DemoVC60 VS60\UFE30_MultiScannerDemoVC60 VS80\UFE30_DatabaseDemoCS VS80\UFE30_DatabaseDemoVBNET VS80\UFE30_DemoCS VS80\UFE30_DemoVBNET
1)
Descripcin Contains database demo sample project for Visual Basic 6.0 Contains database demo sample project for Visual C++ 6.0 Contains demo sample project for Visual Basic 6.0 Contains demo sample project for Visual C++ 6.0 Contains multi scanner demo sample project for Visual C++ 6.0 Contains database demo sample project for Visual C# Contains database demo sample project for Visual Basic .NET Contains demo sample project for Visual C# Contains demo sample project for Visual Basic .NET
Producto Soportado
1)
PS PS PS PS PS PS PS PS PS
255 Confidencial