is there any way to communite with LPT and Com port?![]()
i mean is like assembly language we can send signal to a device but now i want it in C++ programming.
can anyone give some example?![]()
how to open the port and the port name in C++.![]()
10z for help!!!!
This is a discussion on How to communicate with com port? within the C++ Programming forums, part of the General Programming Boards category; is there any way to communite with LPT and Com port? i mean is like assembly language we can send ...
is there any way to communite with LPT and Com port?![]()
i mean is like assembly language we can send signal to a device but now i want it in C++ programming.
can anyone give some example?![]()
how to open the port and the port name in C++.![]()
10z for help!!!!
Tell us which Operating system and Compiler you're using.
windows XP
using borland C++ and MS Visual C++....
This thread might be of some use for you: serial port programming
Basically, all you need are [assuming you ain't using threads] a handle, and the functions: ReadFile(), WriteFile(), CreateFile(), CloseFile().
I've posted a simple wrapper class for perform serial port I/O in this thread.
If you want to learn how to do it yourself: Serial Communications in Win32.
gg
10z i'll try it...
and how about for the LPT port?
Depends on the device, but you can read and write to "LPT1" is the same fashion using CreateFile(), ReadFile(), WriteFile() etc...
gg
If you have any problems on this project, or more detailed questions on the subject, I suggest you use the Network / Device Communications board - you're more likely to have your thread read by someone who is quite knowledgeable in that area.