[LOCALSPL]
authorColin Finck <colin@reactos.org>
Thu, 24 Nov 2016 19:24:27 +0000 (19:24 +0000)
committerColin Finck <colin@reactos.org>
Thu, 24 Nov 2016 19:24:27 +0000 (19:24 +0000)
commit65212f368264db808769abf7c6b68634254c474f
tree5a4a5132f0ebbb0b1218e49fd66049580bdd475e
parent03c1491725f20027b1aba501e8c5a3a9edb3cbc2
[LOCALSPL]
Tests show that the Print Provider functions are less forgiving and expect winspool.drv and spoolss.dll to perform the necessary sanity checks.
Also they don't default to the current environment if none was supplied as pEnvironment. Change our functions accordingly to pass the tests.

[LOCALSPL_APITEST]
Add a test to prove that spoolss.dll isn't just a forwarder, but also performs some sanity checks even though winspool.drv and localspl.dll also do.
This rather belongs to spoolss_apitest. But it needs to be tested inside the Spooler Server Process and it's not worth it to copy all the DLL injection code to spoolss_apitest just for a single test.

[SPOOLSS]
Check for an invalid buffer in GetPrintProcessorDirectoryW.

[WINSPOOL]
* Check the level before the RPC call in GetPrintProcessorDirectoryW.
* Supply our current environment if the caller didn't give any in EnumPrintProcessorsW and GetPrintProcessorDirectoryW.
* Implement GetPrintProcessorDirectoryA.

[WINSPOOL_APITEST]
Prove that pcbNeeded isn't touched when calling GetPrintProcessorDirectoryW with an invalid level.

ReactOS now passes all API tests for GetPrintProcessorDirectoryA and GetPrintProcessorDirectoryW. These tests also cover all known behaviors of both functions.
CORE-12399

svn path=/trunk/; revision=73373
reactos/win32ss/printing/base/spoolss/printprocessors.c
reactos/win32ss/printing/base/winspool/printprocessors.c
reactos/win32ss/printing/base/winspool/winspool.spec
reactos/win32ss/printing/include/prtprocenv.h [new file with mode: 0644]
reactos/win32ss/printing/providers/localspl/main.c
reactos/win32ss/printing/providers/localspl/printprocessors.c
rostests/apitests/localspl/dll/fpGetPrintProcessorDirectory.c
rostests/apitests/localspl/dll/main.c
rostests/apitests/winspool/GetPrintProcessorDirectory.c