delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/15/11:09:07

Date: Mon, 15 Jun 1998 17:55:33 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Olivier Perron <perron AT art DOT alcatel DOT fr>
cc: djgpp AT delorie DOT com
Subject: Re: Problem when openning printer and current working directory is a long file name
In-Reply-To: <Pine.GSO.3.96.980615141916.907A-100000@rtbsci146s>
Message-ID: <Pine.SUN.3.91.980615175114.11003C-100000@is>
MIME-Version: 1.0

On Mon, 15 Jun 1998, Olivier Perron wrote:

> If the current directory name is a short file name (/djgpp/contrib/print
> for example) and if I call the above program, it will succeed.
> 
> Now, if the current directory name is a long file name
> (/longlonglonglongfilename for example) then the above program will fail
> to open the printer.

I don't see this behavior.  Your program works for me in both cases.

Did you try this on Windows 95 or Windows NT?  (I tried on 95.)

At least Windows 95 is known to play all kinds of dirty tricks with 
devices, which can also vary between different systems.  So if nothing 
else gives a clue, I can suggest two work-arounds:

	1) open the printer with "ab" instead of "wb".
	2) use the predefined stream stdprn which should already be open 
	   by the DJGPP startup code.

- Raw text -


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