亲宝软件园·资讯

展开

bytes2BSTR

人气:0
想了解bytes2BSTR的相关内容吗,在本文为您仔细讲解的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:bytes2BSTR,下面大家一起来学习吧。

复制代码 代码如下:

Function bytes2BSTR(vIn) 
 strReturn = "" 
 For i = 1 To LenB(vIn) 
 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 
 Next 
 bytes2BSTR = strReturn 
End Function  

加载全部内容

相关教程
猜你喜欢
用户评论