文件名称:中控指纹识别软件开发包Biokey SDK3.0 PRO
文件大小:5.05MB
文件格式:RAR
更新时间:2012-09-27 13:51:26
中控 指纹识别 Biokey SDK
VB 一对一 Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Dim FTempLen As Integer Dim FRegTemplate As Variant Dim FingerCount As Long Dim FMatchType As Integer Private Declare Function MessageBox Lib "user32" Alias "MessageBoxA" (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Long) As Long Private Sub cmdEnroll_Click() If Trim(TextFingerName.Text) = "" Then MessageBox 0, "请输入指纹名称标识!", "错误", 0 Exit Sub End If ZKFPEngX1.BeginEnroll StatusBar.Caption = "开始登记" End Sub Private Sub cmdIdentify_Click() If ZKFPEngX1.IsRegister Then ZKFPEngX1.CancelEnroll End If StatusBar.Caption = "开始比对(1:N)" FMatchType = 2 End Sub Private Sub cmdInit_Click() If ZKFPEngX1.InitEngine = 0 Then MessageBox 0, "初始化成功!", "提示信息", 0 StatusBar.Caption = "指纹仪连接" TextSensorCount.Text = ZKFPEngX1.SensorCount & "" TextSensorIndex.Text = ZKFPEngX1.SensorIndex & "" TextSensorSN.Text = ZKFPEngX1.SensorSN cmdInit.Enabled = False FMatchType = 0 End If End Sub Private Sub cmdReadMemory_Click() Dim i, p1 As Long, p2 As Long Dim p As Variant Dim s As String p1 = 0 p2 = 23 ZKFPEngX1.DongleMemRead p1, p2, p s = "" For i = LBound(p) To UBound(p) s = s & Chr(p(i)) Next TextRead.Text = s End Sub Private Sub cmdSaveMemory_Click() Dim p1 As Long, p2 As Long Dim p() As Byte Dim i As Integer Dim s As String p1 = 0 p2 = Len(TextWrite.Text) s = TextWrite.Text ReDim p(Len(s)) For i = 0 To Len(s) - 1 p(i) = Asc(Mid(s, i + 1)) Next ZKFPEngX1.DongleMemWrite p1, p2, p End Sub Private Sub cmdSaveImage_Click() Dim sFileName As String sFileName = "C:\Fingerprint" If OptionBmp.Value Then ZKFPEngX1.SaveBitmap sFileName & ".bmp" Else ZKFPEngX1.SaveJPG sFileName + ".jpg" End If MessageBox 0, "文件保存成功(" + sFileName + ")!", "", 0 End Sub Private Sub cmdVerify_Click() If ZKFPEngX1.IsRegister Then ZKFPEngX1.CancelEnroll End If ZKFPEngX1.BeginCapture StatusBar.Caption = "开始比对(1:1)" FMatchType = 1 End Sub Private Sub Form_Load() FingerCount = 0 End Sub Private Sub ZKFPEngX1_OnCapture(ByVal ActionResult As Boolean, ByVal ATemplate As Variant) Dim fi As Long, i As Long Dim Score As Long, ProcessNum As Long Dim RegChanged As Boolean Dim sTemp As String sTemp = ZKFPEngX1.EncodeTemplate1(ATemplate) ATemplate = ZKFPEngX1.DecodeTemplate1(sTemp) StatusBar.Caption = "取得指纹特征" If FMatchType = 1 Then '1:1 If ZKFPEngX1.VerFinger(FRegTemplate, ATemplate, False, RegChanged) Then MessageBox 0, "指纹比对成功!", "信息提示", 0 Else MessageBox 0, "指纹比对失败!", "信息提示", 0 End If 'If ZKFPEngX1.VerRegFingerFile("c:\fingerprint.tpl", ATemplate) Then ' MessageBox 0, "文件指纹比对成功!", "信息提示", 0 'Else ' MessageBox 0, "文件指纹比对失败!", "信息提示", 0 'End If End If End Sub Private Sub ZKFPEngX1_OnEnroll(ByVal ActionResult As Boolean, ByVal ATemplate As Variant) Dim i As Long If Not ActionResult Then MessageBox 0, "指纹登记失败!", "警告", 0 Else MessageBox 0, "指纹登记成功!", "信息", 0 FRegTemplate = ATemplate ZKFPEngX1.SaveTemplate "c:\fingerprint.tpl", ATemplate FingerCount = FingerCount + 1 End If End Sub Private Sub ZKFPEngX1_OnFeatureInfo(ByVal AQuality As Long) Dim sTemp As String sTemp = "" If ZKFPEngX1.IsRegister Then sTemp = "登记状态: 还需要按压" & ZKFPEngX1.EnrollIndex & "次手指!" End If sTemp = sTemp & " 指纹质量" If AQuality <> 0 Then sTemp = sTemp & "不合格: " & AQuality Else sTemp = sTemp & "合格" End If StatusBar.Caption = sTemp End Sub Private Sub ZKFPEngX1_OnImageReceived(AImageValid As Boolean) ZKFPEngX1.PrintImageAt hDC, FrameCommands.Width + 6, FrameCommands.Top, ZKFPEngX1.ImageWidth, ZKFPEngX1.ImageHeight End Sub
【文件预览】:
uau
----setup.exe(3.91MB)
----license.rtf(51KB)
----SDK()
--------One()
--------Many()
--------Manual.doc(308KB)