taskschd: Implement ITaskService::get_TargetServer.
This commit is contained in:
parent
938f073e5c
commit
c940a3e97e
|
@ -1,4 +1,5 @@
|
||||||
MODULE = taskschd.dll
|
MODULE = taskschd.dll
|
||||||
|
IMPORTS = oleaut32
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
task.c \
|
task.c \
|
||||||
|
|
|
@ -193,8 +193,19 @@ static HRESULT WINAPI TaskService_get_Connected(ITaskService *iface, VARIANT_BOO
|
||||||
|
|
||||||
static HRESULT WINAPI TaskService_get_TargetServer(ITaskService *iface, BSTR *server)
|
static HRESULT WINAPI TaskService_get_TargetServer(ITaskService *iface, BSTR *server)
|
||||||
{
|
{
|
||||||
FIXME("%p,%p: stub\n", iface, server);
|
TaskService *task_svc = impl_from_ITaskService(iface);
|
||||||
return E_NOTIMPL;
|
|
||||||
|
TRACE("%p,%p\n", iface, server);
|
||||||
|
|
||||||
|
if (!server) return E_POINTER;
|
||||||
|
|
||||||
|
if (!task_svc->connected)
|
||||||
|
return HRESULT_FROM_WIN32(ERROR_ONLY_IF_CONNECTED);
|
||||||
|
|
||||||
|
*server = SysAllocString(task_svc->comp_name);
|
||||||
|
if (!*server) return E_OUTOFMEMORY;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI TaskService_get_ConnectedUser(ITaskService *iface, BSTR *user)
|
static HRESULT WINAPI TaskService_get_ConnectedUser(ITaskService *iface, BSTR *user)
|
||||||
|
|
|
@ -52,7 +52,6 @@ static void test_Connect(void)
|
||||||
ok(vbool == VARIANT_FALSE, "expected VARIANT_FALSE, got %d\n", vbool);
|
ok(vbool == VARIANT_FALSE, "expected VARIANT_FALSE, got %d\n", vbool);
|
||||||
|
|
||||||
hr = ITaskService_get_TargetServer(service, &bstr);
|
hr = ITaskService_get_TargetServer(service, &bstr);
|
||||||
todo_wine
|
|
||||||
ok(hr == HRESULT_FROM_WIN32(ERROR_ONLY_IF_CONNECTED), "expected ERROR_ONLY_IF_CONNECTED, got %#x\n", hr);
|
ok(hr == HRESULT_FROM_WIN32(ERROR_ONLY_IF_CONNECTED), "expected ERROR_ONLY_IF_CONNECTED, got %#x\n", hr);
|
||||||
|
|
||||||
/* Win7 doesn't support UNC \\ prefix, but according to a user
|
/* Win7 doesn't support UNC \\ prefix, but according to a user
|
||||||
|
@ -89,7 +88,6 @@ todo_wine
|
||||||
ok(vbool == VARIANT_TRUE, "expected VARIANT_TRUE, got %d\n", vbool);
|
ok(vbool == VARIANT_TRUE, "expected VARIANT_TRUE, got %d\n", vbool);
|
||||||
|
|
||||||
hr = ITaskService_get_TargetServer(service, &bstr);
|
hr = ITaskService_get_TargetServer(service, &bstr);
|
||||||
todo_wine
|
|
||||||
ok(hr == S_OK, "get_TargetServer error %#x\n", hr);
|
ok(hr == S_OK, "get_TargetServer error %#x\n", hr);
|
||||||
if (hr == S_OK)
|
if (hr == S_OK)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue