Delete the face templates of a user.
Device number
UserID (with less than 24 bits)
Face index. The value can be only 50, that is, deleting all face templates of the user
Return True if it is successful, or return False.
GetUserFace, SetUserFace, SetUserFaceStr, GetUserFaceStr
/// <summary> /// Upload face templates of a user. The only difference between this function is SetUserFaceStr is the face template format. /// </summary> /// <param name="EnrollNumber">UserID (with less than 24 bits)</param> /// <param name="TmpLength">Face template </param> /// <param name="IP"> Ip of device </param> /// <param name="Port"> Port of Device </param> /// <param name="MachineNumber"> Device Number </param> private void DelUserFace(string EnrollNumber, string IP = "10.0.0.44", int Port = 4370, int MachineNumber = 1) { //Create Standalone SDK class dynamicly. zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass(); axCZKEM1.Connect_Net(IP, Port); int idwErrorCode = 0; int FaceIndex = 50; if (axCZKEM1.DelUserFace(MachineNumber, EnrollNumber, FaceIndex))//get the face templates from the memory { MessageBox.Show("DelUserFace! UserID: " + EnrollNumber + ", FaceIndex: " + FaceIndex.ToString(), "Success"); } else { axCZKEM1.GetLastError(ref idwErrorCode); MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error"); } }
''' <summary> ''' Upload face templates of a user. The only difference between this function Is SetUserFaceStr Is the face template format. ''' </summary> ''' <param name="EnrollNumber">UserID (with less than 24 bits)</param> ''' <param name="TmpLength">Face template </param> ''' <param name="IP"> Ip of device </param> ''' <param name="Port"> Port of Device </param> ''' <param name="MachineNumber"> Device Number </param> Private Sub DelUserFace(EnrollNumber As String, TmpLength As Integer, Optional IP As String = "10.0.0.44", Optional Port As Integer = 4370, Optional MachineNumber As Integer = 1) Dim idwErrorCode As Integer = 0 'Create Standalone SDK class dynamicly. Dim axCZKEM1 As New zkemkeeper.CZKEM axCZKEM1.Connect_Net(IP, Convert.ToInt32(Port)) Dim FaceIndex As Integer = 50 If (axCZKEM1.DelUserFace(MachineNumber, EnrollNumber, FaceIndex)) Then MsgBox("DelUserFace! UserID: " & EnrollNumber & ", FaceIndex: " & FaceIndex.ToString(), MsgBoxStyle.Information, "Success") Else axCZKEM1.GetLastError(idwErrorCode) MsgBox("Operation failed,ErrorCode=" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error") End If End Sub