Obtain the MAC address of the device.
Device number
MAC address
Return True if it is successful, or return False.
SetDeviceMAC
Black & white devices, TFT devices
zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass(); int iMachineNumber = 1; int idwErrorCode = 0; string sMAC = ""; if (axCZKEM1.GetDeviceMAC(iMachineNumber, ref sMAC)) { MessageBox.Show("The configurated MAC is: " + sMAC); } 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 sMAC As String = "10:10:10:10:10:FF" Dim idwErrorCode As Integer = 0 Dim iMachineNumber As String = "serialNumber" bIsConnected = axCZKEM1.Connect_Net(sIP, Convert.ToInt32(sPort)) If axCZKEM1.GetDeviceMAC(iMachineNumber, sMAC) = True Then MsgBox("MAC address=" & sMAC, MsgBoxStyle.Information, "Success") Else axCZKEM1.GetLastError(idwErrorCode) MsgBox("Operation failed,ErrorCode=" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error") End If