From: Vijay Kiran Kamuju infyquest@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 9884ee9cb43..aac3f620afb 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 e2360033513..daef141043e 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)