taskschd: Implement IExecAction_get_Path.
Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e0fbe82e66
commit
0d3ebfc459
|
@ -1740,8 +1740,20 @@ static HRESULT WINAPI ExecAction_get_Type(IExecAction *iface, TASK_ACTION_TYPE *
|
|||
|
||||
static HRESULT WINAPI ExecAction_get_Path(IExecAction *iface, BSTR *path)
|
||||
{
|
||||
FIXME("%p,%p: stub\n", iface, path);
|
||||
return E_NOTIMPL;
|
||||
ExecAction *action = impl_from_IExecAction(iface);
|
||||
|
||||
TRACE("%p,%p\n", iface, path);
|
||||
|
||||
if (!path) return E_POINTER;
|
||||
|
||||
if (!action->path)
|
||||
{
|
||||
*path = NULL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
if (!(*path = SysAllocString(action->path))) return E_OUTOFMEMORY;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ExecAction_put_Path(IExecAction *iface, BSTR path)
|
||||
|
|
|
@ -1236,6 +1236,7 @@ static void create_action(ITaskDefinition *taskdef)
|
|||
IAction *action;
|
||||
IExecAction *exec_action;
|
||||
TASK_ACTION_TYPE type;
|
||||
BSTR path;
|
||||
|
||||
hr = ITaskDefinition_get_Actions(taskdef, &actions);
|
||||
ok(hr == S_OK, "get_Actions error %#x\n", hr);
|
||||
|
@ -1251,9 +1252,21 @@ static void create_action(ITaskDefinition *taskdef)
|
|||
ok(hr == S_OK, "get_Type error %#x\n", hr);
|
||||
ok(type == TASK_ACTION_EXEC, "got %u\n", type );
|
||||
|
||||
path = (BSTR)0xdeadbeef;
|
||||
hr = IExecAction_get_Path(exec_action, &path);
|
||||
ok(hr == S_OK, "get_Path error %#x\n", hr);
|
||||
ok(path == NULL, "path not set\n");
|
||||
|
||||
hr = IExecAction_put_Path(exec_action, task1_exe);
|
||||
ok(hr == S_OK, "put_Path error %#x\n", hr);
|
||||
|
||||
path = NULL;
|
||||
hr = IExecAction_get_Path(exec_action, &path);
|
||||
ok(hr == S_OK, "get_Path error %#x\n", hr);
|
||||
ok(path != NULL, "path not set\n");
|
||||
ok(!lstrcmpW(path, task1_exe), "wrong path\n" );
|
||||
SysFreeString(path);
|
||||
|
||||
IExecAction_Release(exec_action);
|
||||
IAction_Release(action);
|
||||
IActionCollection_Release(actions);
|
||||
|
|
Loading…
Reference in New Issue