Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
006aadd3
Commit
006aadd3
authored
Jan 16, 2014
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jan 16, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskschd: Treat VT_BSTR/NULL or empty variant as NULL.
parent
16ecf3c8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
task.c
dlls/taskschd/task.c
+2
-1
scheduler.c
dlls/taskschd/tests/scheduler.c
+12
-4
No files found.
dlls/taskschd/task.c
View file @
006aadd3
...
...
@@ -131,7 +131,8 @@ static HRESULT WINAPI TaskService_NewTask(ITaskService *iface, DWORD flags, ITas
static
inline
BOOL
is_variant_null
(
const
VARIANT
*
var
)
{
return
V_VT
(
var
)
==
VT_EMPTY
||
V_VT
(
var
)
==
VT_NULL
;
return
V_VT
(
var
)
==
VT_EMPTY
||
V_VT
(
var
)
==
VT_NULL
||
(
V_VT
(
var
)
==
VT_BSTR
&&
(
V_BSTR
(
var
)
==
NULL
||
!*
V_BSTR
(
var
)));
}
static
HRESULT
WINAPI
TaskService_Connect
(
ITaskService
*
iface
,
VARIANT
server
,
VARIANT
user
,
VARIANT
domain
,
VARIANT
password
)
...
...
dlls/taskschd/tests/scheduler.c
View file @
006aadd3
...
...
@@ -30,6 +30,7 @@
static
void
test_Connect
(
void
)
{
static
WCHAR
empty
[]
=
{
0
};
static
const
WCHAR
deadbeefW
[]
=
{
'0'
,
'.'
,
'0'
,
'.'
,
'0'
,
'.'
,
'0'
,
0
};
WCHAR
comp_name
[
MAX_COMPUTERNAME_LENGTH
+
1
];
DWORD
len
;
...
...
@@ -75,13 +76,13 @@ static void test_Connect(void)
hr
=
ITaskService_Connect
(
service
,
v_comp
,
v_null
,
v_null
,
v_null
);
ok
(
hr
==
S_OK
||
hr
==
E_ACCESSDENIED
/* not an administrator */
,
"Connect error %#x
\n
"
,
hr
);
was_connected
=
hr
==
S_OK
;
SysFreeString
(
V_BSTR
(
&
v_comp
));
V_BSTR
(
&
v_comp
)
=
SysAllocString
(
deadbeefW
);
V_BSTR
(
&
v_comp
)
=
SysAllocString
(
deadbeefW
);
hr
=
ITaskService_Connect
(
service
,
v_comp
,
v_null
,
v_null
,
v_null
);
todo_wine
ok
(
hr
==
HRESULT_FROM_WIN32
(
RPC_S_INVALID_NET_ADDR
),
"expected RPC_S_INVALID_NET_ADDR, got %#x
\n
"
,
hr
);
SysFreeString
(
V_BSTR
(
&
v_comp
));
vbool
=
0xdead
;
hr
=
ITaskService_get_Connected
(
service
,
&
vbool
);
...
...
@@ -89,6 +90,15 @@ todo_wine
ok
(
vbool
==
VARIANT_FALSE
||
(
was_connected
&&
vbool
==
VARIANT_TRUE
),
"Connect shouldn't trash an existing connection, got %d (was connected %d)
\n
"
,
vbool
,
was_connected
);
V_BSTR
(
&
v_comp
)
=
SysAllocString
(
empty
);
hr
=
ITaskService_Connect
(
service
,
v_comp
,
v_null
,
v_null
,
v_null
);
ok
(
hr
==
S_OK
,
"Connect error %#x
\n
"
,
hr
);
SysFreeString
(
V_BSTR
(
&
v_comp
));
V_BSTR
(
&
v_comp
)
=
NULL
;
hr
=
ITaskService_Connect
(
service
,
v_comp
,
v_null
,
v_null
,
v_null
);
ok
(
hr
==
S_OK
,
"Connect error %#x
\n
"
,
hr
);
hr
=
ITaskService_Connect
(
service
,
v_null
,
v_null
,
v_null
,
v_null
);
ok
(
hr
==
S_OK
,
"Connect error %#x
\n
"
,
hr
);
...
...
@@ -102,8 +112,6 @@ todo_wine
ok
(
!
lstrcmpW
(
comp_name
,
bstr
),
"compname %s != server name %s
\n
"
,
wine_dbgstr_w
(
comp_name
),
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
SysFreeString
(
V_BSTR
(
&
v_comp
));
ITaskService_Release
(
service
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment