28,390
社区成员
发帖
与我相关
我的任务
分享
)'修改你的转换函数试试
Function b2BSTR(vIn)
strReturn = ""
For i = 1 To LenB(vIn)
if MidB(vIn,i,1)<>chrb(10) and MidB(vIn,i,1)<>chrb(13) then'加个判断不为2进制回车字符时再转换
ThisCharCode = AscB(MidB(vIn,i,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i+1,1))
strReturn = strReturn & Chr (CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i = i + 1
End If
end if
Next
b2BSTR = strReturn
End Function