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
5907782d
Commit
5907782d
authored
Apr 20, 2018
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mstask: Implement ITask::GetStatus().
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cbe3300b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
+20
-8
task.c
dlls/mstask/task.c
+9
-5
task.c
dlls/mstask/tests/task.c
+11
-3
No files found.
dlls/mstask/task.c
View file @
5907782d
...
...
@@ -39,6 +39,7 @@ typedef struct
ITaskDefinition
*
task
;
IExecAction
*
action
;
LPWSTR
task_name
;
HRESULT
status
;
DWORD
maxRunTime
;
LPWSTR
accountName
;
}
TaskImpl
;
...
...
@@ -229,12 +230,14 @@ static HRESULT WINAPI MSTASK_ITask_GetMostRecentRunTime(
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MSTASK_ITask_GetStatus
(
ITask
*
iface
,
HRESULT
*
phrStatus
)
static
HRESULT
WINAPI
MSTASK_ITask_GetStatus
(
ITask
*
iface
,
HRESULT
*
status
)
{
FIXME
(
"(%p, %p): stub
\n
"
,
iface
,
phrStatus
);
return
E_NOTIMPL
;
TaskImpl
*
This
=
impl_from_ITask
(
iface
);
TRACE
(
"(%p, %p)
\n
"
,
iface
,
status
);
*
status
=
This
->
status
;
return
S_OK
;
}
static
HRESULT
WINAPI
MSTASK_ITask_GetExitCode
(
...
...
@@ -840,6 +843,7 @@ HRESULT TaskConstructor(ITaskService *service, const WCHAR *task_name, ITask **t
This
->
ref
=
1
;
This
->
task
=
taskdef
;
This
->
task_name
=
heap_strdupW
(
task_name
);
This
->
status
=
SCHED_S_TASK_NOT_SCHEDULED
;
This
->
accountName
=
NULL
;
/* Default time is 3 days = 259200000 ms */
...
...
dlls/mstask/tests/task.c
View file @
5907782d
...
...
@@ -2,6 +2,7 @@
* Test suite for Task interface
*
* Copyright (C) 2008 Google (Roy Shea)
* Copyright (C) 2018 Dmitry Timoshkov
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -496,10 +497,10 @@ static void test_SetAccountInformation_GetAccountInformation(void)
return
;
}
static
void
test_
GetFlags
(
void
)
static
void
test_
task_state
(
void
)
{
BOOL
setup
;
HRESULT
hr
;
HRESULT
hr
,
status
;
DWORD
flags
;
setup
=
setup_task
();
...
...
@@ -526,6 +527,13 @@ static void test_GetFlags(void)
ok
(
hr
==
S_OK
,
"GetTaskFlags error %#x
\n
"
,
hr
);
ok
(
flags
==
0
,
"got %#x
\n
"
,
flags
);
if
(
0
)
/* crashes under Windows */
hr
=
ITask_GetStatus
(
test_task
,
NULL
);
status
=
0xdeadbeef
;
hr
=
ITask_GetStatus
(
test_task
,
&
status
);
ok
(
status
==
SCHED_S_TASK_NOT_SCHEDULED
,
"got %#x
\n
"
,
status
);
cleanup_task
();
}
...
...
@@ -538,6 +546,6 @@ START_TEST(task)
test_SetComment_GetComment
();
test_SetMaxRunTime_GetMaxRunTime
();
test_SetAccountInformation_GetAccountInformation
();
test_
GetFlags
();
test_
task_state
();
CoUninitialize
();
}
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