Commit 759ef6a4 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

taskschd: Implement ITaskDefinition_put_Actions.

parent c0858ec0
......@@ -2093,8 +2093,19 @@ static HRESULT WINAPI TaskDefinition_get_Actions(ITaskDefinition *iface, IAction
static HRESULT WINAPI TaskDefinition_put_Actions(ITaskDefinition *iface, IActionCollection *actions)
{
FIXME("%p,%p: stub\n", iface, actions);
return E_NOTIMPL;
TaskDefinition *taskdef = impl_from_ITaskDefinition(iface);
TRACE("%p,%p\n", iface, actions);
if (!actions) return E_POINTER;
if (taskdef->actions)
IActionCollection_Release(taskdef->actions);
IActionCollection_AddRef(actions);
taskdef->actions = actions;
return S_OK;
}
static const WCHAR Task[] = {'T','a','s','k',0};
......
......@@ -1096,6 +1096,7 @@ static void change_settings(ITaskDefinition *taskdef, struct settings *test)
ITaskSettings *set;
ITriggerCollection *triggers;
IPrincipal *principal;
IActionCollection *actions;
hr = ITaskDefinition_get_Settings(taskdef, &set);
ok(hr == S_OK, "get_Settings error %#x\n", hr);
......@@ -1178,6 +1179,15 @@ static void change_settings(ITaskDefinition *taskdef, struct settings *test)
ok(hr == S_OK, "expected S_OK, got %#x\n", hr);
if (principal) IPrincipal_Release(principal);
actions = NULL;
hr = ITaskDefinition_get_Actions(taskdef, &actions);
ok(hr == S_OK, "expected S_OK, got %#x\n", hr);
ok(actions != NULL, "actions not set\n");
hr = ITaskDefinition_put_Actions(taskdef, actions);
ok(hr == S_OK, "expected S_OK, got %#x\n", hr);
if (actions) IActionCollection_Release(actions);
/* FIXME: set IIdleSettings and INetworkSettings */
ITaskSettings_Release(set);
......
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