[PATCH 4/5] mstask: Implement ITaskScheduler_SetTargetComputer

Detlef Riekenberg wine.dev at web.de
Sun Nov 4 15:39:36 CST 2012


--
By by ... Detlef
---
 dlls/mstask/task_scheduler.c |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/dlls/mstask/task_scheduler.c b/dlls/mstask/task_scheduler.c
index 045adc8..bd728e0 100644
--- a/dlls/mstask/task_scheduler.c
+++ b/dlls/mstask/task_scheduler.c
@@ -101,8 +101,22 @@ static HRESULT WINAPI MSTASK_ITaskScheduler_SetTargetComputer(
         ITaskScheduler* iface,
         LPCWSTR pwszComputer)
 {
-    FIXME("%p, %s: stub\n", iface, debugstr_w(pwszComputer));
-    return E_NOTIMPL;
+    TaskSchedulerImpl *This = impl_from_ITaskScheduler(iface);
+    LPWSTR my_computer;
+
+    TRACE("(%p)->(%p)\n", This, pwszComputer);
+
+    if (!pwszComputer)
+        return S_OK;
+
+    my_computer = get_unc_computername();
+    if (my_computer &&
+        (!lstrcmpiW(my_computer, pwszComputer) ||    /* full unc name */
+        !lstrcmpiW(my_computer + 2, pwszComputer)))  /* name without backslash */
+        return S_OK;
+
+    FIXME("remote computer %s not supported\n", debugstr_w(pwszComputer));
+    return HRESULT_FROM_WIN32(ERROR_BAD_NETPATH);
 }
 
 static HRESULT WINAPI MSTASK_ITaskScheduler_GetTargetComputer(
-- 
1.7.5.4




More information about the wine-patches mailing list