Set the IP address of the device.
Device number.
IP address.
Return True if it is successful, or return False.
GetDeviceIP
//Create Standalone SDK class dynamicly. zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass(); axCZKEM1.Connect_Net("10.0.0.43", 4370); int iMachineNumber = 1; int idwErrorCode = 0; string sIP = ""; if (axCZKEM1.SetDeviceIP(iMachineNumber, sIP)) { axCZKEM1.RefreshData(iMachineNumber);//the data in the device should be refreshed MessageBox.Show("Successfully set IP address! IP=" + sIP, "Success"); } else { axCZKEM1.GetLastError(ref idwErrorCode); MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error"); }
'Create Standalone SDK class dynamicly. Dim axCZKEM1 As New zkemkeeper.CZKEM Dim bIsConnected = False 'the boolean value identifies whether the device is connected Dim sIP As String = "10.0.0.43" Dim sPort As Integer = 4370 Dim idwErrorCode As Integer = 0 Dim iMachineNumber As String = "serialNumber" bIsConnected = axCZKEM1.Connect_Net(sIP, Convert.ToInt32(sPort)) sIP = "10.0.0.45" If axCZKEM1.SetDeviceIP(iMachineNumber, sIP) = True Then axCZKEM1.RefreshData(iMachineNumber) 'the data in the device should be refreshed MsgBox("Successfully set IP address! IP=" & sIP, MsgBoxStyle.Information, "Success") Else axCZKEM1.GetLastError(idwErrorCode) MsgBox("Operation failed,ErrorCode=" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error") End If