Commit 5bff2fb6 authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

mstask: Implement SetTargetComputer.

parent 02250bb1
...@@ -85,8 +85,27 @@ static HRESULT WINAPI MSTASK_ITaskScheduler_SetTargetComputer( ...@@ -85,8 +85,27 @@ static HRESULT WINAPI MSTASK_ITaskScheduler_SetTargetComputer(
ITaskScheduler* iface, ITaskScheduler* iface,
LPCWSTR pwszComputer) LPCWSTR pwszComputer)
{ {
FIXME("%p, %s: stub\n", iface, debugstr_w(pwszComputer)); TaskSchedulerImpl *This = impl_from_ITaskScheduler(iface);
return E_NOTIMPL; WCHAR buffer[MAX_COMPUTERNAME_LENGTH + 3]; /* extra space for two '\' and a zero */
DWORD len = MAX_COMPUTERNAME_LENGTH + 1; /* extra space for a zero */
TRACE("(%p)->(%s)\n", This, debugstr_w(pwszComputer));
/* NULL is an alias for the local computer */
if (!pwszComputer)
return S_OK;
buffer[0] = '\\';
buffer[1] = '\\';
if (GetComputerNameW(buffer + 2, &len))
{
if (!lstrcmpiW(buffer, pwszComputer) || /* full unc name */
!lstrcmpiW(buffer + 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( static HRESULT WINAPI MSTASK_ITaskScheduler_GetTargetComputer(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment