Solved

Writing to the parallel port on Win32

Posted on 1998-02-27
2
855 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
2 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 50 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 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

20 Experts available now in Live!

Get 1:1 Help Now