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
5d066f4f
Commit
5d066f4f
authored
Nov 15, 2020
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mstask: Use wide-char string literals.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a65616cf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
16 deletions
+9
-16
task.c
dlls/mstask/task.c
+4
-6
task_scheduler.c
dlls/mstask/task_scheduler.c
+5
-10
No files found.
dlls/mstask/task.c
View file @
5d066f4f
...
...
@@ -1617,8 +1617,8 @@ static BOOL write_unicode_string(HANDLE hfile, const WCHAR *str)
static
HRESULT
WINAPI
MSTASK_IPersistFile_Save
(
IPersistFile
*
iface
,
LPCOLESTR
task_name
,
BOOL
remember
)
{
static
WCHAR
authorW
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
0
}
;
static
WCHAR
commentW
[]
=
{
'C'
,
'r'
,
'e'
,
'a'
,
't'
,
'e'
,
'd'
,
' '
,
'b'
,
'y'
,
' '
,
'W'
,
'i'
,
'n'
,
'e'
,
0
}
;
static
WCHAR
authorW
[]
=
L"Wine"
;
static
WCHAR
commentW
[]
=
L"Created by Wine"
;
FIXDLEN_DATA
fixed
;
WORD
word
,
user_data_size
=
0
;
HANDLE
hfile
;
...
...
@@ -1883,8 +1883,6 @@ static const IPersistFileVtbl MSTASK_IPersistFileVtbl =
HRESULT
TaskConstructor
(
ITaskService
*
service
,
const
WCHAR
*
name
,
ITask
**
task
)
{
static
const
WCHAR
tasksW
[]
=
{
'\\'
,
'T'
,
'a'
,
's'
,
'k'
,
's'
,
'\\'
,
0
};
static
const
WCHAR
jobW
[]
=
{
'.'
,
'j'
,
'o'
,
'b'
,
0
};
TaskImpl
*
This
;
WCHAR
task_name
[
MAX_PATH
];
ITaskDefinition
*
taskdef
;
...
...
@@ -1896,9 +1894,9 @@ HRESULT TaskConstructor(ITaskService *service, const WCHAR *name, ITask **task)
if
(
wcschr
(
name
,
'.'
))
return
E_INVALIDARG
;
GetWindowsDirectoryW
(
task_name
,
MAX_PATH
);
lstrcatW
(
task_name
,
tasksW
);
lstrcatW
(
task_name
,
L"
\\
Tasks
\\
"
);
lstrcatW
(
task_name
,
name
);
lstrcatW
(
task_name
,
jobW
);
lstrcatW
(
task_name
,
L".job"
);
hr
=
ITaskService_NewTask
(
service
,
0
,
&
taskdef
);
if
(
hr
!=
S_OK
)
return
hr
;
...
...
dlls/mstask/task_scheduler.c
View file @
5d066f4f
...
...
@@ -124,7 +124,6 @@ static inline BOOL is_file(const WIN32_FIND_DATAW *data)
static
HRESULT
WINAPI
EnumWorkItems_Next
(
IEnumWorkItems
*
iface
,
ULONG
count
,
LPWSTR
**
names
,
ULONG
*
fetched
)
{
static
const
WCHAR
tasksW
[]
=
{
'\\'
,
'T'
,
'a'
,
's'
,
'k'
,
's'
,
'\\'
,
'*'
,
0
};
EnumWorkItemsImpl
*
This
=
impl_from_IEnumWorkItems
(
iface
);
WCHAR
path
[
MAX_PATH
];
WIN32_FIND_DATAW
data
;
...
...
@@ -146,7 +145,7 @@ static HRESULT WINAPI EnumWorkItems_Next(IEnumWorkItems *iface, ULONG count, LPW
if
(
This
->
handle
==
INVALID_HANDLE_VALUE
)
{
GetWindowsDirectoryW
(
path
,
MAX_PATH
);
lstrcatW
(
path
,
tasksW
);
lstrcatW
(
path
,
L"
\\
Tasks
\\
*"
);
This
->
handle
=
FindFirstFileW
(
path
,
&
data
);
if
(
This
->
handle
==
INVALID_HANDLE_VALUE
)
return
S_FALSE
;
...
...
@@ -417,8 +416,6 @@ static HRESULT WINAPI MSTASK_ITaskScheduler_Activate(ITaskScheduler *iface,
static
HRESULT
WINAPI
MSTASK_ITaskScheduler_Delete
(
ITaskScheduler
*
iface
,
LPCWSTR
name
)
{
static
const
WCHAR
tasksW
[]
=
{
'\\'
,
'T'
,
'a'
,
's'
,
'k'
,
's'
,
'\\'
,
0
};
static
const
WCHAR
jobW
[]
=
{
'.'
,
'j'
,
'o'
,
'b'
,
0
};
WCHAR
task_name
[
MAX_PATH
];
TRACE
(
"%p, %s
\n
"
,
iface
,
debugstr_w
(
name
));
...
...
@@ -426,9 +423,9 @@ static HRESULT WINAPI MSTASK_ITaskScheduler_Delete(ITaskScheduler *iface, LPCWST
if
(
wcschr
(
name
,
'.'
))
return
E_INVALIDARG
;
GetWindowsDirectoryW
(
task_name
,
MAX_PATH
);
lstrcatW
(
task_name
,
tasksW
);
lstrcatW
(
task_name
,
L"
\\
Tasks
\\
"
);
lstrcatW
(
task_name
,
name
);
lstrcatW
(
task_name
,
jobW
);
lstrcatW
(
task_name
,
L".job"
);
if
(
!
DeleteFileW
(
task_name
))
return
HRESULT_FROM_WIN32
(
GetLastError
());
...
...
@@ -459,8 +456,6 @@ static HRESULT WINAPI MSTASK_ITaskScheduler_NewWorkItem(
static
HRESULT
WINAPI
MSTASK_ITaskScheduler_AddWorkItem
(
ITaskScheduler
*
iface
,
LPCWSTR
name
,
IScheduledWorkItem
*
item
)
{
static
const
WCHAR
tasksW
[]
=
{
'\\'
,
'T'
,
'a'
,
's'
,
'k'
,
's'
,
'\\'
,
0
};
static
const
WCHAR
jobW
[]
=
{
'.'
,
'j'
,
'o'
,
'b'
,
0
};
WCHAR
task_name
[
MAX_PATH
];
IPersistFile
*
pfile
;
HRESULT
hr
;
...
...
@@ -470,9 +465,9 @@ static HRESULT WINAPI MSTASK_ITaskScheduler_AddWorkItem(ITaskScheduler *iface, L
if
(
wcschr
(
name
,
'.'
))
return
E_INVALIDARG
;
GetWindowsDirectoryW
(
task_name
,
MAX_PATH
);
lstrcatW
(
task_name
,
tasksW
);
lstrcatW
(
task_name
,
L"
\\
Tasks
\\
"
);
lstrcatW
(
task_name
,
name
);
lstrcatW
(
task_name
,
jobW
);
lstrcatW
(
task_name
,
L".job"
);
hr
=
IScheduledWorkItem_QueryInterface
(
item
,
&
IID_IPersistFile
,
(
void
**
)
&
pfile
);
if
(
hr
==
S_OK
)
...
...
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