Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
39c1c9c2
Commit
39c1c9c2
authored
Apr 10, 2014
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 10, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskschd: Add support for registering a task with NULL name in the root folder.
Because server receives full task name it can't autogenerate a name in a non-root folder.
parent
adc60c77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
8 deletions
+19
-8
regtask.c
dlls/taskschd/regtask.c
+18
-2
scheduler.c
dlls/taskschd/tests/scheduler.c
+1
-6
No files found.
dlls/taskschd/regtask.c
View file @
39c1c9c2
...
...
@@ -313,8 +313,21 @@ HRESULT RegisteredTask_create(const WCHAR *path, const WCHAR *name, ITaskDefinit
RegisteredTask
*
regtask
;
HRESULT
hr
;
full_name
=
get_full_path
(
path
,
name
);
if
(
!
full_name
)
return
E_OUTOFMEMORY
;
if
(
!
name
)
{
if
(
!
create
)
return
E_INVALIDARG
;
/* NULL task name is allowed only in the root folder */
if
(
path
[
0
]
!=
'\\'
||
path
[
1
])
return
E_INVALIDARG
;
full_name
=
NULL
;
}
else
{
full_name
=
get_full_path
(
path
,
name
);
if
(
!
full_name
)
return
E_OUTOFMEMORY
;
}
regtask
=
heap_alloc
(
sizeof
(
*
regtask
));
if
(
!
regtask
)
...
...
@@ -337,6 +350,9 @@ HRESULT RegisteredTask_create(const WCHAR *path, const WCHAR *name, ITaskDefinit
SysFreeString
(
xml
);
return
hr
;
}
heap_free
(
full_name
);
full_name
=
heap_strdupW
(
actual_path
);
MIDL_user_free
(
actual_path
);
}
else
...
...
dlls/taskschd/tests/scheduler.c
View file @
39c1c9c2
...
...
@@ -851,7 +851,6 @@ todo_wine
IRegisteredTask_Release
(
task2
);
hr
=
ITaskFolder_GetTask
(
root
,
NULL
,
&
task1
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %#x
\n
"
,
hr
);
hr
=
ITaskFolder_GetTask
(
root
,
Wine_Task1
,
NULL
);
...
...
@@ -929,10 +928,8 @@ todo_wine
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"expected ERROR_FILE_NOT_FOUND, got %#x
\n
"
,
hr
);
hr
=
ITaskFolder_RegisterTask
(
root
,
NULL
,
xmlW
,
TASK_CREATE
,
v_null
,
v_null
,
TASK_LOGON_NONE
,
v_null
,
&
task1
);
todo_wine
ok
(
hr
==
S_OK
,
"RegisterTask error %#x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
hr
=
IRegisteredTask_get_Name
(
task1
,
&
bstr
);
ok
(
hr
==
S_OK
,
"get_Name error %#x
\n
"
,
hr
);
hr
=
IIDFromString
(
bstr
,
&
iid
);
...
...
@@ -942,10 +939,8 @@ if (hr == S_OK)
hr
=
ITaskFolder_DeleteTask
(
root
,
bstr
,
0
);
ok
(
hr
==
S_OK
,
"DeleteTask error %#x
\n
"
,
hr
);
}
hr
=
ITaskFolder_RegisterTask
(
folder
,
NULL
,
xmlW
,
TASK_CREATE
,
v_null
,
v_null
,
TASK_LOGON_NONE
,
v_null
,
&
task1
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %#x
\n
"
,
hr
);
ITaskFolder_Release
(
folder
);
...
...
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