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

taskschd: ITaskService::GetFolder should fail if not connected to the server.

parent 2d9dfb18
......@@ -113,10 +113,15 @@ static HRESULT WINAPI TaskService_Invoke(ITaskService *iface, DISPID dispid, REF
static HRESULT WINAPI TaskService_GetFolder(ITaskService *iface, BSTR path, ITaskFolder **folder)
{
TaskService *task_svc = impl_from_ITaskService(iface);
TRACE("%p,%s,%p\n", iface, debugstr_w(path), folder);
if (!folder) return E_POINTER;
if (!task_svc->connected)
return HRESULT_FROM_WIN32(ERROR_ONLY_IF_CONNECTED);
return TaskFolder_create(path, NULL, folder, FALSE);
}
......
......@@ -142,6 +142,9 @@ static void test_GetFolder(void)
return;
}
hr = ITaskService_GetFolder(service, NULL, &folder);
ok(hr == HRESULT_FROM_WIN32(ERROR_ONLY_IF_CONNECTED), "expected ERROR_ONLY_IF_CONNECTED, got %#x\n", hr);
V_VT(&v_null) = VT_NULL;
hr = ITaskService_Connect(service, v_null, v_null, v_null, v_null);
......
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