delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/11/07:37:03

Date: Sun, 11 Jan 1998 14:36:56 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Richard Hasty <rhasty AT io DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Help: read/write from printer port
In-Reply-To: <01bd1cc1$d4914d00$ab51e0ce@rhasty>
Message-ID: <Pine.SUN.3.91.980111143639.15603O-100000@is>
MIME-Version: 1.0

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).

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019