That's cause you're printing it as a string. you should NEVER use a string when you're working with packets which are byte packed.
keep it as a byte array and use a binaryreader too read the packet.
about the printing part you could do something like this:
C#
Convert to vb
now you have the packet as a string but in hex.
Owh and I don't know if the vb part is correct I used a converter.
keep it as a byte array and use a binaryreader too read the packet.
about the printing part you could do something like this:
C#
Code:
string Packet = "";
for(int i = 0; i < inStream.Length; i++)
{
Packet += string.Format("{0:X2} ", inStream[i]);
}
Code:
Dim Packet As String = ""
For i As Integer = 0 To inStream.Length - 1
Packet += String.Format("{0:X2} ", inStream(i))
Next
Owh and I don't know if the vb part is correct I used a converter.