| delorie.com/archives/browse.cgi | search |
| Date: | Tue, 18 Feb 2003 08:44:09 +0200 |
| From: | Zaretskii Eli <ezaretski AT elta DOT co DOT il> |
| Subject: | RE: How to open LPT1: as file? |
| To: | "Wolfgang v. Hansen" <hansen AT fom DOT fgan DOT de>, djgpp AT delorie DOT com |
| Message-id: | <4D19136444628A40840EFE8C5AE04147017A16@ELTIMAIL1.elta.co.il> |
| MIME-version: | 1.0 |
| X-MIMEOLE: | Produced By Microsoft Exchange V6.0.6249.0 |
| Thread-topic: | How to open LPT1: as file? |
| Thread-index: | AcLWWMZPILxIPILWTJGGfolJ6uZAowAwBXrg |
| X-PRIVAWALL-ID: | 0002556710ab |
| X-OriginalArrivalTime: | 18 Feb 2003 06:44:10.0318 (UTC) |
| FILETIME=[24501EE0:01C2D719] | |
| Reply-To: | djgpp AT delorie DOT com |
This message was scanned for viruses and other malicious code by PrivaWall.
This mail was sent from ELTA SYS LTD.
> From: Wolfgang v. Hansen [mailto:hansen AT fom DOT fgan DOT de]
> Sent: Monday, February 17, 2003 9:43 AM
>
> I would like to access an old dot matrix printer directly just by
> opening the port and sending appropriate bytes to it. I tried to
> fopen("LPT1:", "w") but that didn't succeed.
Lose the colon after "LPT1", and it will work.
Also, you want to use "wb" rather than just "w", since printers need to
accept binary non-printable characters (the commands to the printer),
not just plain text.
This message is processed by the PrivaWall Email Security Server.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |