Click to See Complete Forum and Search --> : Prentending to be a Printer..


TheCPUWizard
January 7th, 2003, 10:51 PM
note: This post was originally made as a follow up on a long thread on LPT access, tihs the topic is really different, I am posting again as a new thread

I currently have a need to emulate a printer. Using a parallel cable (ala LapLink) I need to connect to the parallel port of another computer (which can not be touched in ANY way other than connecting the cable) and capture the printer output.

About two years ago I ran across a C / C++ library that was specifically for emulating printers. It used two LPT ports on the computer. One to capture the data (and privide responses jus like and HP Laser Jet) and then re-route the data out the other port via the currently selected driver.

If any one can remember this library name, or knows of any good starting points for this project, I would greatly appreciate it.

Of course the minimal starting point is opening the LPT for INPUT. This does not seem to work quite the same as serial ports.

I have a number of working programs that use CreateFile to open a COM port and perform bi-directional data transfer. Whe I switch from a COM port to an LPT port, output seems ok, but input is not....

galathaea
January 7th, 2003, 11:53 PM
I don't think you can do this in ring3, because the only way I know of to access the input of the LPT is with a ring0 in/out type statement and handling the interrupts, ya-da ya-da... But there are several available toolkits that have a generic driver already built and expose a ring3 dll to give you the access you need without having to build your own driver. The one's I have seen are:

NTPort
TDLPortIO (to be used with DriverLINX's PortIO Driver)

but I am sure there are others out there.

Maybe I am missing some API or making things too difficult, but that's all I can think of...

mdmd
January 26th, 2003, 12:17 AM
Maybe this is something kind of close to what you want ?
http://www.naughter.com/parallelport.html


The class allows you to read and write values to the port using
low level port IO while at the same time making sure that the
code does not cause problems for other apps using the parallel
ports using normal Win32 calls.

heiner
May 3rd, 2006, 06:37 PM
I have to make something like that.

I have a Chemistry Analyzer which has an output to a parallel port for printing, what I need is to connect a computer instead of the printer for being able to capture the reports of the machine and save them into a database for processing and printing them later.

I was just wondering if you found the way to make something like that.

Any help would be appreciated.

Thanks.