Set the communication password of the PC. A connection can be set up only when the PC and the device use the same communication password.
Current state of the device. Values are as follows:
0 Waiting
1 Registering a fingerprint
2 Identifying a fingerprint
3 Accessing menu
4 Busy (doing other tasks)
5 Waiting for writing data into card
Return True if it is successful, or return False.
None
/// <summary> /// Query the device's current state. Please refer to our development manual for more detailed parameters information. /// </summary> /// <param name="IP"> Ip of device </param> /// <param name="Port"> Port of Device </param> /// <param name="MachineNumber"> Device Number </param> private void QueryState(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; int State = 0; if (axCZKEM1.QueryState(ref State)) { MessageBox.Show("Successfully! QueryState=" + State.ToString(), "Success"); } else { axCZKEM1.GetLastError(ref idwErrorCode); MessageBox.Show("Operation failed, ErrorCode=" + idwErrorCode.ToString(), "Error"); } }
''' <summary> ''' Query the device's current state ''' Please refer to our development manual for more detailed parameters information. ''' </summary> ''' <param name="State"></param> ''' <param name="IP"> Ip of device </param> ''' <param name="Port"> Port of Device </param> ''' <param name="MachineNumber"> Device Number </param> Private Sub QueryState(Optional State As Integer = 1, 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.QueryState(State) = True Then MsgBox("The query state is=" & State, MsgBoxStyle.Information, "Success") Else axCZKEM1.GetLastError(idwErrorCode) MsgBox("Operation failed,ErrorCode=" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error") End If End Sub