spoolss: Implement AddMonitorW.

This commit is contained in:
Detlef Riekenberg 2009-02-28 23:56:06 +01:00 committed by Alexandre Julliard
parent 2a7d98a52c
commit f45cb5ce7f
2 changed files with 43 additions and 1 deletions

View File

@ -312,6 +312,48 @@ static backend_t * backend_first(LPWSTR name)
return NULL;
}
/******************************************************************
* AddMonitorW (spoolss.@)
*
* Install a Printmonitor
*
* PARAMS
* pName [I] Servername or NULL (local Computer)
* Level [I] Structure-Level (Must be 2)
* pMonitors [I] PTR to MONITOR_INFO_2
*
* RETURNS
* Success: TRUE
* Failure: FALSE
*
* NOTES
* All Files for the Monitor must already be copied to %winsysdir% ("%SystemRoot%\system32")
*
*/
BOOL WINAPI AddMonitorW(LPWSTR pName, DWORD Level, LPBYTE pMonitors)
{
backend_t * pb;
DWORD res = ROUTER_UNKNOWN;
TRACE("(%s, %d, %p)\n", debugstr_w(pName), Level, pMonitors);
if (Level != 2) {
SetLastError(ERROR_INVALID_LEVEL);
return FALSE;
}
pb = backend_first(pName);
if (pb && pb->fpAddMonitor)
res = pb->fpAddMonitor(pName, Level, pMonitors);
else
{
SetLastError(ERROR_PROC_NOT_FOUND);
}
TRACE("got %u with %u\n", res, GetLastError());
return (res == ROUTER_SUCCESS);
}
/******************************************************************
* EnumMonitorsW (spoolss.@)
*

View File

@ -1,7 +1,7 @@
@ stub AbortPrinter
@ stub AddFormW
@ stub AddJobW
@ stub AddMonitorW
@ stdcall AddMonitorW(wstr long ptr)
@ stub AddPerMachineConnectionW
@ stub AddPortExW
@ stub AddPortW