D
dermot
None of the Converter tyeps (eg ASCIIEncoding )let you
convert between string and 8-bit bytes (0-255).
It took me a long time to find there is a way, well, at
least 2 ways.....here is the way to go fromn string to
bytes....
'Method 1
Dim Enc As Encoding = Encoding.GetEncoding(1252)
Dim pBytes() As Byte = Enc.GetBytes(S)
'Method 2
Dim pBytes() As Byte = Encoding.Default.GetBytes(S)
Dermot Balson
Free VBA code for user interfaces, internet connectivity,
encryption
http://www.webace.com.au/~balson/InsaneExcel/Default.html
Last updated August 2003
convert between string and 8-bit bytes (0-255).
It took me a long time to find there is a way, well, at
least 2 ways.....here is the way to go fromn string to
bytes....
'Method 1
Dim Enc As Encoding = Encoding.GetEncoding(1252)
Dim pBytes() As Byte = Enc.GetBytes(S)
'Method 2
Dim pBytes() As Byte = Encoding.Default.GetBytes(S)
Dermot Balson
Free VBA code for user interfaces, internet connectivity,
encryption
http://www.webace.com.au/~balson/InsaneExcel/Default.html
Last updated August 2003