Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/mstask/task.c | 10 +++++----- dlls/mstask/tests/task.c | 8 ++++++++ 2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index 27f476699b..ed0ef65625 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -243,12 +243,12 @@ static HRESULT WINAPI MSTASK_ITask_GetStatus(ITask *iface, HRESULT *status) return S_OK; }
-static HRESULT WINAPI MSTASK_ITask_GetExitCode( - ITask* iface, - DWORD *pdwExitCode) +static HRESULT WINAPI MSTASK_ITask_GetExitCode(ITask *iface, DWORD *exit_code) { - FIXME("(%p, %p): stub\n", iface, pdwExitCode); - return E_NOTIMPL; + FIXME("(%p, %p): stub\n", iface, exit_code); + + *exit_code = 0; + return SCHED_S_TASK_HAS_NOT_RUN; }
static HRESULT WINAPI MSTASK_ITask_SetComment(ITask *iface, LPCWSTR comment) diff --git a/dlls/mstask/tests/task.c b/dlls/mstask/tests/task.c index 5952b53692..6184604467 100644 --- a/dlls/mstask/tests/task.c +++ b/dlls/mstask/tests/task.c @@ -565,6 +565,14 @@ static void test_task_state(void) ok(hr == S_OK, "got %#x\n", hr); ok(val == NORMAL_PRIORITY_CLASS, "got %#x\n", val);
+ if (0) /* crashes under Windows */ + hr = ITask_GetExitCode(test_task, NULL); + + val = 0xdeadbeef; + hr = ITask_GetExitCode(test_task, &val); + ok(hr == SCHED_S_TASK_HAS_NOT_RUN, "got %#x\n", hr); + ok(val == 0, "got %#x\n", val); + cleanup_task(); }