diff --git a/dlls/spoolss/router.c b/dlls/spoolss/router.c index d5c4be300ac..6fc7b5963c0 100644 --- a/dlls/spoolss/router.c +++ b/dlls/spoolss/router.c @@ -354,6 +354,40 @@ BOOL WINAPI AddMonitorW(LPWSTR pName, DWORD Level, LPBYTE pMonitors) return (res == ROUTER_SUCCESS); } +/****************************************************************** + * DeleteMonitorW (spoolss.@) + * + * Delete a specific Printmonitor from a Printing-Environment + * + * PARAMS + * pName [I] Servername or NULL (local Computer) + * pEnvironment [I] Printing-Environment of the Monitor or NULL (Default) + * pMonitorName [I] Name of the Monitor, that should be deleted + * + * RETURNS + * Success: TRUE + * Failure: FALSE + * + */ +BOOL WINAPI DeleteMonitorW(LPWSTR pName, LPWSTR pEnvironment, LPWSTR pMonitorName) +{ + backend_t * pb; + DWORD res = ROUTER_UNKNOWN; + + TRACE("(%s, %s, %s)\n", debugstr_w(pName), debugstr_w(pEnvironment), debugstr_w(pMonitorName)); + + pb = backend_first(pName); + if (pb && pb->fpDeleteMonitor) + res = pb->fpDeleteMonitor(pName, pEnvironment, pMonitorName); + else + { + SetLastError(ERROR_PROC_NOT_FOUND); + } + + TRACE("got %u with %u\n", res, GetLastError()); + return (res == ROUTER_SUCCESS); +} + /****************************************************************** * EnumMonitorsW (spoolss.@) * diff --git a/dlls/spoolss/spoolss.spec b/dlls/spoolss/spoolss.spec index 8d9fae3ed2f..ad1ea60809f 100644 --- a/dlls/spoolss/spoolss.spec +++ b/dlls/spoolss/spoolss.spec @@ -25,7 +25,7 @@ @ stub CreatePrinterIC @ stub DbgGetPointers @ stub DeleteFormW -@ stub DeleteMonitorW +@ stdcall DeleteMonitorW(wstr wstr wstr) @ stub DeletePerMachineConnectionW @ stub DeletePortW @ stub DeletePrintProcessorW