Date: Sun, 11 Jan 1998 14:36:56 +0200 (IST) From: Eli Zaretskii To: Richard Hasty cc: djgpp AT delorie DOT com Subject: Re: Help: read/write from printer port In-Reply-To: <01bd1cc1$d4914d00$ab51e0ce@rhasty> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On 9 Jan 1998, Richard Hasty wrote: > I'm running Win95 if that has anything to do with it. I was thinking I'd > be able to just use "open" and pretend I was writing to a file called LPT1 > or PRN. It does not work as I would have expected though. The code (only a > few lines) is at the end of the message. It bombs on the write operation. Please supply the details (how does it bomb? post everything that is printed when it does). Your program works for me, so I cannot reproduce the problem. (Of course, it doesn't really print anything useful, since the effect of printing a binary value of 1 is dependent on the printer model.) You can also use the predefined stdprn stream (it's a FILE *, so use it with the stdio functions like fwrite and fprintf).