我想在vb6中将字节数组转换为String。这就是为什么,我使用以下代码:
ReDim g_Template(dwLen) As Byte
i = 0
Do While Len(m_strTemplate) > 0
iPos = InStr(1, m_strTemplate, "$")
If (iPos > 0) Then
g_Template(i) = Mid(m_strTemplate, 1, iPos - 1)
m_strTemplate = Right(m_strTemplate, Len(m_strTemplate) - iPos)
i = i + 1
Else
Exit Do
End If
Loop
Dim FingerData As String
Dim iPos1 As Integer
FingerData = StrConv(g_Template, vbUnicode)
iPos1 = InStr(FingerData, Chr(0))
If iPos1 > 0 Then FingerData = Left(FingerData, iPos1 - 1)
但转换不会返回正确的String数据。错误在哪里?如何在vb6中将字节数据转换为String?