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
6ff9f7e8
Commit
6ff9f7e8
authored
Apr 02, 2018
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mstask: Store comment using IRegistrationInfo.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f6d63654
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
13 deletions
+28
-13
task.c
dlls/mstask/task.c
+28
-13
No files found.
dlls/mstask/task.c
View file @
6ff9f7e8
...
...
@@ -248,41 +248,56 @@ static HRESULT WINAPI MSTASK_ITask_GetExitCode(
static
HRESULT
WINAPI
MSTASK_ITask_SetComment
(
ITask
*
iface
,
LPCWSTR
comment
)
{
TaskImpl
*
This
=
impl_from_ITask
(
iface
);
IRegistrationInfo
*
info
;
HRESULT
hr
;
TRACE
(
"(%p, %s)
\n
"
,
iface
,
debugstr_w
(
comment
));
if
(
!
comment
||
!
comment
[
0
])
comment
=
NULL
;
return
IExecAction_put_Id
(
This
->
action
,
(
BSTR
)
comment
);
hr
=
ITaskDefinition_get_RegistrationInfo
(
This
->
task
,
&
info
);
if
(
hr
==
S_OK
)
{
hr
=
IRegistrationInfo_put_Description
(
info
,
(
BSTR
)
comment
);
IRegistrationInfo_Release
(
info
);
}
return
hr
;
}
static
HRESULT
WINAPI
MSTASK_ITask_GetComment
(
ITask
*
iface
,
LPWSTR
*
comment
)
{
TaskImpl
*
This
=
impl_from_ITask
(
iface
);
IRegistrationInfo
*
info
;
HRESULT
hr
;
BSTR
id
;
BSTR
description
;
DWORD
len
;
TRACE
(
"(%p, %p)
\n
"
,
iface
,
comment
);
hr
=
I
ExecAction_get_Id
(
This
->
action
,
&
id
);
hr
=
I
TaskDefinition_get_RegistrationInfo
(
This
->
task
,
&
info
);
if
(
hr
!=
S_OK
)
return
hr
;
len
=
id
?
lstrlenW
(
id
)
+
1
:
1
;
*
comment
=
CoTaskMemAlloc
(
len
*
sizeof
(
WCHAR
));
if
(
*
comment
)
hr
=
IRegistrationInfo_get_Description
(
info
,
&
description
);
if
(
hr
==
S_OK
)
{
if
(
!
id
)
*
comment
[
0
]
=
0
;
len
=
description
?
lstrlenW
(
description
)
+
1
:
1
;
*
comment
=
CoTaskMemAlloc
(
len
*
sizeof
(
WCHAR
));
if
(
*
comment
)
{
if
(
!
description
)
*
comment
[
0
]
=
0
;
else
lstrcpyW
(
*
comment
,
description
);
hr
=
S_OK
;
}
else
lstrcpyW
(
*
comment
,
id
);
hr
=
S_OK
;
hr
=
E_OUTOFMEMORY
;
SysFreeString
(
description
);
}
else
hr
=
E_OUTOFMEMORY
;
SysFreeString
(
id
);
IRegistrationInfo_Release
(
info
);
return
hr
;
}
...
...
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