Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/winspool.drv/info.c | 18 ++++++++++++++++++ dlls/winspool.drv/winspool.drv.spec | 2 ++ include/winspool.h | 29 ++++++++++++++++++++++++++++- 3 files changed, 48 insertions(+), 1 deletion(-)
diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index 482f70a2235..c536253317b 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -2078,6 +2078,24 @@ BOOL WINAPI OpenPrinterW(LPWSTR lpPrinterName,HANDLE *phPrinter, LPPRINTER_DEFAU return (*phPrinter != 0); }
+BOOL WINAPI OpenPrinter2A(LPSTR name, HANDLE *printer, + PRINTER_DEFAULTSA *defaults, PRINTER_OPTIONSA *options) +{ + if (options) + FIXME("flags %08lx ignored\n", options->dwFlags); + + return OpenPrinterA(name, printer, defaults); +} + +BOOL WINAPI OpenPrinter2W(LPWSTR name, HANDLE *printer, + PRINTER_DEFAULTSW *defaults, PRINTER_OPTIONSW *options) +{ + if (options) + FIXME("flags %08lx ignored\n", options->dwFlags); + + return OpenPrinterW(name, printer, defaults); +} + /****************************************************************** * AddMonitorA [WINSPOOL.@] * diff --git a/dlls/winspool.drv/winspool.drv.spec b/dlls/winspool.drv/winspool.drv.spec index d7bb49bd34b..39c2613a4a0 100644 --- a/dlls/winspool.drv/winspool.drv.spec +++ b/dlls/winspool.drv/winspool.drv.spec @@ -149,6 +149,8 @@ @ stdcall IsValidDevmodeW(ptr long) @ stdcall OpenPrinterA(str ptr ptr) @ stdcall OpenPrinterW(wstr ptr ptr) +@ stdcall OpenPrinter2A(str ptr ptr ptr) +@ stdcall OpenPrinter2W(wstr ptr ptr ptr) @ stdcall PerfClose() @ stdcall PerfCollect(wstr ptr ptr ptr) @ stdcall PerfOpen(wstr) diff --git a/include/winspool.h b/include/winspool.h index db8773ec418..ef39104ea30 100644 --- a/include/winspool.h +++ b/include/winspool.h @@ -1143,6 +1143,30 @@ typedef struct _BIDI_RESPONSE_CONTAINER { BIDI_RESPONSE_DATA aData[1]; } BIDI_RESPONSE_CONTAINER, *LPBIDI_RESPONSE_CONTAINER, *PBIDI_RESPONSE_CONTAINER;
+typedef enum _PRINTER_OPTION_FLAGS +{ + PRINTER_OPTION_NO_CACHE = 1 << 0, + PRINTER_OPTION_CACHE = 1 << 1, + PRINTER_OPTION_CLIENT_CHANGE = 1 << 2, + PRINTER_OPTION_NO_CLIENT_DATA = 1 << 3, +} PRINTER_OPTION_FLAGS; + +typedef struct _PRINTER_OPTIONSA +{ + UINT cbSize; + DWORD dwFlags; +} PRINTER_OPTIONSA, *PPRINTER_OPTIONSA, *LPPRINTER_OPTIONSA; + +typedef struct _PRINTER_OPTIONSW +{ + UINT cbSize; + DWORD dwFlags; +} PRINTER_OPTIONSW, *PPRINTER_OPTIONSW, *LPPRINTER_OPTIONSW; + +DECL_WINELIB_TYPE_AW(PRINTER_OPTIONS) +DECL_WINELIB_TYPE_AW(PPRINTER_OPTIONS) +DECL_WINELIB_TYPE_AW(LPPRINTER_OPTIONS) + /* string constants */
#define SPLREG_DEFAULT_SPOOL_DIRECTORYA "DefaultSpoolDirectory" @@ -1400,9 +1424,12 @@ BOOL WINAPI OpenPrinterA(LPSTR lpPrinterName,HANDLE *phPrinter, LPPRINTER_DEFAULTSA pDefault); BOOL WINAPI OpenPrinterW(LPWSTR lpPrinterName,HANDLE *phPrinter, LPPRINTER_DEFAULTSW pDefault); - #define OpenPrinter WINELIB_NAME_AW(OpenPrinter)
+BOOL WINAPI OpenPrinter2A(LPSTR,HANDLE *,PRINTER_DEFAULTSA *,PRINTER_OPTIONSA *); +BOOL WINAPI OpenPrinter2W(LPWSTR,HANDLE *,PRINTER_DEFAULTSW *,PRINTER_OPTIONSW *); +#define OpenPrinter2 WINELIB_NAME_AW(OpenPrinter2) + BOOL WINAPI ResetPrinterA(HANDLE hPrinter, LPPRINTER_DEFAULTSA pDefault); BOOL WINAPI ResetPrinterW(HANDLE hPrinter, LPPRINTER_DEFAULTSW pDefault); #define ResetPrinter WINELIB_NAME_AW(ResetPrinter)