From df0fbd5c18de40c69b9095b681456cee59618140 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Fri, 11 May 2018 12:36:43 +0800 Subject: [PATCH] mstask: Implement ITask::Run(). Signed-off-by: Dmitry Timoshkov Signed-off-by: Alexandre Julliard --- dlls/mstask/task.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index 82ba96edf8c..fa84f4e9ed5 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -270,11 +270,17 @@ static HRESULT WINAPI MSTASK_ITask_GetIdleWait(ITask *iface, WORD *idle_minutes, return S_OK; } -static HRESULT WINAPI MSTASK_ITask_Run( - ITask* iface) +static HRESULT WINAPI MSTASK_ITask_Run(ITask *iface) { - FIXME("(%p): stub\n", iface); - return E_NOTIMPL; + TaskImpl *This = impl_from_ITask(iface); + + TRACE("(%p)\n", iface); + + if (This->status == SCHED_S_TASK_NOT_SCHEDULED) + return SCHED_E_TASK_NOT_READY; + + This->flags |= 0x04000000; + return IPersistFile_Save(&This->IPersistFile_iface, NULL, FALSE); } static HRESULT WINAPI MSTASK_ITask_Terminate(