Delete customized voice according to the original voice number. Note: This function is a
customized function. To use this function, the device must support customized voice. For
details, see EnableCustomizeVoice.
Device number
Original voice number
Return True if it is successful, or return False.
SetCustomizeVoice, EnableCustomizeVoice
/// <summary> /// Delete customized voice according to the original voice number. Note: This function is a customized function. /// To use this function, the device must support customized voice. For details, see EnableCustomizeVoice. /// </summary> /// <param name="VoiceID ">Original voice number</param> /// <param name="IP"> Ip of device </param> /// <param name="Port"> Port of Device </param> /// <param name="MachineNumber"> Device Number </param> private void DelCustomizeVoice(int VoiceID, 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; if (axCZKEM1.DelCustomizeVoice(MachineNumber, VoiceID)) { MessageBox.Show("DelCustomizeVoice! ", "Success"); } else { axCZKEM1.GetLastError(ref idwErrorCode); MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error"); } }
''' <summary> ''' Delete customized voice according to the original voice number. Note: This function is a customized function. ''' To use this function, the device must support customized voice. For details, see EnableCustomizeVoice. ''' </summary> ''' <param name="VoiceID ">Original voice number</param> ''' <param name="IP"> Ip of device </param> ''' <param name="Port"> Port of Device </param> ''' <param name="MachineNumber"> Device Number </param> Private Sub DelCustomizeVoice(ByVal VoiceID As Integer, Optional IP As String = "10.0.0.44", Optional Port As Integer = 4370, Optional MachineNumber As Integer = 1) 'Create Standalone SDK class dynamicly. Dim axCZKEM1 As zkemkeeper.CZKEMClass = New zkemkeeper.CZKEMClass() axCZKEM1.Connect_Net(IP, Port) Dim idwErrorCode As Integer = 0 If axCZKEM1.DelCustomizeVoice(MachineNumber, VoiceID) Then MessageBox.Show("DelCustomizeVoice! ", "Success") Else axCZKEM1.GetLastError(idwErrorCode) MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error") End If End Sub