Solved

Communication with devices connected to serial com or parallel ports

Posted on 1998-09-01
4
219 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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
How to create frequencies of a variable from SAS dataset? 10 137
repeateFront java challenge 31 95
not able to insert into temp table 68 174
Excel file not created as expected 7 90
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

763 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