Public Declare Function ISO15693_Read Lib "mi.dll" (ByVal flag As Byte, ByVal blk_add As Byte, ByVal num_blk As Byte, ByRef uid As Byte, ByRef buffer As Byte) As Long
Private Function FormatErrorCode(ByRef bytes() As Byte) As String Select Case bytes(0) Case &H80 FormatErrorCode = "Success" Case &H81 FormatErrorCode = "Parameter Error" Case &H82 FormatErrorCode = "Communication TimeOut" Case &H83 FormatErrorCode = "Can't Find Card" Case Else FormatErrorCode = "Command Error" End Select End Function
//转换错误代码
private string FormatErrorCode(byte[] byteArray)
{
string strErrorCode = "";
switch (byteArray[0])
{
case 0x80:
strErrorCode = "Success";
break;
case 0x81:
strErrorCode = "Parameter Error";
break; case 0x82:
strErrorCode = "communication TimeOut";
break; case 0x83:
strErrorCode = "Couldn't Find Card ";
break;
default:
strErrorCode = "Commond Error";
break;
} return strErrorCode;
}
Private Function FormatErrorCode(ByRef bytes() As Byte) As String
Select Case bytes(0)
Case &H80
FormatErrorCode = "Success"
Case &H81
FormatErrorCode = "Parameter Error"
Case &H82
FormatErrorCode = "Communication TimeOut"
Case &H83
FormatErrorCode = "Can't Find Card"
Case Else
FormatErrorCode = "Command Error"
End Select
End Function