Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/mstask/task.c | 18 ++++++++---------- dlls/mstask/tests/task.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 10 deletions(-)
diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index e77a959e0f..97d778255f 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -373,12 +373,11 @@ static HRESULT WINAPI MSTASK_ITask_SetFlags( return E_NOTIMPL; }
-static HRESULT WINAPI MSTASK_ITask_GetFlags( - ITask* iface, - DWORD *pdwFlags) +static HRESULT WINAPI MSTASK_ITask_GetFlags(ITask *iface, DWORD *flags) { - FIXME("(%p, %p): stub\n", iface, pdwFlags); - return E_NOTIMPL; + FIXME("(%p, %p): stub\n", iface, flags); + *flags = 0; + return S_OK; }
static HRESULT WINAPI MSTASK_ITask_SetAccountInformation( @@ -588,12 +587,11 @@ static HRESULT WINAPI MSTASK_ITask_SetTaskFlags( return E_NOTIMPL; }
-static HRESULT WINAPI MSTASK_ITask_GetTaskFlags( - ITask* iface, - DWORD *pdwFlags) +static HRESULT WINAPI MSTASK_ITask_GetTaskFlags(ITask *iface, DWORD *flags) { - FIXME("(%p, %p): stub\n", iface, pdwFlags); - return E_NOTIMPL; + FIXME("(%p, %p): stub\n", iface, flags); + *flags = 0; + return S_OK; }
static HRESULT WINAPI MSTASK_ITask_SetMaxRunTime( diff --git a/dlls/mstask/tests/task.c b/dlls/mstask/tests/task.c index d139207039..956aa0bbd0 100644 --- a/dlls/mstask/tests/task.c +++ b/dlls/mstask/tests/task.c @@ -496,6 +496,39 @@ static void test_SetAccountInformation_GetAccountInformation(void) return; }
+static void test_GetFlags(void) +{ + BOOL setup; + HRESULT hr; + DWORD flags; + + setup = setup_task(); + ok(setup, "Failed to setup test_task\n"); + if (!setup) + { + skip("Failed to create task. Skipping tests.\n"); + return; + } + + if (0) /* crashes under Windows */ + hr = ITask_GetFlags(test_task, NULL); + + flags = 0xdeadbeef; + hr = ITask_GetFlags(test_task, &flags); + ok(hr == S_OK, "GetFlags error %#x\n", hr); + ok(flags == 0, "got %#x\n", flags); + + if (0) /* crashes under Windows */ + hr = ITask_GetTaskFlags(test_task, NULL); + + flags = 0xdeadbeef; + hr = ITask_GetTaskFlags(test_task, &flags); + ok(hr == S_OK, "GetTaskFlags error %#x\n", hr); + ok(flags == 0, "got %#x\n", flags); + + cleanup_task(); +} + START_TEST(task) { CoInitialize(NULL); @@ -505,5 +538,6 @@ START_TEST(task) test_SetComment_GetComment(); test_SetMaxRunTime_GetMaxRunTime(); test_SetAccountInformation_GetAccountInformation(); + test_GetFlags(); CoUninitialize(); }