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

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:24 +08:00 committed by Alexandre Julliard
parent 2e04dd1c4a
commit 23be14b1af
2 changed files with 13 additions and 5 deletions

View File

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

View File

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