Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!cg-atla!fredex From: fredex@cg-atla.UUCP (Fred Smith) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: LPT1 to disk file... Message-ID: <7592@cg-atla.UUCP> Date: 1 Sep 89 12:44:25 GMT References: <197@infovax.UUCP> <2851@cbnewsc.ATT.COM> Reply-To: fredex@cg-atla.UUCP (Fred Smith) Organization: Agfa Compugraphic Division Lines: 40 In article <2851@cbnewsc.ATT.COM> santol@cbnewsc.ATT.COM (shawn.r.antol) writes: >In article <197@infovax.UUCP>, ao@infovax.UUCP (Anders Ohlsson) writes: >> Does anybody know if there is a TSR program or some >> other stuff that is capable of taking care of the >> output to LPT1 and redirecting it to a disk file. >> Anders Ohlsson > >If such a creature exists, please post it to the net so that the >rest of us might benifit too. A program which will work for many cases to do what you want is very easy to write. If the program whose output you wish to grab is doing its printer output via DOS services (i.e., not using BIOS or going direct to the hardware) all you gotta do (in C) is to redirect the output which would go to "stdprn" to somewhere else instead: #include FILE * printer_file; printer_file = freopen ("prtfile.dat", "wb", stdprn); system (your_program); fclose (printer_file); exit(0); This will grab all of DOS's output to the printer and write it to a file named "prtfile.dat" (w/o the quotes). As to whether or not your application is bypassing DOS or not, the easiest way to find out is to try this and see if it works. If not, all you've lost is about 20 minutes! Fred