本帖最后由 hilary_1989 于 2012-04-27 16:28:19 编辑

解决方案 »

  1.   

    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
      

  2.   

    上面的的已解決,急求下面的怎麼裝換:紅色字部份
    //转换错误代码
            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;
            }
      

  3.   

    用 if  thenelseif thenenf if
      

  4.   


    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