![]() |
|
#1
|
|||
|
|||
Serial com for modem / CSerialPortHi there. I ve begun to write a small app in MFC so I can send/receive SMS / Calls without using any terminal.
I'm using CSerialPort 1.27 and I just have written down a few lines in this way CPP / C++ / C Code:
just to test it. It doesn't work, and given my recent bitter experiance with serial coms in .net, I begin to get paranoid.. Please any help would be very helpful, thanks in advance. Last edited by LuciWiz : 12-Jan-2009 at 07:12.
Reason: Please insert your C++ code between [cpp] & [/cpp] tags
|
|||
|
#2
|
|||
|
|||
Re: serial com for modem / CSerialPortQuote:
To create a string literal, you can use \xcc to embed the hexadecimal value of a char. For example, the hex value of decimal 13 is 0x0d, so you could have CPP / C++ / C Code:
To embed certain C (and C++) special chars such as \r, you can just use the special char designation inside the quotes The intent of the following is more clear (to me, at least), and I don't have to depend on future code maintainers having memorized the hexadecimal value for ASCII carriage-return, so I would recommend something like: CPP / C++ / C Code:
Here's a reference to my second example: Constants Here's a standard C++ test program (no MFC stuff or any other non-Standard library classes): CPP / C++ / C Code:
Printing chars (separated by commas) are shown between single quote marks and decimal values of non-printing chars are shown between angle brackets: Code:
Regards, Dave Last edited by davekw7x : 12-Jan-2009 at 09:26.
|
|
#3
|
|||
|
|||
Re: serial com for modem / CSerialPortreally, this couldn't be more helpful, Dave...
Thanks man, all works fine now |
Recent GIDBlog
Once again, no time for hobbies by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Hard drive/CPU Diagnoses Issues | binarybug | Computer Hardware Forum | 1 | 22-Jan-2007 20:23 |
| Serial Port Communication | a3.charles | C Programming Language | 0 | 04-Aug-2006 00:42 |
| receive X10 signals with w800rf32a serial | soldstatic | C++ Forum | 0 | 06-Jul-2006 14:44 |
| Problem to read on a serial port | collinm | C Programming Language | 2 | 30-Mar-2005 02:42 |
| Serial Port communication in C or C++ | dmkst56 | C++ Forum | 0 | 23-Mar-2005 21:18 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The