Dmitry Timoshkov : winspool: Add a test for GetPrinterDriver, make it pass under Wine.

Dmitry Timoshkov dmitry at
Fri Apr 14 23:57:33 CDT 2006

First of all thanks for reviewing the test!

"Detlef Riekenberg" < at> 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

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,
but feel free to make the test fail more gracefully on that platforms.


More information about the wine-devel mailing list