Read attendance records one by one from the internal buffer. Before using this function, you can use ReadAllGLogData or ReadGeneralLogData to read attendance records from the device and write them into the internal buffer of the PC. Each time this function is executed, the pointer points to the next attendance record. This function is an enhancement of GetGeneralLogData and is compatible with GetGeneralLogData.
Pointer pointing to a long variable. The value is the work code of the received attendance record.
Reserved parameter without specific meanings. For other parameters, see GetGeneralLogData.
Return True if it is successful, or return False.
GetGeneralLogData
private void GetGeneralExtLogData(string sIp = "10.0.0.44", int iPort = 4370, int iMachineNumber = 1) { //Create Standalone SDK class dynamicly. zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass(); int idwErrorCode = 0; int idwEnrollNumber = 0; int idwVerifyMode = 0; int idwInOutMode = 0; int idwYear = 0; int idwMonth = 0; int idwDay = 0; int idwHour = 0; int idwMinute = 0; int idwSecond = 0; int idwWorkCode = 0; int idwReserved = 0; int iGLCount = 0; int iIndex = 0; axCZKEM1.EnableDevice(iMachineNumber, false);//disable the device if (axCZKEM1.ReadGeneralLogData(iMachineNumber))//read all the attendance records to the memory { while (axCZKEM1.GetGeneralExtLogData(iMachineNumber, ref idwEnrollNumber, ref idwVerifyMode, ref idwInOutMode, ref idwYear, ref idwMonth, ref idwDay, ref idwHour, ref idwMinute, ref idwSecond, ref idwWorkCode, ref idwReserved))//get records from the memory { iGLCount++; MessageBox.Show("iGLCount:"+iGLCount.ToString()+ "idwEnrollNumber: "+idwEnrollNumber.ToString() + "idwVerifyMode: "+idwVerifyMode.ToString() + "idwInOutMode: "+idwInOutMode.ToString() + "idwYear: "+idwYear.ToString() + " - " + idwMonth.ToString() + "-" + idwDay.ToString() + " " + idwHour.ToString() + ":" + idwMinute.ToString() + ":" + idwSecond.ToString() + "idwWorkCode: "+idwWorkCode.ToString() + "idwReserved :"+ idwReserved.ToString()); iIndex++; } } else { axCZKEM1.GetLastError(ref idwErrorCode); if (idwErrorCode != 0) { MessageBox.Show("Reading data from terminal failed,ErrorCode: " + idwErrorCode.ToString(), "Error"); } else { MessageBox.Show("No data from terminal returns!", "Error"); } } axCZKEM1.EnableDevice(iMachineNumber, true);//enable the device }
Private Sub GetGeneralExtLogData(Optional ByVal sIp As String = "10.0.0.44", Optional ByVal iPort As Integer = 4370, Optional ByVal iMachineNumber As Integer = 1) 'Create Standalone SDK class dynamicly. Dim axCZKEM1 As New zkemkeeper.CZKEM Dim idwErrorCode As Integer Dim idwEnrollNumber As Integer Dim idwVerifyMode As Integer Dim idwInOutMode As Integer Dim idwYear As Integer Dim idwMonth As Integer Dim idwDay As Integer Dim idwHour As Integer Dim idwMinute As Integer Dim idwSecond As Integer Dim idwWorkCode As Integer Dim idwReserved As Integer Dim lvItem As New ListViewItem("Items", 0) Dim iGLCount = 0 axCZKEM1.EnableDevice(iMachineNumber, False) 'disable the device If axCZKEM1.ReadGeneralLogData(iMachineNumber) Then 'read the records to the memory 'get the records from memory While axCZKEM1.GetGeneralExtLogData(iMachineNumber, idwEnrollNumber, idwVerifyMode, idwInOutMode, idwYear, idwMonth, idwDay, idwHour, idwMinute, idwSecond, idwWorkCode, idwReserved) iGLCount += 1 MsgBox("iGLCount:" & iGLCount.ToString() & "idwEnrollNumber:" & idwEnrollNumber.ToString() & "idwVerifyMode :" & idwVerifyMode.ToString() & "idwInOutMode :" & idwInOutMode.ToString() & "idwYear :" & idwYear.ToString() & "-" + idwMonth.ToString() & "-" & idwDay.ToString() & " " & idwHour.ToString() & ":" & idwMinute.ToString() & ":" & idwSecond.ToString() & "idwWorkCode:" & idwWorkCode.ToString() & "idwReserved:" & idwReserved.ToString()) End While Else axCZKEM1.GetLastError(idwErrorCode) If idwErrorCode <> 0 Then MsgBox("Reading data from terminal failed,ErrorCode: " & idwErrorCode, MsgBoxStyle.Exclamation, "Error") Else MsgBox("No data from terminal returns!", MsgBoxStyle.Exclamation, "Error") End If End If axCZKEM1.EnableDevice(iMachineNumber, True) 'enable the device End Sub