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
66d8e7f6
Commit
66d8e7f6
authored
Apr 24, 2018
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mstask: Save a task with at least 1 trigger to follow the .job file spec.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0f77a4cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
task.c
dlls/mstask/task.c
+17
-4
No files found.
dlls/mstask/task.c
View file @
66d8e7f6
...
...
@@ -793,9 +793,10 @@ static BOOL write_user_data(HANDLE hfile, BYTE *data, WORD data_size)
static
HRESULT
write_triggers
(
ITask
*
task
,
HANDLE
hfile
)
{
WORD
count
,
i
;
WORD
count
,
i
,
idx
=
0xffff
;
DWORD
size
;
HRESULT
hr
;
ITaskTrigger
*
trigger
;
hr
=
ITask_GetTriggerCount
(
task
,
&
count
);
if
(
hr
!=
S_OK
)
return
hr
;
...
...
@@ -803,9 +804,18 @@ static HRESULT write_triggers(ITask *task, HANDLE hfile)
if
(
!
WriteFile
(
hfile
,
&
count
,
sizeof
(
count
),
&
size
,
NULL
))
return
HRESULT_FROM_WIN32
(
GetLastError
());
/* Windows saves a .job with at least 1 trigger */
if
(
!
count
)
{
hr
=
ITask_CreateTrigger
(
task
,
&
idx
,
&
trigger
);
if
(
hr
!=
S_OK
)
return
hr
;
ITaskTrigger_Release
(
trigger
);
count
=
1
;
}
for
(
i
=
0
;
i
<
count
;
i
++
)
{
ITaskTrigger
*
trigger
;
TASK_TRIGGER
task_trigger
;
hr
=
ITask_GetTrigger
(
task
,
i
,
&
trigger
);
...
...
@@ -813,13 +823,16 @@ static HRESULT write_triggers(ITask *task, HANDLE hfile)
hr
=
ITaskTrigger_GetTrigger
(
trigger
,
&
task_trigger
);
ITaskTrigger_Release
(
trigger
);
if
(
hr
!=
S_OK
)
return
hr
;
if
(
hr
!=
S_OK
)
break
;
if
(
!
WriteFile
(
hfile
,
&
task_trigger
,
sizeof
(
task_trigger
),
&
size
,
NULL
))
return
HRESULT_FROM_WIN32
(
GetLastError
());
}
return
S_OK
;
if
(
idx
!=
0xffff
)
ITask_DeleteTrigger
(
task
,
idx
);
return
hr
;
}
static
BOOL
write_unicode_string
(
HANDLE
hfile
,
const
WCHAR
*
str
)
...
...
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