mstask: Implement better stub for ITask::GetMostRecentRunTime().

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2018-04-20 16:37:27 +08:00 committed by Alexandre Julliard
parent 23be14b1af
commit be8a21f136
2 changed files with 19 additions and 5 deletions

View File

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

View File

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