Am Freitag, den 14.04.2006, 12:46 -0500 schrieb Alexandre Julliard:
Author: Dmitry Timoshkov dmitry@codeweavers.com Date: Fri Apr 14 22:34:57 2006 +0900
winspool: Add a test for GetPrinterDriver, make it pass under Wine.
Thanks for working on winspool.drv, but i'm Sorry that I had not enough Time to look at the Patch before the commit.
- Version 0x0400 was correct for win9x-Drivers (4.00). Version 3 is for Usermode-Drivers on w2k and above. (Version 2 is Kernelmode-Driver for NT4.0 and w2k) (Version 1 is NT3.5x and Version 0 is NT 3.1) Our Registry-Location is for win9x only (OpenDriverReg)
- One Terminating Zero is is not enough for REG_MULTI_SZ http://bugs.winehq.org/show_bug.cgi?id=3589
- Why was (PDRIVER_INFO_3W) changed to (PDRIVER_INFO_2W)? (PDRIVER_INFO_3W) is an extended Version of (PDRIVER_INFO_2W)
- Not all Levels are supported on all Windows-Versions http://msdn.microsoft.com/library/en-us/gdi/prntspol_7xo2.asp
- The tests are not alphabetical sorted after this commit
- Why was SetLastError(0xdeadbeef) used, when there is SetLastError(MAGIC_DEAD) in the other tests
- 11 Tests are now failing on win95, 11 Tests on win98, 9 Tests on winme and 8 Tests on NT3.51. For NT4.0 (level 4, 5 and 6 as well as the Version-Test will fail) and w2k (version will fail, when an NT4.0-Driver is used), i can not test the exact number of failures atm.
What's the preferred way to fix this? My Idea: 1. Move the Test without any Changes 2. Fix the Tests 3. Fix the Implementation
I know, that you want a fast fix for your commercial Application and winspool.drv is very ugly. I'm on the way to fix winspool.drv, but my Direction is going from the Bottom-Layer to the High-Level API.
"struct printerenv_t" was created (as requested by Alexandre) to handle the the different Printing-Environments for win9x-Drivers (Windows 4.0) and NT-Drivers (Windows NT x86). My fix for OpenDriverReg already need an Extension here, but DeleteMonitor comes first.
You can Read more Infos here: http://wiki.winehq.org/Printing
First of all thanks for reviewing the test!
"Detlef Riekenberg" wine.dev@web.de wrote:
- Version 0x0400 was correct for win9x-Drivers (4.00).
Version 3 is for Usermode-Drivers on w2k and above. (Version 2 is Kernelmode-Driver for NT4.0 and w2k) (Version 1 is NT3.5x and Version 0 is NT 3.1) Our Registry-Location is for win9x only (OpenDriverReg)
MSDN states that: cVersion Specifies the operating system version for which the driver was written. It can be one of the following. Value Meaning 0 Driver for Windows 95/98/Me. 1 Driver for Windows NT 3.51. 2 Driver for Windows NT 4.0. 3 Driver for Windows 2000/XP.
Since Wine by default reports either win9x or win2000/XP I've chosen to report 0 or 3, I don't think there is any app that depends on a particular value.
- One Terminating Zero is is not enough for REG_MULTI_SZ
Feel free to add a test for that and fix it.
- Why was (PDRIVER_INFO_3W) changed to (PDRIVER_INFO_2W)?
(PDRIVER_INFO_3W) is an extended Version of (PDRIVER_INFO_2W)
PDRIVER_INFO_2W is the lowest denominator for all extended structures, I think it's more correct to use it.
- Not all Levels are supported on all Windows-Versions
http://msdn.microsoft.com/library/en-us/gdi/prntspol_7xo2.asp
Feel free to adopt the test to handle an error in that case and not report a failure.
- The tests are not alphabetical sorted after this commit
I don't see much point in that.
- Why was SetLastError(0xdeadbeef) used, when there is
SetLastError(MAGIC_DEAD) in the other tests
All the tests in Wine I write and most others use 0xdeadbeef directly, that way I don't need to inspect the whole file to see to which value that magic macro is defined.
- 11 Tests are now failing on win95, 11 Tests on win98,
9 Tests on winme and 8 Tests on NT3.51. For NT4.0 (level 4, 5 and 6 as well as the Version-Test will fail) and w2k (version will fail, when an NT4.0-Driver is used), i can not test the exact number of failures atm.
I'll have a look once the test results appear on test.winehq.org/data, but feel free to make the test fail more gracefully on that platforms.