Commit 189bfa96 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

taskschd: Implement ITaskService::get_Connected.

parent e2119246
......@@ -35,6 +35,7 @@ typedef struct
{
ITaskService ITaskService_iface;
LONG ref;
BOOL connected;
} TaskService;
static inline TaskService *impl_from_ITaskService(ITaskService *iface)
......@@ -135,8 +136,15 @@ static HRESULT WINAPI TaskService_Connect(ITaskService *iface, VARIANT server, V
static HRESULT WINAPI TaskService_get_Connected(ITaskService *iface, VARIANT_BOOL *connected)
{
FIXME("%p,%p: stub\n", iface, connected);
return E_NOTIMPL;
TaskService *task_svc = impl_from_ITaskService(iface);
TRACE("%p,%p\n", iface, connected);
if (!connected) return E_POINTER;
*connected = task_svc->connected ? VARIANT_TRUE : VARIANT_FALSE;
return S_OK;
}
static HRESULT WINAPI TaskService_get_TargetServer(ITaskService *iface, BSTR *server)
......@@ -192,6 +200,7 @@ HRESULT TaskService_create(void **obj)
task_svc->ITaskService_iface.lpVtbl = &TaskService_vtbl;
task_svc->ref = 1;
task_svc->connected = FALSE;
*obj = &task_svc->ITaskService_iface;
TRACE("created %p\n", *obj);
......
......@@ -48,9 +48,7 @@ static void test_Connect(void)
vbool = 0xdead;
hr = ITaskService_get_Connected(service, &vbool);
todo_wine
ok(hr == S_OK, "get_Connected error %#x\n", hr);
todo_wine
ok(vbool == VARIANT_FALSE, "expected VARIANT_FALSE, got %d\n", vbool);
hr = ITaskService_get_TargetServer(service, &bstr);
......@@ -81,7 +79,6 @@ todo_wine
vbool = 0xdead;
hr = ITaskService_get_Connected(service, &vbool);
todo_wine
ok(hr == S_OK, "get_Connected error %#x\n", hr);
todo_wine
ok(vbool == VARIANT_TRUE, "expected VARIANT_TRUE, got %d\n", vbool);
......@@ -92,7 +89,6 @@ todo_wine
vbool = 0xdead;
hr = ITaskService_get_Connected(service, &vbool);
todo_wine
ok(hr == S_OK, "get_Connected error %#x\n", hr);
todo_wine
ok(vbool == VARIANT_TRUE, "expected VARIANT_TRUE, got %d\n", vbool);
......
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