|
-
December 9th, 2003, 02:01 PM
#1
Sending uncoded zero (ASCI) data on RS232
I want to send uncoded (ASCII) numbers over the RS232 interface. I'm having problem with sending the number 0. Since this termitaes the string that I'm trying to send.
int zero = 0;
char h = 'h';
char e = 'e';
Meddelande.Format("%c%c%c", h, zero, e);
MeddelandeStorlek = Meddelande.GetLength();
length = tmpStr.GetLength();
CheckWrite = WriteFile(Port, (LPCSTR)Meddelande,
MeddelandeStorlek, Bitskickade, NULL);
Since zero will terminate the string e is never sent.
How do I get around the termination function of NUL?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|