无语,获取不了转个屁码,叫你测试下面的代码啊
For i As Integer = 1001 To 1016
Dim portflag As Integer = i
msgbox(i)
'变量声明
Dim CardPUCIIN As Byte() = New Byte(254) {}
Dim pucManaMsg As Byte() = New Byte(254) {}
Dim pucCHMsg As Byte() = New Byte(254) {}
Dim pucPHMsg As Byte() = New Byte(3023) {}
Dim puiCHMsgLen As UInt32 = 0
Dim puiPHMsgLen As UInt32 = 0
Dim st As Integer = 0
'读卡操作
st = SDT_StartFindIDCard(portflag, CardPUCIIN, 1)
If st <> &H9f Then
Continue For
End If
st = SDT_SelectIDCard(portflag, pucManaMsg, 1)
If st <> &H90 Then
Continue For
End If
st = SDT_ReadBaseMsg(portflag, pucCHMsg, puiCHMsgLen, pucPHMsg, puiPHMsgLen, 1)
If st <> &H90 Then
continue for
End If
'显示结果
msgbox(System.Text.ASCIIEncoding.Unicode.GetString(pucCHMsg))
next