Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/mstask/task.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index 2525a1a33a..8c9d479d55 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -198,13 +198,24 @@ static HRESULT WINAPI MSTASK_ITask_GetTriggerCount(ITask *iface, WORD *count) return S_OK; }
-static HRESULT WINAPI MSTASK_ITask_GetTrigger( - ITask* iface, - WORD iTrigger, - ITaskTrigger **ppTrigger) +static HRESULT WINAPI MSTASK_ITask_GetTrigger(ITask *iface, WORD idx, ITaskTrigger **trigger) { - FIXME("(%p, %d, %p): stub\n", iface, iTrigger, ppTrigger); - return E_NOTIMPL; + TaskImpl *This = impl_from_ITask(iface); + HRESULT hr; + + TRACE("(%p, %u, %p)\n", iface, idx, trigger); + + if (idx >= This->trigger_count) + return SCHED_E_TRIGGER_NOT_FOUND; + + hr = TaskTriggerConstructor((void **)trigger); + if (hr != S_OK) return hr; + + hr = ITaskTrigger_SetTrigger(*trigger, &This->trigger[idx]); + if (hr != S_OK) + ITaskTrigger_Release(*trigger); + + return hr; }
static HRESULT WINAPI MSTASK_ITask_GetTriggerString(