home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.os2.programmer
- Path: sparky!uunet!stanford.edu!morrow.stanford.edu!news
- From: GG.MPD@forsythe.stanford.edu (Michael Durket)
- Subject: Opening LPTx in a DOS box
- Message-ID: <1992Sep4.213803.2479@morrow.stanford.edu>
- Sender: news@morrow.stanford.edu (News Service)
- Organization: Stanford University, California, USA
- Distribution: na
- Date: Fri, 4 Sep 1992 21:38:03 GMT
- Lines: 28
-
- I have a simple test program that attempts to open
- a printer port via the following:
-
- fopen("lpt1", "w");
-
- (Actually, don't pay any attention to the mode, I've tried
- every single combination listed under the fopen call).
-
- This is from a Microsoft C 6.0 program running in a DOS
- window under OS/2.
-
- The program can never successfully open the printer - it
- always gets "permission denied".
-
- I was under the impression, (from reading the redbooks) that
- OS/2 allowed the printer ports to be opened but through
- various intercepts redirected printer output from a DOS box
- to the Spooler. Is this not the case?
-
- This is really bugging me, because I worked up this simple
- example from a rather complex program which actually manages
- to open the printer in one configuration of the program but not
- in others, and I don't see, given the above, how it could do
- that (the actual OS/2 printer, spooler, etc are not being
- changed between program runs).
-
- Any ideas, suggestions or solutions would be greatly appreciated.
-
-