Obtain the data storage status of the device, for example, number of administrators and number of current users.
Device number.
Data to be obtained. The value ranges from 1 to 22. Values:
1 Number of administrators
2 Number of registered users
3 Number of fingerprint templates in the device
4 Number of passwords
5 Number of operation records
6 Number of attendance records
7 Fingerprint template capacity
8 User capacity
9 Attendance record capacity
10 Residual fingerprint template capacity
11 Residual user capacity
12 Residual attendance record capacity
21 Number of faces
22 Face capacity
Returned 0 in other cases.
Value of dwStatus.
Return True if it is successful, or return False.
None
private void GetDeviceStatus(int dwStatus = 0, 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.GetDeviceStatus(MachineNumber, dwStatus, dwValue)) { MessageBox.Show("Successfully, the device Status is: " + dwValue.ToString(), "Success"); } else { axCZKEM1.GetLastError(ref idwErrorCode); MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error"); } }
Private Sub GetDeviceStatus(Optional dwStatus As Integer = 0, Optional dwValue As Integer, 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.GetDeviceStatus(MachineNumber, dwStatus, dwValue) = True Then MessageBox.Show("The Device Status is: " + dwValue.ToString(), "Success") Else axCZKEM1.GetLastError(idwErrorCode) MsgBox("Operation failed,ErrorCode=" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error") End If Cursor = Cursors.Default End Sub