Date: Mon, 15 Jun 1998 17:25:58 +0200 (MET DST) From: Olivier Perron To: Eli Zaretskii Cc: djgpp AT delorie DOT com Subject: Re: Problem when openning printer and current working directory is a long file name In-Reply-To: Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Mon, 15 Jun 1998, Eli Zaretskii wrote: > > 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. > - I try my sample code on Windows 95 version 4.00.950 B, - opening the printer with "ab" doesn't work either. - using the predefined stream stdprn is OK. Olivier.