taskschd: Implement ITaskDefinition_put_Actions.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hans Leidekker 2017-11-30 09:37:08 +01:00 committed by Alexandre Julliard
parent c0858ec0cb
commit 759ef6a4fa
2 changed files with 23 additions and 2 deletions

View File

@ -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};

View File

@ -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);