Can chr$(0) be received using mscomm in VB?

Status
Not open for further replies.

StupidDum

New Member
In ASCII code, 0x0 represent NULL.
The VB code written by my fren could receive any other ASCII, except for chr$(0).
Could any one tell me how to do it?
 
I am not familar with BASIC (I'm program in C/C++), but ASCII 0 is used to terminate strings (when stored as null-terminated strings), and is often used as EOF (end of file) and EOT (end of transmission). If VB is interpreting ASCII 0 as any of those 3 things then it would appear not to be received.

When you receive the data, are you storing it into a string or a Byte array? You should be using the latter.

Dan East
 
Exo said:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/comm98/html/vbpronulldisc_comm.asp

THank a lot!!!
A few sentences solve my problem!!!!
I was thinking to re-define the communication protocol that defined by me, because the VB code written by my IT guy couldn't receive NULL
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…