From 992a0ae7b90d92bcda52d82672ece1d3c7d4b0ea Mon Sep 17 00:00:00 2001 From: Vijay Kiran Kamuju Date: Wed, 3 Jun 2020 09:42:49 +0100 Subject: [PATCH] winspool.drv: Implement AddPrintProcessorA via AddPrintProcessorW. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=26171 Signed-off-by: Vijay Kiran Kamuju Signed-off-by: Huw Davies Signed-off-by: Alexandre Julliard --- dlls/winspool.drv/info.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index 593f091c2d7..1a8d572f43d 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -5403,9 +5403,25 @@ BOOL WINAPI AddPrinterDriverW(LPWSTR pName, DWORD level, LPBYTE pDriverInfo) BOOL WINAPI AddPrintProcessorA(LPSTR pName, LPSTR pEnvironment, LPSTR pPathName, LPSTR pPrintProcessorName) { - FIXME("(%s,%s,%s,%s): stub\n", debugstr_a(pName), debugstr_a(pEnvironment), + UNICODE_STRING NameW, EnvW, PathW, ProcessorW; + BOOL ret; + + TRACE("(%s,%s,%s,%s)\n", debugstr_a(pName), debugstr_a(pEnvironment), debugstr_a(pPathName), debugstr_a(pPrintProcessorName)); - return FALSE; + + asciitounicode(&NameW, pName); + asciitounicode(&EnvW, pEnvironment); + asciitounicode(&PathW, pPathName); + asciitounicode(&ProcessorW, pPrintProcessorName); + + ret = AddPrintProcessorW(NameW.Buffer, EnvW.Buffer, PathW.Buffer, ProcessorW.Buffer); + + RtlFreeUnicodeString(&ProcessorW); + RtlFreeUnicodeString(&PathW); + RtlFreeUnicodeString(&EnvW); + RtlFreeUnicodeString(&NameW); + + return ret; } /*****************************************************************************