delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/06/02/02:10:39

From: vtailor AT gte DOT net
Subject: Re: Windows version of Unix lpr program doesn't work?
2 Jun 1998 02:10:39 -0700 :
Message-ID: <199806011910.OAA16071.cygnus.gnu-win32@smtp1.mailsrvcs.net>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com
Cc: vtailor AT gte DOT net

>   vtailor AT gte DOT net
>   Sun, 31 May 1998 23:37:55 -0500 (CDT)
>       
>If you have a printer that no longer accepts character printing from
>stdio functions, you will appreciate the need for a Windows version of
>the Unix lpr program, especially as an accessory to Internet programs
>that use lpr under Unix to print character files.
>
>The following lpr.c code compiles and works as a 16-bit application,
>using Borland 4.52, but compiles and _doesn't_ work when compiled
>using MINGW32.
>
The reason that the PrintDlg() call fails under __WIN32__ is that
sizeof(PRINTDLG) == 68, but the operating system gives an error
message unless you set the pd.lStructSize member to 66.  This, of
course, doesn't happen in the 16-bit Windows 3.x version.  Once
you get the PrintDlg() call to work, you then discover that all
succeeding calls to Escape and TextOut succeed, but the program
still fails to print.  Oh yes, Borland C++ Builder for Windows 95
gives similar results, and substituting more modern calls doesn't
seem to make any difference.

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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