[PRINTING] Fix GetPrinterW, add tests for it and GetDefaultPrinterA/W, and add a...
authorColin Finck <colin@reactos.org>
Sun, 10 Dec 2017 11:28:08 +0000 (12:28 +0100)
committerColin Finck <colin@reactos.org>
Sun, 10 Dec 2017 11:28:08 +0000 (12:28 +0100)
commit3a69fd4e966feb867fd730442a971041ade3965a
tree5c591402f49715ddbf9189446081e088880bc7e2
parent3449296f7bc910db69a80f782d4a86b8f0eea9b7
[PRINTING] Fix GetPrinterW, add tests for it and GetDefaultPrinterA/W, and add a proper stub for GetPrinterDriverDirectoryA.

* Pass the correct handle to _RpcGetPrinter in GetPrinterW.
* Pass an empty string instead of a NULL pointer as wszComputerName to the GetPrinterLevel* functions, because this variable is later used as source for StringCbCopyExW.
* Don't check for GetLastError() == ERROR_SUCCESS in tests. Windows apparently only sets the last error in case of failure.
  The Printing code should probably be changed similarly in a future commit.

Should fix CORE-14072
modules/rostests/apitests/winspool/CMakeLists.txt
modules/rostests/apitests/winspool/GetDefaultPrinter.c
modules/rostests/apitests/winspool/GetPrinter.c [new file with mode: 0644]
modules/rostests/apitests/winspool/testlist.c
win32ss/printing/base/winspool/printerdrivers.c
win32ss/printing/base/winspool/printers.c
win32ss/printing/base/winspool/winspool.spec
win32ss/printing/providers/localspl/printers.c