Set the related information of the device, such as language and repeated record time.
Device number.
Type of the information to be set. The value ranges from 1 to 20. For the meanings of values, see GetDeviceInfo.
Value of the information described by dwInfo.
Return True if it is successful, or return False.
GetDeviceInfo
private void SetDeviceInfo(int dwInfo = 1, int dwValue = 2, 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.SetDeviceInfo(MachineNumber, dwInfo, dwValue)) { axCZKEM1.RefreshData(MachineNumber);//the data in the device should be refreshed MessageBox.Show("Successfully set the device information", "Success"); } else { axCZKEM1.GetLastError(ref idwErrorCode); MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error"); } }
Private Sub SetDeviceInfo(Optional dwInfo As Integer = 1, Optional dwValue As Integer = 2, 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)) If axCZKEM1.SetDeviceInfo(MachineNumber, dwInfo, dwValue) = True Then MsgBox("Successfully set the device information", MsgBoxStyle.Information, "Success") Else axCZKEM1.GetLastError(idwErrorCode) MsgBox("Operation failed,ErrorCode=" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error") End If End Sub