这里没弄明白,也没办法调试。
Private Declare Function CVR_ReadBaseMsg Lib "termb.dll" (ByVal pucCHMsg() As Byte, ByVal puiCHMsgLen As Integer, _
ByVal pucPHMsg() As Byte, ByVal puiPHMsgLen As Integer, _
ByVal nMode As Integer) As Integer '读信息到内存
Private Declare Function GetPeopleName Lib "termb.dll" (ByVal strTmp() As Byte, ByVal strLen As Integer) As Integer '读姓名
Public Function GetName() As String
Dim CHMsg() As Byte
Dim CHMsfLen As Integer
Dim PHMsg() As Byte
Dim PHMsgLen As Integer
Dim NameBuff() As Byte
Dim Name As String
CVR_ReadBaseMsg(CHMsg, CHMsfLen, PHMsg, PHMsgLen, 2) '主要是这里不明白。传入的参数怎么没用到
GetPeopleName(NameBuff, 30)
Name = System.Text.Encoding.GetEncoding("GB2312").GetString(NameBuff)
Return Name
End Function