Solved

Communication with devices connected to serial com or parallel ports

Posted on 1998-09-01
4
226 Views
Last Modified: 2013-11-20
How can I communicte with devices connected to my PC serial
or pralllel ports when developing my application using MFC

Thanks and regards,
Neo
0
Comment
Question by:essneo
[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 23

Accepted Solution

by:
chensu earned 50 total points
ID: 1321587
A process uses the CreateFile function to open a handle to a communications resource. For example, specifying COM1 opens a handle to a serial port, and LPT1 opens a handle to a parallel port.

There is full documentation in the Platform SDK.
Platform SDK\Windows Base Services\Files and I/O\Communications.
0
 

Author Comment

by:essneo
ID: 1321588
Thanks for your answer.

But where can I find the full documentation.

Best regards,
Neo
0
 
LVL 23

Expert Comment

by:chensu
ID: 1321589
It should come with Visual C++. You may search for BuildCommDCB function first and click the Communications Overview link. If you want the latest one, you may install the Platform SDK Jan 1998 on the MSDN CDs. Or you can access the online documentation at http://msdn.microsoft.com/developer/, you need to register first.
0
 
LVL 2

Expert Comment

by:warmcat
ID: 1321590
Ess-oh,

Communication with the serial ports is chensu suggests, and for output using centronics protocol, parallel ports can also be driven by CreateFile() as he says.

For docs on CreateFile, etc, see the help system that comes with Visual C++, or subscribe to MSDN for more data (see http://msdn.microsoft.com/developer/default.htm)

If your peripheral is using any other protocol than centronics nSTB -> nACK/BUSY or using the status lines to read back data, then you must take control of the parallel port yourself.  See http://warmcat.com/parallel for more information.

Regards,

-Andy
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Generic progress indicator 6 121
Detect CR LF to each line 12 185
Work with App store 7 122
How do I get Window Title of all opened process? 4 61
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

751 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