Commit be8a21f1 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

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

parent 23be14b1
......@@ -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)
......
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment