Solved

Using serial COM ports for test.

Posted on 1998-05-19
4
273 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
PDF writer for SBS 2008 11 76
Batch convert .doc to .docx 13 111
Need job search tool for follow-ups 6 54
IT Asset Management 5 49
Let’s list some of the technologies that enable smooth teleworking. 
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 goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
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.

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now