bytes2BSTR
程序员文章站
2022-04-28 16:53:59
复制代码 代码如下:function bytes2bstr(vin) strreturn = "" &nb...
复制代码 代码如下:
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
推荐阅读