A
anbeyon
Dear all,
I am having some trouble using the OpenNETCF libraries. Actually It's
VB.NET related.
My data being read from the serial port is being truncated in some way.
This is what I do.
<Snippet>
Dim sBuffer As String = ""
Dim Buffer(MasterPort.InBufferCount - 1) As Byte
Buffer = MasterPort.Input
sBuffer = sBuffer + UCase(System.Text.Encoding.ASCII.GetString(Buffer,
0, Buffer.Length))
</Snippet>
I am expecting to read a 6 byte command from the port and this is what
is reported by sBuffer.Length. However if one of the chars is the
string is = 0 the string is truncated.
Chars up to the 0 char can be read using sBuffer.Substring(x,y) those
including the 0 char and afterwards cannot.
How can I get around this problem ?
Thanks
Anbeyon
I am having some trouble using the OpenNETCF libraries. Actually It's
VB.NET related.
My data being read from the serial port is being truncated in some way.
This is what I do.
<Snippet>
Dim sBuffer As String = ""
Dim Buffer(MasterPort.InBufferCount - 1) As Byte
Buffer = MasterPort.Input
sBuffer = sBuffer + UCase(System.Text.Encoding.ASCII.GetString(Buffer,
0, Buffer.Length))
</Snippet>
I am expecting to read a 6 byte command from the port and this is what
is reported by sBuffer.Length. However if one of the chars is the
string is = 0 the string is truncated.
Chars up to the 0 char can be read using sBuffer.Substring(x,y) those
including the 0 char and afterwards cannot.
How can I get around this problem ?
Thanks
Anbeyon