Get the App
SLTechnology News&Howtos  ›  Development  › 

How to write bytes2BSTR

Shulou Source: shulou.com Published: 2022-06-03 08:36:13 11月15日 Update

This article mainly introduces "how to write bytes2BSTR". In daily operation, I believe many people have doubts about how to write bytes2BSTR. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the questions of "how to write bytes2BSTR". Next, please follow the editor to study!

The copy code is as follows:

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

At this point, the study on "how to write bytes2BSTR" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Learning code more help practical next articles methods theories knowledge articles websites materials follow questions easy to use practice solutions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Docker NVidia Linux Microsoft