Link to home
Start Free TrialLog in
Avatar of uffe78
uffe78

asked on

How do I communicate with the RS232 port in VC++ 6.0

I´m working on a project including communication with external processors via the Serial RS232-port. The problem is, I don´t really know how to communicate with the serial port using VC++ at all! soo if anyone knows how to just read the info on the port using normal 19.2 kBaud should be enoungh to start with...

Thanks!
_____________________________
Ulf Andersson
Microlab Systems Co.
Gothenburg, Sweden.
ASKER CERTIFIED SOLUTION
Avatar of jbalagop
jbalagop

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jbalagop
jbalagop

The above is a comment. Also, since you used CreateFile() it retuerns a handle to the communication port. You may read or write using this handle. Make sure you have status checking in your reader and writer threads, because the connection may be reset and you have to make sure it isn;t so before writing , etc/
Avatar of uffe78

ASKER

Since I haven´t got into this language yet, could you please rewrite the code so that it matches 19.2kBaud on serial comport 2 The transfer is standard 8bit, 1 stop-bit and without parity...

/Ulf
hi uffe78, all the above functions have detailed examples in the help files or check out the msdn.microsoft.com (the library).
i believe that they even have a serial communication example.