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
a597d9ea
Commit
a597d9ea
authored
Aug 21, 2008
by
Roy Shea
Committed by
Alexandre Julliard
Aug 22, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mstask: Implemented (Set|Get)MaxRunTime.
parent
37708b1e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
18 deletions
+30
-18
mstask_private.h
dlls/mstask/mstask_private.h
+1
-0
task.c
dlls/mstask/task.c
+15
-4
task.c
dlls/mstask/tests/task.c
+14
-14
No files found.
dlls/mstask/mstask_private.h
View file @
a597d9ea
...
@@ -61,6 +61,7 @@ typedef struct
...
@@ -61,6 +61,7 @@ typedef struct
LPWSTR
applicationName
;
LPWSTR
applicationName
;
LPWSTR
parameters
;
LPWSTR
parameters
;
LPWSTR
comment
;
LPWSTR
comment
;
DWORD
maxRunTime
;
}
TaskImpl
;
}
TaskImpl
;
extern
HRESULT
TaskConstructor
(
LPCWSTR
pwszTaskName
,
LPVOID
*
ppObj
);
extern
HRESULT
TaskConstructor
(
LPCWSTR
pwszTaskName
,
LPVOID
*
ppObj
);
...
...
dlls/mstask/task.c
View file @
a597d9ea
...
@@ -540,16 +540,24 @@ static HRESULT WINAPI MSTASK_ITask_SetMaxRunTime(
...
@@ -540,16 +540,24 @@ static HRESULT WINAPI MSTASK_ITask_SetMaxRunTime(
ITask
*
iface
,
ITask
*
iface
,
DWORD
dwMaxRunTime
)
DWORD
dwMaxRunTime
)
{
{
FIXME
(
"(%p, %d): stub
\n
"
,
iface
,
dwMaxRunTime
);
TaskImpl
*
This
=
(
TaskImpl
*
)
iface
;
return
E_NOTIMPL
;
TRACE
(
"(%p, %d)
\n
"
,
iface
,
dwMaxRunTime
);
This
->
maxRunTime
=
dwMaxRunTime
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
MSTASK_ITask_GetMaxRunTime
(
static
HRESULT
WINAPI
MSTASK_ITask_GetMaxRunTime
(
ITask
*
iface
,
ITask
*
iface
,
DWORD
*
pdwMaxRunTime
)
DWORD
*
pdwMaxRunTime
)
{
{
FIXME
(
"(%p, %p): stub
\n
"
,
iface
,
pdwMaxRunTime
);
TaskImpl
*
This
=
(
TaskImpl
*
)
iface
;
return
E_NOTIMPL
;
TRACE
(
"(%p, %p)
\n
"
,
iface
,
pdwMaxRunTime
);
*
pdwMaxRunTime
=
This
->
maxRunTime
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
MSTASK_IPersistFile_QueryInterface
(
static
HRESULT
WINAPI
MSTASK_IPersistFile_QueryInterface
(
...
@@ -721,6 +729,9 @@ HRESULT TaskConstructor(LPCWSTR pwszTaskName, LPVOID *ppObj)
...
@@ -721,6 +729,9 @@ HRESULT TaskConstructor(LPCWSTR pwszTaskName, LPVOID *ppObj)
This
->
parameters
=
NULL
;
This
->
parameters
=
NULL
;
This
->
comment
=
NULL
;
This
->
comment
=
NULL
;
/* Default time is 3 days = 259200000 ms */
This
->
maxRunTime
=
259200000
;
*
ppObj
=
&
This
->
lpVtbl
;
*
ppObj
=
&
This
->
lpVtbl
;
InterlockedIncrement
(
&
dll_ref
);
InterlockedIncrement
(
&
dll_ref
);
return
S_OK
;
return
S_OK
;
...
...
dlls/mstask/tests/task.c
View file @
a597d9ea
...
@@ -388,40 +388,40 @@ static void test_SetMaxRunTime_GetMaxRunTime(void)
...
@@ -388,40 +388,40 @@ static void test_SetMaxRunTime_GetMaxRunTime(void)
* 3 days * 24 hours * 60 minutes * 60 seconds * 1000 ms = 259200000 */
* 3 days * 24 hours * 60 minutes * 60 seconds * 1000 ms = 259200000 */
max_run_time
=
0
;
max_run_time
=
0
;
hres
=
ITask_GetMaxRunTime
(
test_task
,
&
max_run_time
);
hres
=
ITask_GetMaxRunTime
(
test_task
,
&
max_run_time
);
todo_wine
ok
(
hres
==
S_OK
,
"Failed to get max runtime: 0x%08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Failed to get max runtime: 0x%08x
\n
"
,
hres
);
todo_wine
ok
(
max_run_time
==
259200000
,
"Expected 259200000: %d
\n
"
,
max_run_time
);
ok
(
max_run_time
==
259200000
,
"Expected 259200000: %d
\n
"
,
max_run_time
);
/* Basic set test */
/* Basic set test */
max_run_time
=
0
;
max_run_time
=
0
;
hres
=
ITask_SetMaxRunTime
(
test_task
,
1234
);
hres
=
ITask_SetMaxRunTime
(
test_task
,
1234
);
todo_wine
ok
(
hres
==
S_OK
,
"Failed to set max runtime: 0x%08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Failed to set max runtime: 0x%08x
\n
"
,
hres
);
hres
=
ITask_GetMaxRunTime
(
test_task
,
&
max_run_time
);
hres
=
ITask_GetMaxRunTime
(
test_task
,
&
max_run_time
);
todo_wine
ok
(
hres
==
S_OK
,
"Failed to get max runtime: 0x%08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Failed to get max runtime: 0x%08x
\n
"
,
hres
);
todo_wine
ok
(
max_run_time
==
1234
,
"Expected 1234: %d
\n
"
,
max_run_time
);
ok
(
max_run_time
==
1234
,
"Expected 1234: %d
\n
"
,
max_run_time
);
/* Verify that time can be set to zero */
/* Verify that time can be set to zero */
max_run_time
=
1
;
max_run_time
=
1
;
hres
=
ITask_SetMaxRunTime
(
test_task
,
0
);
hres
=
ITask_SetMaxRunTime
(
test_task
,
0
);
todo_wine
ok
(
hres
==
S_OK
,
"Failed to set max runtime: 0x%08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Failed to set max runtime: 0x%08x
\n
"
,
hres
);
hres
=
ITask_GetMaxRunTime
(
test_task
,
&
max_run_time
);
hres
=
ITask_GetMaxRunTime
(
test_task
,
&
max_run_time
);
todo_wine
ok
(
hres
==
S_OK
,
"Failed to get max runtime: 0x%08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Failed to get max runtime: 0x%08x
\n
"
,
hres
);
todo_wine
ok
(
max_run_time
==
0
,
"Expected 0: %d
\n
"
,
max_run_time
);
ok
(
max_run_time
==
0
,
"Expected 0: %d
\n
"
,
max_run_time
);
/* Check resolution by setting time to one */
/* Check resolution by setting time to one */
max_run_time
=
0
;
max_run_time
=
0
;
hres
=
ITask_SetMaxRunTime
(
test_task
,
1
);
hres
=
ITask_SetMaxRunTime
(
test_task
,
1
);
todo_wine
ok
(
hres
==
S_OK
,
"Failed to set max runtime: 0x%08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Failed to set max runtime: 0x%08x
\n
"
,
hres
);
hres
=
ITask_GetMaxRunTime
(
test_task
,
&
max_run_time
);
hres
=
ITask_GetMaxRunTime
(
test_task
,
&
max_run_time
);
todo_wine
ok
(
hres
==
S_OK
,
"Failed to get max runtime: 0x%08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Failed to get max runtime: 0x%08x
\n
"
,
hres
);
todo_wine
ok
(
max_run_time
==
1
,
"Expected 1: %d
\n
"
,
max_run_time
);
ok
(
max_run_time
==
1
,
"Expected 1: %d
\n
"
,
max_run_time
);
/* Verify that time can be set to INFINITE */
/* Verify that time can be set to INFINITE */
max_run_time
=
0
;
max_run_time
=
0
;
hres
=
ITask_SetMaxRunTime
(
test_task
,
INFINITE
);
hres
=
ITask_SetMaxRunTime
(
test_task
,
INFINITE
);
todo_wine
ok
(
hres
==
S_OK
,
"Failed to set max runtime: 0x%08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Failed to set max runtime: 0x%08x
\n
"
,
hres
);
hres
=
ITask_GetMaxRunTime
(
test_task
,
&
max_run_time
);
hres
=
ITask_GetMaxRunTime
(
test_task
,
&
max_run_time
);
todo_wine
ok
(
hres
==
S_OK
,
"Failed to get max runtime: 0x%08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Failed to get max runtime: 0x%08x
\n
"
,
hres
);
todo_wine
ok
(
max_run_time
==
INFINITE
,
"Expected INFINITE: %d
\n
"
,
max_run_time
);
ok
(
max_run_time
==
INFINITE
,
"Expected INFINITE: %d
\n
"
,
max_run_time
);
cleanup_task
();
cleanup_task
();
return
;
return
;
...
...
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