Wine, WineLib and "Programming Windows 95"
Last updated: 2003/5/4
Description
This is similar to devcaps1 but displays extra device characteristics for either the
screen or the selected printer.
Wine tests
- I don't have a printer installed so I could only test it on the screen.
- In the 'base information' list I noted some differences in the results for:
Item |
Windows |
Wine |
BITSPERPIXEL |
32 |
24 |
COLORRES |
24 |
0 |
PDEVICESIZE |
240 |
0 |
DRIVERVERSION |
0400H |
0300H |
CP_RECTANGLE |
Yes |
No |
RC_BANDING |
No |
Yes |
RC_SCALING |
No |
Yes |
- There are many other differences in the 'curves', 'lines',
'polygons' and 'text' sections. Sometimes Wine claims to have way more capabilities than
the Windows driver. Is that really true?
Winelib tests
Tested API
- GDI32
ClosePrinter, CreateICA, DeleteDC, EnumPrintersA, GetDeviceCaps, GetStockObject, GetTextMetricsA, OpenPrinterA, PrinterProperties, SelectObject, TextOutA
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetProcessHeap, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile, lstrcmpA
- USER32
AppendMenuA, BeginPaint, CheckMenuItem, CreateWindowExA, DefWindowProcA, DeleteMenu, DestroyWindow, DispatchMessageA, EnableMenuItem, EndPaint, GetDC, GetMenu, GetMenuItemCount, GetMenuStringA, GetMessageA, GetSubMenu, InvalidateRect, LoadCursorA, LoadIconA, MessageBoxA, PostQuitMessage, RegisterClassExA, ReleaseDC, SetWindowTextA, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2003/5/4
Description
Sends a formfeed to the printer.
Wine tests
- I don't have a printer installed so I cannot check that this really
worked.
- Worked just like on Windows for me.
Winelib tests
Tested API
- GDI32
CreateDCA, DeleteDC, EndDoc, EndPage, EnumPrintersA, StartDocA, StartPage
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
Last updated: 2003/5/4
Description
Adds printing functionality to the poppad example.
Wine tests
- For other problems, see the poppad3 example in chapter 11.
Winelib tests
- poppad.c is incorrect. It uses NULL where we should really have a '0',
thus this compilation warning (same as on Windows). Since it's just
warnings it does not warrant a patch, we can just ignore them:
poppad.c: In function `WndProc':
poppad.c:373: warning: passing arg 3 of `SendMessageA' makes integer from pointer without a cast
poppad.c:380: warning: passing arg 3 of `SendMessageA' makes integer from pointer without a cast
poppad.c:391: warning: passing arg 3 of `SendMessageA' makes integer from pointer without a cast
- When the print dialog box is displayed I get the following messages:
err:commdlg:COMMDLG_DllEntryPoint commdlg.dll instantiated twice!
err:commdlg:COMMDLG_DllEntryPoint commdlg.dll instantiated twice!
err:commdlg:COMMDLG_DllEntryPoint commdlg.dll instantiated twice!
- Then when I choose 'Ok' I get:
fixme:commdlg:PRINTDLG_UpdatePrintDlg Collate lppd not yet implemented as output
- Printing does nothing. That's because I don't have a printer and
printing is disabled anyway, as the following message tells me:
Printing disabled in wine.conf or .winerc file
Use "printer=on" in the "[wine]" section to enable it.
Tested API
- GDI32
CreateFontIndirectA, DeleteDC, DeleteObject, EndDoc, EndPage, GetDeviceCaps, GetObjectA, GetStockObject, GetTextMetricsA, SetAbortProc, StartDocA, StartPage, TextOutA
- KERNEL32
CloseHandle, CreateFileA, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetProcessHeap, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, ReadFile, RtlUnwind, SetEndOfFile, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile, lstrcpyA
- USER32
CreateDialogParamA, CreateWindowExA, DefWindowProcA, DestroyWindow, DialogBoxParamA, DispatchMessageA, EnableMenuItem, EnableWindow, EndDialog, GetClientRect, GetMessageA, GetParent, GetSystemMenu, GetWindowTextA, GetWindowTextLengthA, InvalidateRect, IsClipboardFormatAvailable, IsDialogMessageA, LoadAcceleratorsA, LoadCursorA, LoadIconA, MessageBoxA, MoveWindow, PeekMessageA, PostQuitMessage, RegisterClassExA, RegisterWindowMessageA, SendMessageA, SetDlgItemTextA, SetFocus, SetWindowTextA, ShowWindow, TranslateAcceleratorA, TranslateMessage, UpdateWindow, wsprintfA
- comdlg32
ChooseFontA, FindTextA, GetFileTitleA, GetOpenFileNameA, GetSaveFileNameA, PrintDlgA, ReplaceTextA
Last updated: 2003/5/4
Description
Prints a demonstration graphic on the default printer.
This graphic is also shown in the program's window.
Wine tests
- I don't have a printer installed so I cannot check that this really
worked.
- This program adds a 'print' entry in the system menu so you must run
it in unmanaged mode to be able to really test it.
- Starting the print says that printing is impossible which is logical
since there is no printer installed in my setup.
Winelib tests
Tested API
- GDI32
CreateDCA, DeleteDC, Ellipse, EndDoc, EndPage, EnumPrintersA, GetDeviceCaps, GetStockObject, LineTo, MoveToEx, Rectangle, RestoreDC, SaveDC, SetMapMode, SetTextAlign, SetViewportExtEx, SetViewportOrgEx, SetWindowExtEx, StartDocA, StartPage, TextOutA
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
AppendMenuA, BeginPaint, CreateWindowExA, DefWindowProcA, DispatchMessageA, EndPaint, GetMessageA, GetSystemMenu, LoadCursorA, LoadIconA, MessageBoxA, PostQuitMessage, RegisterClassExA, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2000/12/2
Description
Same as print1 but adds a way to interrupt the printing.
Wine tests
Winelib tests
Tested API
- GDI32
CreateDCA, DeleteDC, Ellipse, EndDoc, EndPage, EnumPrintersA, GetDeviceCaps, GetStockObject, LineTo, MoveToEx, Rectangle, RestoreDC, SaveDC, SetAbortProc, SetMapMode, SetTextAlign, SetViewportExtEx, SetViewportOrgEx, SetWindowExtEx, StartDocA, StartPage, TextOutA
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
AppendMenuA, BeginPaint, CreateWindowExA, DefWindowProcA, DispatchMessageA, EnableWindow, EndPaint, GetMessageA, GetSystemMenu, LoadCursorA, LoadIconA, MessageBoxA, PeekMessageA, PostQuitMessage, RegisterClassExA, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2000/12/2
Description
Pretty much the same as print2 except that now AbortProc sometimes
returns false.
Wine tests
Winelib tests
Tested API
- GDI32
CreateDCA, DeleteDC, Ellipse, EndDoc, EndPage, EnumPrintersA, GetDeviceCaps, GetStockObject, LineTo, MoveToEx, Rectangle, RestoreDC, SaveDC, SetAbortProc, SetMapMode, SetTextAlign, SetViewportExtEx, SetViewportOrgEx, SetWindowExtEx, StartDocA, StartPage, TextOutA
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
AppendMenuA, BeginPaint, CreateDialogParamA, CreateWindowExA, DefWindowProcA, DestroyWindow, DispatchMessageA, EnableMenuItem, EnableWindow, EndPaint, GetMessageA, GetParent, GetSystemMenu, IsDialogMessageA, LoadCursorA, LoadIconA, MessageBoxA, PeekMessageA, PostQuitMessage, RegisterClassExA, SetWindowTextA, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2000/12/2
Description
Same as print3 but uses the banding technique for printing.
Wine tests
Winelib tests
- Compiles and links just fine.
Tested API
- GDI32
AbortDoc, CreateDCA, DeleteDC, Ellipse, EndDoc, EndPage, EnumPrintersA, ExtEscape, GetDeviceCaps, GetStockObject, LineTo, MoveToEx, Rectangle, RestoreDC, SaveDC, SetAbortProc, SetMapMode, SetTextAlign, SetViewportExtEx, SetViewportOrgEx, SetWindowExtEx, StartDocA, StartPage, TextOutA
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
AppendMenuA, BeginPaint, CreateDialogParamA, CreateWindowExA, DefWindowProcA, DestroyWindow, DispatchMessageA, EnableMenuItem, EnableWindow, EndPaint, GetMessageA, GetParent, GetSystemMenu, IsDialogMessageA, IsRectEmpty, LoadCursorA, LoadIconA, MessageBoxA, PeekMessageA, PostQuitMessage, RegisterClassExA, SetWindowTextA, ShowWindow, TranslateMessage, UpdateWindow