Solved

Using serial COM ports for test.

Posted on 1998-05-19
4
275 Views
Last Modified: 2013-11-15
How do I open a serial port for communication using C++. What I am trying to do is talk to a modem through COM 1 of the PC.
0
Comment
Question by:mvu
  • 2
4 Comments
 
LVL 2

Expert Comment

by:kellyjj
ID: 1250829
Are we talking about dos/windows?   I believe you can use the ioctrl and open commands for getting the port.
0
 
LVL 1

Accepted Solution

by:
glittle earned 50 total points
ID: 1250830
Use CreateFile to open the COM1 device and then ReadFile/WriteFile/etc.


0
 
LVL 1

Expert Comment

by:glittle
ID: 1250831
Oh yeah, one other ---

Once open, you then use SetCommXxx and GetCommXxx to control modem, handshaking, and or timeouts.  All of this is very well covered in the SDK online documentation.

0
 

Author Comment

by:mvu
ID: 1250832
Thank you, i will look into.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A list of useful business intelligence software.
All of the resources available today make learning a new digital media easier than ever-- if you know where to begin. This is a clear, simple guide to a few of the basic digital art mediums and how to begin learning them on your own.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question