Commit acacbbcb authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

taskschd: Implement ITaskDefinition_put_Principal.

parent 4a0fa13f
......@@ -1879,8 +1879,19 @@ static HRESULT WINAPI TaskDefinition_get_Principal(ITaskDefinition *iface, IPrin
static HRESULT WINAPI TaskDefinition_put_Principal(ITaskDefinition *iface, IPrincipal *principal)
{
FIXME("%p,%p: stub\n", iface, principal);
return E_NOTIMPL;
TaskDefinition *taskdef = impl_from_ITaskDefinition(iface);
TRACE("%p,%p\n", iface, principal);
if (!principal) return E_POINTER;
if (taskdef->principal)
IPrincipal_Release(taskdef->principal);
IPrincipal_AddRef(principal);
taskdef->principal = principal;
return S_OK;
}
static HRESULT WINAPI TaskDefinition_get_Actions(ITaskDefinition *iface, IActionCollection **actions)
......
......@@ -1173,6 +1173,9 @@ static void change_settings(ITaskDefinition *taskdef, struct settings *test)
hr = ITaskDefinition_get_Principal(taskdef, &principal);
ok(hr == S_OK, "expected S_OK, got %#x\n", hr);
ok(principal != NULL, "principal not set\n");
hr = ITaskDefinition_put_Principal(taskdef, principal);
ok(hr == S_OK, "expected S_OK, got %#x\n", hr);
if (principal) IPrincipal_Release(principal);
/* FIXME: set IIdleSettings and INetworkSettings */
......
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