spoolss: Implement AddPrinterDriverExW.

This commit is contained in:
Detlef Riekenberg 2009-03-01 00:23:26 +01:00 committed by Alexandre Julliard
parent 393c3817b1
commit 5104db3d82
2 changed files with 41 additions and 1 deletions

View File

@ -354,6 +354,46 @@ BOOL WINAPI AddMonitorW(LPWSTR pName, DWORD Level, LPBYTE pMonitors)
return (res == ROUTER_SUCCESS);
}
/******************************************************************
* AddPrinterDriverExW (spoolss.@)
*
* Install a Printer Driver with the Option to upgrade / downgrade the Files
*
* PARAMS
* pName [I] Servername or NULL (local Computer)
* level [I] Level for the supplied DRIVER_INFO_*W struct
* pDriverInfo [I] PTR to DRIVER_INFO_*W struct with the Driver Parameter
* dwFileCopyFlags [I] How to Copy / Upgrade / Downgrade the needed Files
*
* RESULTS
* Success: TRUE
* Failure: FALSE
*
*/
BOOL WINAPI AddPrinterDriverExW(LPWSTR pName, DWORD level, LPBYTE pDriverInfo, DWORD dwFileCopyFlags)
{
backend_t * pb;
DWORD res = ROUTER_UNKNOWN;
TRACE("(%s, %d, %p, 0x%x)\n", debugstr_w(pName), level, pDriverInfo, dwFileCopyFlags);
if (!pDriverInfo) {
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
pb = backend_first(pName);
if (pb && pb->fpAddPrinterDriverEx)
res = pb->fpAddPrinterDriverEx(pName, level, pDriverInfo, dwFileCopyFlags);
else
{
SetLastError(ERROR_PROC_NOT_FOUND);
}
TRACE("got %u with %u\n", res, GetLastError());
return (res == ROUTER_SUCCESS);
}
/******************************************************************
* DeleteMonitorW (spoolss.@)
*

View File

@ -8,7 +8,7 @@
@ stub AddPrintProcessorW
@ stub AddPrintProvidorW
@ stub AddPrinterConnectionW
@ stub AddPrinterDriverExW
@ stdcall AddPrinterDriverExW(wstr long ptr long)
@ stub AddPrinterDriverW
@ stub AddPrinterExW
@ stub AddPrinterW