N
N
NeoZeed2014-05-30 10:27:15
C++ / C#
NeoZeed, 2014-05-30 10:27:15

How to read data from com port in C++ VS2010?

Complete zero in this matter, where can I find literature

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
svd71, 2014-05-30
@NeoZeed

msdn.microsoft.com/en-us/library/system.io.ports.s...
msdn.microsoft.com/en-us/library/ff802693.aspx
All literature on msdn.microsoft.com

E
Eugene, 2014-05-30
@EvgenijDv

If there is no desire to bother with events, then you can do something like this:
CreateFile("COM0"...);
GetCommState();
Fill in the received DCB structure
SetCommState();
GetCommTimeouts();
Setting timeouts
SetCommTimeout();
Read and write to port via WriteFile and ReadFile

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question