Com1, Graphing from file. [Archive] - C Board

PDA

View Full Version : Com1, Graphing from file.


The Exodus
08-05-2003, 12:46 AM
This is a Win32 application.
I want to read from the comm. port. (I think you use CreateFile()?)
I then want to read that file that was created when i read from the comm port and construct a gaph out of the information that was obtained.

I think thats how it works, i am not quite sure. But thats what i need to do.

i just want to make a graph made from the information at the comm port . I want to be able to print and save the graph.

Thank you.
----------------------------
EDIT:
I dont even care about the graph right now. I just want to get the information from the serial port and save it to a text file or sumthing. Pplease help. I have been endlessly working.

i figured out how to open the serial port:


HANDLE m_hCommPort = ::CreateFile( szPortName,
GENERIC_READ|GENERIC_WRITE,
0,

0,
OPEN_EXISTING,
FILE_FLAG_OVERLAPPED,
0

);

Hunter2
08-07-2003, 05:48 PM
Umm, not sure what you're looking for. Could you be more specific? If you're just looking to get data from the port, I believe you can use the ReadFile() function. Also, I may be wrong (you've done the research), but you might not need the FILE_FLAG_OVERLAPPED. Try just putting 0, or FILE_ATTRIBUTE_NORMAL.