Commit a3cd93ca authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

taskschd: Forward IRegisteredTask::get_Enabled to SchRpcGetTaskInfo.

parent 7f3c32b6
......@@ -160,10 +160,18 @@ static HRESULT WINAPI regtask_get_State(IRegisteredTask *iface, TASK_STATE *stat
return SchRpcGetTaskInfo(regtask->path, SCH_FLAG_STATE, &enabled, state);
}
static HRESULT WINAPI regtask_get_Enabled(IRegisteredTask *iface, VARIANT_BOOL *enabled)
static HRESULT WINAPI regtask_get_Enabled(IRegisteredTask *iface, VARIANT_BOOL *v_enabled)
{
FIXME("%p,%p: stub\n", iface, enabled);
return E_NOTIMPL;
RegisteredTask *regtask = impl_from_IRegisteredTask(iface);
DWORD enabled, state;
HRESULT hr;
TRACE("%p,%p\n", iface, v_enabled);
hr = SchRpcGetTaskInfo(regtask->path, 0, &enabled, &state);
if (hr == S_OK)
*v_enabled = enabled ? VARIANT_TRUE : VARIANT_FALSE;
return hr;
}
static HRESULT WINAPI regtask_put_Enabled(IRegisteredTask *iface, VARIANT_BOOL enabled)
......
......@@ -818,9 +818,7 @@ todo_wine
ok(hr == S_OK, "get_State error %#x\n", hr);
ok(state == TASK_STATE_DISABLED, "expected TASK_STATE_DISABLED, got %d\n", state);
hr = IRegisteredTask_get_Enabled(task1, &vbool);
todo_wine
ok(hr == S_OK, "get_Enabled error %#x\n", hr);
if (hr == S_OK)
ok(vbool == VARIANT_FALSE, "expected VARIANT_FALSE, got %d\n", vbool);
IRegisteredTask_Release(task1);
......@@ -846,9 +844,8 @@ if (hr == S_OK)
todo_wine
ok(state == TASK_STATE_READY, "expected TASK_STATE_READY, got %d\n", state);
hr = IRegisteredTask_get_Enabled(task2, &vbool);
todo_wine
ok(hr == S_OK, "get_Enabled error %#x\n", hr);
if (hr == S_OK)
todo_wine
ok(vbool == VARIANT_TRUE, "expected VARIANT_TRUE, got %d\n", vbool);
IRegisteredTask_Release(task2);
......@@ -875,9 +872,7 @@ todo_wine
ok(hr == S_OK, "get_State error %#x\n", hr);
ok(state == TASK_STATE_DISABLED, "expected TASK_STATE_DISABLED, got %d\n", state);
hr = IRegisteredTask_get_Enabled(task1, &vbool);
todo_wine
ok(hr == S_OK, "get_Enabled error %#x\n", hr);
if (hr == S_OK)
ok(vbool == VARIANT_FALSE, "expected VARIANT_FALSE, got %d\n", vbool);
hr = IRegisteredTask_put_Enabled(task1, VARIANT_TRUE);
......@@ -888,9 +883,8 @@ todo_wine
todo_wine
ok(state == TASK_STATE_READY, "expected TASK_STATE_READY, got %d\n", state);
hr = IRegisteredTask_get_Enabled(task1, &vbool);
todo_wine
ok(hr == S_OK, "get_Enabled error %#x\n", hr);
if (hr == S_OK)
todo_wine
ok(vbool == VARIANT_TRUE, "expected VARIANT_TRUE, got %d\n", vbool);
IRegisteredTask_Release(task1);
......@@ -911,9 +905,8 @@ if (hr == S_OK)
todo_wine
ok(state == TASK_STATE_READY, "expected TASK_STATE_READY, got %d\n", state);
hr = IRegisteredTask_get_Enabled(task2, &vbool);
todo_wine
ok(hr == S_OK, "get_Enabled error %#x\n", hr);
if (hr == S_OK)
todo_wine
ok(vbool == VARIANT_TRUE, "expected VARIANT_TRUE, got %d\n", vbool);
IRegisteredTask_Release(task2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment