Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading Bytes 2

Status
Not open for further replies.

fergmj

Programmer
Feb 21, 2001
276
US
I have a string of bytes and I want to read that string byte by byte and convert each byte in the string to its own Hex value. How can I do this?

Thanks.

fergmj
 
You need to convert the string to a byte array. Try this . . .

Code:
Dim arrByte() as Byte

arrByte = {some string data}



Remember however that if this is a Unicode string (the default for Win32) every other byte will be a 0.




- Jeff Marler B-)
 
Jeff - I have converted it to a byte array. Now, how do I take each byte and convert that to a hex value?

Thanks

fergmj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top