Using the Parallel port

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does anyone have any ideas as to how I can control the printer port from an MS/DOS application? I need to print to LPT1 and I need a way to put a security device on the parallel port.

Thanks
 
abegit,
Does anyone have any ideas as to how I can control the printer port from
an MS/DOS application? I need to print to LPT1 and I need a way to put a
security device on the parallel port.

Where is the printer connected to ?
Is the security device an hardware key ? - if so, is your DOS app. looking
for it on LPT1 only ?
Can you set your DOS app. to print to other devices, such as LPT2 or an
Ascii file ?

Kind regards,
Davide Guolo
--------------------------------------------------------------
Printfil - Windows Printing System for Applications
http://www.guolo.com/printfil
Odbc4All - Connection to ODBC Data Sources for any Application
http://www.guolo.com/odbc4all
--------------------------------------------------------------
 
David,

The printer is connected to the local PC.

Yes. The security device is a hardware key from "Rainbow". Since we are running a third party application, I am not sure it is looking for the device as LPT1. It may be looking for the parallel port. ( If they told us, we can defeat it ).

The app will not print to any LPT device. The application can "print" to an ASCII file. But it is not practical to send the output to a file and then use Windows to print.

Thanks
Abe
******************************
 
abegit,
The printer is connected to the local PC.

ok. I suppose it is an USB device (or you could simply put it after the
Rainbow key, can't you ?)
The app will not print to any LPT device.

Does this means that you can't change its LPT1 setting or that you tried but
it doesn't works ?
The application can "print" to an ASCII file. But it is not practical
to send the output to a file and then use Windows to print.

Maybe using Printfil it could be :-) . See my signature.

Another option could be to have Windows redirecting the LPT output to the
local printer.
Try sharing your Printer (in the same way you do it on a LAN, even if your
PC is not networked).
Let say the shared name is PRINTER and your PC name is ABEGIT
Open a Command Prompt and type:

NET USE LPT1 \\ABEGIT\PRINTER

Now, simply typing "DIR > LPT1" you will obtain the output redirected to the
printer.
I'm not sure about the hardware key. Maybe it could not work anymore. So, a
better option could be to set your DOS app. to print to LPT2 and redirect
that port.

If you want to cancel the redirection you can use:

NET USE LPT1 /D

Regards,
Davide.
--------------------------------------------------------------
Printfil - Windows Printing System for Applications
http://www.guolo.com/printfil
Odbc4All - Connection to ODBC Data Sources for any Application
http://www.guolo.com/odbc4all
--------------------------------------------------------------
 
Back
Top