Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Writing to the parallel port on Win32

Posted on 1998-02-27
2
Medium Priority
?
883 Views
Last Modified: 2013-11-20
I want to to hold a value on the parallel port. In DOS, i just had to "outport" to the lpt address, while in Win32 ( Nt workstation )it is a bit more complecated i guess.
So far i was abble to open the file \.\\lpt for reading and writing ( CreateFile ), but wheneven i try to write, WriteFile failes ( although GetLastError claims that the operation completed successfuly ) and nothing apears on the parralel port.  
Does anybody know how to configure the parallel port ( maybe its a control flow issue? ) - is it done in the same bizzar way like the serial port?  How can i realy complete this simple and rather stupid operation successfuly?
0
Comment
Question by:shaig
[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 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 100 total points
ID: 1316611
Using CreateFile doesn't open the port itself but rather the LPT port driver.  The port driver is designed to run a printer, so it wants something out there that "talks" like a printer.  If you need to do some sort of custom I/O to a port, you need one of two things, a VxD under Win95 and/or a NT Device Driver under NT.
0
 
LVL 3

Author Comment

by:shaig
ID: 1316612
Is there a hardware  workaround, like connecting one of the parallel port pins to another ( similar to 3 pin serial connections - elimination of control flow ).
Sorry,
not realy an inteligent question, but i havne't got the time to explore this issue deeply.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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 …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

636 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