Solved

Communication with devices connected to serial com or parallel ports

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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 122
Macro to save highlighted rows as a separate file 5 41
maxBlock challenge 30 112
sum67 challenge 35 93
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…
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.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

864 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

24 Experts available now in Live!

Get 1:1 Help Now