Obtain the last error information.
Error code returned. Values are as follows:
-100 | Operation failed or data not exist |
-10 | Transmitted data length is incorrect |
-5 | Data already exists |
-4 | Space is not enough |
-3 | Error size |
-2 | Error in file read/write |
-1 | SDK is not initialized and needs to be reconnected |
0 | Data not found or data repeated |
1 | Operation is correct |
4 | Parameter is incorrect |
101 | Error in allocating buffer |
None
Return True if it is successful, or return False.
private static void GetLastError(string sIp = "10.0.0.44", int iPort = 4370) { //Create Standalone SDK class dynamicly. zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass(); axCZKEM1.Connect_Net(sIp, iPort); int idwErrorCode = 0; axCZKEM1.GetLastError(ref idwErrorCode); MessageBox.Show("The Last Error is ,ErrorCode=" + idwErrorCode.ToString(), "Error"); }
Private Shared Sub GetLastError(Optional ByVal sIp As String = "10.0.0.44", Optional ByVal iPort As Integer = 4370) 'Create Standalone SDK class dynamicly. Dim axCZKEM1 As New zkemkeeper.CZKEM axCZKEM1.Connect_Net(sIp, iPort) Dim idwErrorCode As Integer axCZKEM1.GetLastError(idwErrorCode) MsgBox("The Last Error is ,ErrorCode=" + idwErrorCode.ToString(), "Error") End Sub