Enroll a user, and enable the device to enter enrollment state and wait until the user place a finger. Note: After this function is used, and a user enrolls the same finger three times to complete enrollment, the device may make no response. In this case, use StartIdentify to force the device to enter waiting state.
ID of the user to be enrolled
Index of the fingerprint of the user to be enrolled. The value ranges from 0 to 9.
Whether the fingerprint template is valid or is a threatened fingerprint template. 0: Invalid; 1: Valid; 3: Threatened fingerprint template.
Return True if it is successful, or return False.
CancelOperation, StartVerify, StartIdentify
//Make sure you have enrolled the fingerprint templates you will save private int iCanSaveTmp = 0; private void StartEnroll(string sIp = "10.0.0.44", int iPort = 4370, int iMachineNumber=1) { //Create Standalone SDK class dynamicly. zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass(); axCZKEM1.Connect_Net(sIp, iPort); int idwErrorCode = 0; string sUserID = "1"; int iFingerIndex = 1; int iFlag = 0; axCZKEM1.CancelOperation(); axCZKEM1.SSR_DelUserTmpExt(iMachineNumber, sUserID, iFingerIndex);//If the specified index of user's templates has existed ,delete it first.(SSR_DelUserTmp is also available sometimes) if (axCZKEM1.StartEnrollEx(sUserID, iFingerIndex, iFlag)) { MessageBox.Show("Start to Enroll a new User,UserID=" + sUserID + " FingerID=" + iFingerIndex.ToString() + " Flag=" + iFlag.ToString(), "Start"); iCanSaveTmp = 1; axCZKEM1.StartIdentify();//After enrolling templates,you should let the device into the 1:N verification condition } else { axCZKEM1.GetLastError(ref idwErrorCode); MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error"); } }
'Create Standalone SDK class dynamicly. Dim axCZKEM1 As New zkemkeeper.CZKEM 'Make sure you have enrolled the fingerprint templates you will save Dim iCanSaveTmp As Integer = 0 Private Sub StartEnrol(Optional ByVal sIp As String = "10.0.0.44", Optional ByVal iPort As Integer = 4370, Optional ByVal iMachineNumber As Integer = 1) axCZKEM1.Connect_Net(sIp, iPort) Dim idwErrorCode As Integer Dim sUserID = "1" Dim iFingerIndex = 1 Dim iFlag As Integer = 0 axCZKEM1.CancelOperation() axCZKEM1.SSR_DelUserTmpExt(iMachineNumber, sUserID, iFingerIndex) If axCZKEM1.StartEnrollEx(sUserID, iFingerIndex, iFlag) = True Then MsgBox("Start to Enroll a new User,UserID=" + sUserID + " FingerID=" + iFingerIndex.ToString() + " Flag=" + iFlag.ToString(), MsgBoxStyle.Information, "Start") iCanSaveTmp = 1 axCZKEM1.StartIdentify() 'After enrolling templates,you should let the device into the 1:N verification condition Else axCZKEM1.GetLastError(idwErrorCode) MsgBox("Operation failed,ErrorCode=" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error") End If End Sub