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
88680e52
Commit
88680e52
authored
Jun 20, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
schedsvc: Build with msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6dde50b1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
22 deletions
+23
-22
Makefile.in
dlls/schedsvc/Makefile.in
+2
-0
atsvc.c
dlls/schedsvc/atsvc.c
+3
-3
schedsvc.c
dlls/schedsvc/schedsvc.c
+17
-17
schedsvc_private.h
dlls/schedsvc/schedsvc_private.h
+1
-2
No files found.
dlls/schedsvc/Makefile.in
View file @
88680e52
MODULE
=
schedsvc.dll
IMPORTS
=
rpcrt4 advapi32 ole32
EXTRADLLFLAGS
=
-mno-cygwin
C_SRCS
=
\
atsvc.c
\
schedsvc.c
\
...
...
dlls/schedsvc/atsvc.c
View file @
88680e52
...
...
@@ -1096,9 +1096,9 @@ DWORD __cdecl NetrJobAdd(ATSVC_HANDLE server_name, AT_INFO *info, DWORD *jobid)
static
const
WCHAR
fmtW
[]
=
{
'\\'
,
'T'
,
'a'
,
's'
,
'k'
,
's'
,
'\\'
,
'A'
,
't'
,
'%'
,
'u'
,
'.'
,
'j'
,
'o'
,
'b'
,
0
};
WCHAR
task_name
[
MAX_PATH
],
name
[
32
];
strcpyW
(
task_name
,
windir
);
s
printfW
(
name
,
fmtW
,
current_jobid
);
strcatW
(
task_name
,
name
);
l
strcpyW
(
task_name
,
windir
);
s
wprintf
(
name
,
ARRAY_SIZE
(
name
)
,
fmtW
,
current_jobid
);
l
strcatW
(
task_name
,
name
);
if
(
create_job
(
task_name
,
info
))
{
struct
job_t
*
job
;
...
...
dlls/schedsvc/schedsvc.c
View file @
88680e52
...
...
@@ -46,17 +46,17 @@ static WCHAR *get_full_name(const WCHAR *path, WCHAR **relative_path)
int
len
;
len
=
GetSystemDirectoryW
(
NULL
,
0
);
len
+=
strlenW
(
tasksW
)
+
strlenW
(
path
);
len
+=
lstrlenW
(
tasksW
)
+
l
strlenW
(
path
);
target
=
heap_alloc
(
len
*
sizeof
(
WCHAR
));
if
(
target
)
{
GetSystemDirectoryW
(
target
,
len
);
strcatW
(
target
,
tasksW
);
l
strcatW
(
target
,
tasksW
);
if
(
relative_path
)
*
relative_path
=
target
+
strlenW
(
target
)
-
1
;
*
relative_path
=
target
+
l
strlenW
(
target
)
-
1
;
while
(
*
path
==
'\\'
)
path
++
;
strcatW
(
target
,
path
);
l
strcatW
(
target
,
path
);
}
return
target
;
}
...
...
@@ -70,12 +70,12 @@ static HRESULT create_directory(const WCHAR *path)
WCHAR
*
new_path
;
int
len
;
new_path
=
heap_alloc
((
strlenW
(
path
)
+
1
)
*
sizeof
(
WCHAR
));
new_path
=
heap_alloc
((
l
strlenW
(
path
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
!
new_path
)
return
E_OUTOFMEMORY
;
strcpyW
(
new_path
,
path
);
l
strcpyW
(
new_path
,
path
);
len
=
strlenW
(
new_path
);
len
=
l
strlenW
(
new_path
);
while
(
len
&&
new_path
[
len
-
1
]
==
'\\'
)
{
new_path
[
len
-
1
]
=
0
;
...
...
@@ -87,7 +87,7 @@ static HRESULT create_directory(const WCHAR *path)
WCHAR
*
slash
;
DWORD
last_error
=
GetLastError
();
if
(
last_error
!=
ERROR_PATH_NOT_FOUND
||
!
(
slash
=
strrchrW
(
new_path
,
'\\'
)))
if
(
last_error
!=
ERROR_PATH_NOT_FOUND
||
!
(
slash
=
wcsrchr
(
new_path
,
'\\'
)))
{
hr
=
HRESULT_FROM_WIN32
(
last_error
);
break
;
...
...
@@ -184,10 +184,10 @@ HRESULT __cdecl SchRpcRegisterTask(const WCHAR *path, const WCHAR *xml, DWORD fl
full_name
=
get_full_name
(
path
,
&
relative_path
);
if
(
!
full_name
)
return
E_OUTOFMEMORY
;
if
(
strchrW
(
path
,
'\\'
)
||
strchrW
(
path
,
'/'
))
if
(
wcschr
(
path
,
'\\'
)
||
wcschr
(
path
,
'/'
))
{
WCHAR
*
p
=
strrchrW
(
full_name
,
'/'
);
if
(
!
p
)
p
=
strrchrW
(
full_name
,
'\\'
);
WCHAR
*
p
=
wcsrchr
(
full_name
,
'/'
);
if
(
!
p
)
p
=
wcsrchr
(
full_name
,
'\\'
);
*
p
=
0
;
hr
=
create_directory
(
full_name
);
if
(
hr
!=
S_OK
&&
hr
!=
HRESULT_FROM_WIN32
(
ERROR_ALREADY_EXISTS
))
...
...
@@ -410,14 +410,14 @@ HRESULT __cdecl SchRpcEnumFolders(const WCHAR *path, DWORD flags, DWORD *start_i
full_name
=
get_full_name
(
path
,
NULL
);
if
(
!
full_name
)
return
E_OUTOFMEMORY
;
if
(
strlenW
(
full_name
)
+
2
>
MAX_PATH
)
if
(
l
strlenW
(
full_name
)
+
2
>
MAX_PATH
)
{
heap_free
(
full_name
);
return
HRESULT_FROM_WIN32
(
ERROR_FILENAME_EXCED_RANGE
);
}
strcpyW
(
pathW
,
full_name
);
strcatW
(
pathW
,
allW
);
l
strcpyW
(
pathW
,
full_name
);
l
strcatW
(
pathW
,
allW
);
heap_free
(
full_name
);
...
...
@@ -518,14 +518,14 @@ HRESULT __cdecl SchRpcEnumTasks(const WCHAR *path, DWORD flags, DWORD *start_ind
full_name
=
get_full_name
(
path
,
NULL
);
if
(
!
full_name
)
return
E_OUTOFMEMORY
;
if
(
strlenW
(
full_name
)
+
2
>
MAX_PATH
)
if
(
l
strlenW
(
full_name
)
+
2
>
MAX_PATH
)
{
heap_free
(
full_name
);
return
HRESULT_FROM_WIN32
(
ERROR_FILENAME_EXCED_RANGE
);
}
strcpyW
(
pathW
,
full_name
);
strcatW
(
pathW
,
allW
);
l
strcpyW
(
pathW
,
full_name
);
l
strcatW
(
pathW
,
allW
);
heap_free
(
full_name
);
...
...
dlls/schedsvc/schedsvc_private.h
View file @
88680e52
...
...
@@ -20,7 +20,6 @@
#define __WINE_SCHEDSVC_PRIVATE_H__
#include "wine/heap.h"
#include "wine/unicode.h"
void
schedsvc_auto_start
(
void
)
DECLSPEC_HIDDEN
;
void
add_job
(
const
WCHAR
*
name
)
DECLSPEC_HIDDEN
;
...
...
@@ -38,7 +37,7 @@ static inline WCHAR *heap_strdupW(const WCHAR *src)
WCHAR
*
dst
;
unsigned
len
;
if
(
!
src
)
return
NULL
;
len
=
(
strlenW
(
src
)
+
1
)
*
sizeof
(
WCHAR
);
len
=
(
l
strlenW
(
src
)
+
1
)
*
sizeof
(
WCHAR
);
if
((
dst
=
heap_alloc
(
len
)))
memcpy
(
dst
,
src
,
len
);
return
dst
;
}
...
...
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