Solved

Using serial COM ports for test.

Posted on 1998-05-19
4
278 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
In this article, you will read about the trends across the human resources departments for the upcoming year. Some of them include improving employee experience, adopting new technologies, using HR software to its full extent, and integrating artifi…
The viewer will learn how to create multiple layers to apply various filters and how to delete areas from each layer’s filter.
Using Adobe Premiere Pro, the viewer will learn how to set up a sequence with proper settings, importing pictures, rendering, and exporting the finished product.

689 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