This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
RE: Windows version of Unix lpr program doesn't work?
- To: <vtailor at gte dot net>
- Subject: RE: Windows version of Unix lpr program doesn't work?
- From: "Colin Peters" <colin at fu dot is dot saga-u dot ac dot jp>
- Date: Tue, 2 Jun 1998 19:51:18 +0900
- Cc: "GNU-Win32" <gnu-win32 at cygnus dot com>
vtailor@gte.net <vtailor@gte.net> wrote:
>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.
The sizeof(PRINTDLG) will give 66 if you modify the Win32 headers to make
the PRINTDLG structure
packed. I did this by changing the line of Windows32/Structures.h
} PRINTDLG, *LPPRINTDLG;
To
} PACKED;
typedef struct tagPD PRINTDLG, *LPPRINTDLG;
Where I had earlier defined PACKED to be __attribute__((packed)) in
Windows32/Defines.h
Perhaps this will fix the problem?
Colin.
-- Colin Peters - colin at fu.is.saga-u.ac.jp
-- Saga Univ. Dept. of Information Science
-- http://www.geocities.com/Tokyo/Towers/6162/index.html
-- http://www.fu.is.saga-u.ac.jp/~colin/index.html
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".