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
Solved

Using serial COM ports for test.

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
best free software for ripping cd's 11 175
How to learn Linux? 10 66
Windows 2012 R2 -- create 3.5TB GPT from unallocated space ? 1 53
Test the speeds on my PC Drives 12 62
Workplace bullying has increased with the use of email and social media. Retain evidence of this with email archiving to protect your employees.
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

808 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