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
f9d1aa58
Commit
f9d1aa58
authored
Mar 30, 2018
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Mar 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskschd: Implement ExecAction::put_Id and ExecAction::get_Id.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4c71db15
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
6 deletions
+45
-6
task.c
dlls/taskschd/task.c
+23
-4
scheduler.c
dlls/taskschd/tests/scheduler.c
+22
-2
No files found.
dlls/taskschd/task.c
View file @
f9d1aa58
...
...
@@ -1679,6 +1679,7 @@ typedef struct
WCHAR
*
path
;
WCHAR
*
directory
;
WCHAR
*
args
;
WCHAR
*
id
;
}
ExecAction
;
static
inline
ExecAction
*
impl_from_IExecAction
(
IExecAction
*
iface
)
...
...
@@ -1703,6 +1704,7 @@ static ULONG WINAPI ExecAction_Release(IExecAction *iface)
heap_free
(
action
->
path
);
heap_free
(
action
->
directory
);
heap_free
(
action
->
args
);
heap_free
(
action
->
id
);
heap_free
(
action
);
}
...
...
@@ -1759,14 +1761,30 @@ static HRESULT WINAPI ExecAction_Invoke(IExecAction *iface, DISPID dispid, REFII
static
HRESULT
WINAPI
ExecAction_get_Id
(
IExecAction
*
iface
,
BSTR
*
id
)
{
FIXME
(
"%p,%p: stub
\n
"
,
iface
,
id
);
return
E_NOTIMPL
;
ExecAction
*
action
=
impl_from_IExecAction
(
iface
);
TRACE
(
"%p,%p
\n
"
,
iface
,
id
);
if
(
!
id
)
return
E_POINTER
;
if
(
!
action
->
id
)
*
id
=
NULL
;
else
if
(
!
(
*
id
=
SysAllocString
(
action
->
id
)))
return
E_OUTOFMEMORY
;
return
S_OK
;
}
static
HRESULT
WINAPI
ExecAction_put_Id
(
IExecAction
*
iface
,
BSTR
id
)
{
FIXME
(
"%p,%s: stub
\n
"
,
iface
,
debugstr_w
(
id
));
return
E_NOTIMPL
;
ExecAction
*
action
=
impl_from_IExecAction
(
iface
);
WCHAR
*
str
=
NULL
;
TRACE
(
"%p,%s
\n
"
,
iface
,
debugstr_w
(
id
));
if
(
id
&&
!
(
str
=
heap_strdupW
((
id
))))
return
E_OUTOFMEMORY
;
heap_free
(
action
->
id
);
action
->
id
=
str
;
return
S_OK
;
}
static
HRESULT
WINAPI
ExecAction_get_Type
(
IExecAction
*
iface
,
TASK_ACTION_TYPE
*
type
)
...
...
@@ -1896,6 +1914,7 @@ static HRESULT ExecAction_create(IExecAction **obj)
action
->
path
=
NULL
;
action
->
directory
=
NULL
;
action
->
args
=
NULL
;
action
->
id
=
NULL
;
*
obj
=
&
action
->
IExecAction_iface
;
...
...
dlls/taskschd/tests/scheduler.c
View file @
f9d1aa58
...
...
@@ -1306,12 +1306,13 @@ static void create_action(ITaskDefinition *taskdef)
static
WCHAR
task1_exe
[]
=
{
't'
,
'a'
,
's'
,
'k'
,
'1'
,
'.'
,
'e'
,
'x'
,
'e'
,
0
};
static
WCHAR
workdir
[]
=
{
'w'
,
'o'
,
'r'
,
'k'
,
'd'
,
'i'
,
'r'
,
0
};
static
WCHAR
args
[]
=
{
'a'
,
'r'
,
'g'
,
'u'
,
'm'
,
'e'
,
'n'
,
's'
,
0
};
static
WCHAR
comment
[]
=
{
'c'
,
'o'
,
'm'
,
'm'
,
'e'
,
'n'
,
't'
,
0
};
HRESULT
hr
;
IActionCollection
*
actions
;
IAction
*
action
;
IExecAction
*
exec_action
;
TASK_ACTION_TYPE
type
;
BSTR
path
;
BSTR
path
,
str
;
hr
=
ITaskDefinition_get_Actions
(
taskdef
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got %#x
\n
"
,
hr
);
...
...
@@ -1384,7 +1385,7 @@ static void create_action(ITaskDefinition *taskdef)
ok
(
hr
==
S_OK
,
"put_Arguments error %#x
\n
"
,
hr
);
hr
=
IExecAction_put_Arguments
(
exec_action
,
args
);
ok
(
hr
==
S_OK
,
"put_
WorkingDirectory
error %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"put_
Arguments
error %#x
\n
"
,
hr
);
path
=
NULL
;
hr
=
IExecAction_get_Arguments
(
exec_action
,
&
path
);
...
...
@@ -1393,6 +1394,25 @@ static void create_action(ITaskDefinition *taskdef)
ok
(
!
lstrcmpW
(
path
,
args
),
"got %s
\n
"
,
wine_dbgstr_w
(
path
));
SysFreeString
(
path
);
str
=
(
BSTR
)
0xdeadbeef
;
hr
=
IExecAction_get_Id
(
exec_action
,
&
str
);
ok
(
hr
==
S_OK
,
"get_Id error %#x
\n
"
,
hr
);
ok
(
str
==
NULL
,
"id should be NULL
\n
"
);
hr
=
IExecAction_put_Id
(
exec_action
,
NULL
);
ok
(
hr
==
S_OK
,
"put_Id error %#x
\n
"
,
hr
);
hr
=
IExecAction_put_Id
(
exec_action
,
comment
);
ok
(
hr
==
S_OK
,
"put_Id error %#x
\n
"
,
hr
);
str
=
NULL
;
hr
=
IExecAction_get_Id
(
exec_action
,
&
str
);
ok
(
hr
==
S_OK
,
"get_Id error %#x
\n
"
,
hr
);
ok
(
str
!=
NULL
,
"should not be NULL
\n
"
);
ok
(
!
lstrcmpW
(
str
,
comment
),
"got %s
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
IExecAction_Release
(
exec_action
);
IAction_Release
(
action
);
IActionCollection_Release
(
actions
);
...
...
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