Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/mstask/task.c | 10 +++++----- dlls/mstask/tests/task.c | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index ed0ef65625..19bd919ec1 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -225,12 +225,12 @@ static HRESULT WINAPI MSTASK_ITask_EditWorkItem( return E_NOTIMPL; }
-static HRESULT WINAPI MSTASK_ITask_GetMostRecentRunTime( - ITask* iface, - SYSTEMTIME *pstLastRun) +static HRESULT WINAPI MSTASK_ITask_GetMostRecentRunTime(ITask *iface, SYSTEMTIME *st) { - FIXME("(%p, %p): stub\n", iface, pstLastRun); - return E_NOTIMPL; + FIXME("(%p, %p): stub\n", iface, st); + + memset(st, 0, sizeof(*st)); + return SCHED_S_TASK_HAS_NOT_RUN; }
static HRESULT WINAPI MSTASK_ITask_GetStatus(ITask *iface, HRESULT *status) diff --git a/dlls/mstask/tests/task.c b/dlls/mstask/tests/task.c index 6184604467..6e3c997c10 100644 --- a/dlls/mstask/tests/task.c +++ b/dlls/mstask/tests/task.c @@ -503,6 +503,7 @@ static void test_task_state(void) HRESULT hr, status; DWORD flags, val; WORD val1, val2; + SYSTEMTIME st;
setup = setup_task(); ok(setup, "Failed to setup test_task\n"); @@ -573,6 +574,19 @@ static void test_task_state(void) ok(hr == SCHED_S_TASK_HAS_NOT_RUN, "got %#x\n", hr); ok(val == 0, "got %#x\n", val);
+ if (0) /* crashes under Windows */ + hr = ITask_GetMostRecentRunTime(test_task, NULL); + + memset(&st, 0xff, sizeof(st)); + hr = ITask_GetMostRecentRunTime(test_task, &st); + ok(hr == SCHED_S_TASK_HAS_NOT_RUN, "got %#x\n", hr); + ok(st.wYear == 0, "got %u\n", st.wYear); + ok(st.wMonth == 0, "got %u\n", st.wMonth); + ok(st.wDay == 0, "got %u\n", st.wDay); + ok(st.wHour == 0, "got %u\n", st.wHour); + ok(st.wMinute == 0, "got %u\n", st.wMinute); + ok(st.wSecond == 0, "got %u\n", st.wSecond); + cleanup_task(); }