From: Vijay Kiran Kamuju <infyquest(a)gmail.com> --- dlls/taskschd/task.c | 7 +++++-- dlls/taskschd/tests/scheduler.c | 24 ++++++++++++++++-------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/dlls/taskschd/task.c b/dlls/taskschd/task.c index 51274ed3f3d..c0ea5fd4028 100644 --- a/dlls/taskschd/task.c +++ b/dlls/taskschd/task.c @@ -197,8 +197,11 @@ static HRESULT WINAPI RepetitionPattern_get_StopAtDurationEnd(IRepetitionPattern static HRESULT WINAPI RepetitionPattern_put_StopAtDurationEnd(IRepetitionPattern *iface, VARIANT_BOOL stop) { RepetitionPattern *This = impl_from_IRepetitionPattern(iface); - FIXME("(%p)->(%x)\n", This, stop); - return E_NOTIMPL; + + TRACE("(%p)->(%x)\n", This, stop); + + This->stop = !!stop; + return S_OK; } static const IRepetitionPatternVtbl RepetitionPattern_vtbl = { diff --git a/dlls/taskschd/tests/scheduler.c b/dlls/taskschd/tests/scheduler.c index dc01859811c..d20f3b92566 100644 --- a/dlls/taskschd/tests/scheduler.c +++ b/dlls/taskschd/tests/scheduler.c @@ -1348,14 +1348,6 @@ static void test_repetition_pattern(IRepetitionPattern *pattern) ok(hr == S_OK, "get_Interval failed: %08lx\n", hr); ok(interval == NULL, "interval not set\n"); - hr = IRepetitionPattern_get_StopAtDurationEnd(pattern, NULL); - ok(hr == E_POINTER, "get_Enabled failed: %08lx\n", hr); - - stopatend = VARIANT_TRUE; - hr = IRepetitionPattern_get_StopAtDurationEnd(pattern, &stopatend); - ok(hr == S_OK, "get_StopAtDurationEnd failed: %08lx\n", hr); - ok(stopatend == VARIANT_FALSE, "got %d\n", stopatend); - for (i = 0; i < ARRAY_SIZE(start_test); i++) { winetest_push_context("%lu", i); @@ -1394,6 +1386,22 @@ static void test_repetition_pattern(IRepetitionPattern *pattern) hr = IRepetitionPattern_put_Interval(pattern, NULL); ok(hr == S_OK, "put_Interval failed: %08lx\n", hr); + + hr = IRepetitionPattern_get_StopAtDurationEnd(pattern, NULL); + ok(hr == E_POINTER, "get_Enabled failed: %08lx\n", hr); + + stopatend = VARIANT_TRUE; + hr = IRepetitionPattern_get_StopAtDurationEnd(pattern, &stopatend); + ok(hr == S_OK, "get_StopAtDurationEnd failed: %08lx\n", hr); + ok(stopatend == VARIANT_FALSE, "got %d\n", stopatend); + + hr = IRepetitionPattern_put_StopAtDurationEnd(pattern, VARIANT_TRUE); + ok(hr == S_OK, "put_StopAtDurationEnd failed: %08lx\n", hr); + + stopatend = VARIANT_FALSE; + hr = IRepetitionPattern_get_StopAtDurationEnd(pattern, &stopatend); + ok(hr == S_OK, "get_StopAtDurationEnd failed: %08lx\n", hr); + ok(stopatend == VARIANT_TRUE, "got %d\n", stopatend); } static void test_daily_trigger(ITrigger *trigger) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6799