Obtain device name.
Device number
Device name.
Return True if it is successful, or return False.
None
//Create Standalone SDK class dynamicly. zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass(); int iMachineNumber = 1; axCZKEM1.Connect_Net("10.0.0.43", 4370); int idwErrorCode = 0; string sProductCode = ""; if (axCZKEM1.GetProductCode(iMachineNumber, out sProductCode)) { MessageBox.Show("The Product Code is: " + sProductCode); } 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)) Dim sProductCode As String = "" If axCZKEM1.GetProductCode(iMachineNumber, sProductCode) = True Then MsgBox("The Device Serial Number is: " + sProductCode, "Success") Else axCZKEM1.GetLastError(idwErrorCode) MsgBox("Operation failed,ErrorCode=" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error") End If