?
Solved

Using serial COM ports for test.

Posted on 1998-05-19
4
Medium Priority
?
279 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 150 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

770 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