mirror of
https://github.com/reactos/reactos.git
synced 2024-09-11 05:12:43 +00:00
a82d7577b3
- Implement GetPrinterDataA, GetPrinterDataExA, GetPrinterDataExW, GetPrinterDataW, SetPrinterDataA, SetPrinterDataExA, SetPrinterDataExW, SetPrinterDataW. They support all features for Print Server and Printer Handles (minus security checks!) I've also added tests for them. - Store Printer data in SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers instead of SYSTEM\CurrentControlSet\Control\Print\Printers and create a registry symlink from the former path to the new one just like Windows does. According to https://social.technet.microsoft.com/Forums/windowsserver/en-US/a683ab54-c43c-4ebe-af8f-1f7a65af2a51, this is needed when having >900 printers to work around a size limit of the SYSTEM registry hive. And if Windows has both locations, we need both for compatibility anyway. - Add several settings which are queried by the new Printer Data APIs when working with Print Server Handles. - Store the job directory in the Windows-compatible "DefaultSpoolDirectory" setting and make use of it. - Revert the ASSERTs in LocalEnumPrinters again to let us verify the NULL pointer exceptions in localspl_apitest (thanks Serge! CORE-13433) - Translate ERROR_INVALID_NAME to ERROR_INVALID_PRINTER_NAME in all cases in OpenPrinterW (thanks Victor! CORE-13412) - Make EnumMonitorsW and EnumPortsW in spoolss more robust against failing Print Monitors. - Remove the wrong !phPrinter check in OpenPrinterW to make Print Server Handles work for real. - Fix error handling when memory allocation fails: HeapAlloc doesn't set last error, so it's just wrong to query or return it. One more item done from https://reactos.org/wiki/Printing ! This is all still a big Work-in-Progress, with many subtle bugs deep down in ReactOS, for which I need to open additional tickets. But I didn't want to make this commit even bigger.. svn path=/trunk/; revision=75125
41 lines
1.4 KiB
C
41 lines
1.4 KiB
C
/*
|
|
* PROJECT: ReactOS Print Spooler DLL API Tests
|
|
* LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation
|
|
* PURPOSE: Test list
|
|
* COPYRIGHT: Copyright 2015-2016 Colin Finck <colin@reactos.org>
|
|
*/
|
|
|
|
#define __ROS_LONG64__
|
|
|
|
#define STANDALONE
|
|
#include <apitest.h>
|
|
|
|
extern void func_ClosePrinter(void);
|
|
extern void func_EnumPrinters(void);
|
|
extern void func_EnumPrintProcessorDatatypes(void);
|
|
extern void func_GetDefaultPrinter(void);
|
|
extern void func_GetPrinterData(void);
|
|
extern void func_GetPrintProcessorDirectoryA(void);
|
|
extern void func_GetPrintProcessorDirectoryW(void);
|
|
extern void func_IsValidDevmodeA(void);
|
|
extern void func_IsValidDevmodeW(void);
|
|
extern void func_OpenPrinter(void);
|
|
extern void func_StartDocPrinter(void);
|
|
|
|
const struct test winetest_testlist[] =
|
|
{
|
|
{ "ClosePrinter", func_ClosePrinter },
|
|
{ "EnumPrinters", func_EnumPrinters },
|
|
{ "EnumPrintProcessorDatatypes", func_EnumPrintProcessorDatatypes },
|
|
{ "GetDefaultPrinter", func_GetDefaultPrinter },
|
|
{ "GetPrinterData", func_GetPrinterData },
|
|
{ "GetPrintProcessorDirectoryA", func_GetPrintProcessorDirectoryA },
|
|
{ "GetPrintProcessorDirectoryW", func_GetPrintProcessorDirectoryW },
|
|
{ "IsValidDevmodeA", func_IsValidDevmodeA },
|
|
{ "IsValidDevmodeW", func_IsValidDevmodeW },
|
|
{ "OpenPrinter", func_OpenPrinter },
|
|
{ "StartDocPrinter", func_StartDocPrinter },
|
|
|
|
{ 0, 0 }
|
|
};
|