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
a9bb8776
Commit
a9bb8776
authored
Feb 17, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
schedsvc: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
486ad92d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
52 deletions
+51
-52
Makefile.in
dlls/schedsvc/Makefile.in
+0
-1
atsvc.c
dlls/schedsvc/atsvc.c
+19
-19
schedsvc.c
dlls/schedsvc/schedsvc.c
+15
-15
svc_main.c
dlls/schedsvc/svc_main.c
+17
-17
No files found.
dlls/schedsvc/Makefile.in
View file @
a9bb8776
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
MODULE
=
schedsvc.dll
IMPORTS
=
rpcrt4 advapi32 ole32
...
...
dlls/schedsvc/atsvc.c
View file @
a9bb8776
...
...
@@ -335,7 +335,7 @@ static DWORD load_unicode_strings(const char *data, DWORD limit, struct job_t *j
{
if
(
limit
<
sizeof
(
USHORT
))
{
TRACE
(
"invalid string %u offset
\n
"
,
i
);
TRACE
(
"invalid string %
l
u offset
\n
"
,
i
);
break
;
}
...
...
@@ -345,11 +345,11 @@ static DWORD load_unicode_strings(const char *data, DWORD limit, struct job_t *j
limit
-=
sizeof
(
USHORT
);
if
(
limit
<
len
*
sizeof
(
WCHAR
))
{
TRACE
(
"invalid string %u size
\n
"
,
i
);
TRACE
(
"invalid string %
l
u size
\n
"
,
i
);
break
;
}
TRACE
(
"string %u: %s
\n
"
,
i
,
wine_dbgstr_wn
((
const
WCHAR
*
)
data
,
len
));
TRACE
(
"string %
l
u: %s
\n
"
,
i
,
wine_dbgstr_wn
((
const
WCHAR
*
)
data
,
len
));
switch
(
i
)
{
...
...
@@ -439,7 +439,7 @@ static BOOL load_job_data(const char *data, DWORD size, struct job_t *info)
TRACE
(
"invalid name_size_offset
\n
"
);
return
FALSE
;
}
TRACE
(
"unicode strings end at %#x
\n
"
,
fixed
->
name_size_offset
+
unicode_strings_size
);
TRACE
(
"unicode strings end at %#
l
x
\n
"
,
fixed
->
name_size_offset
+
unicode_strings_size
);
if
(
size
<
fixed
->
trigger_offset
+
sizeof
(
USHORT
))
{
...
...
@@ -449,7 +449,7 @@ static BOOL load_job_data(const char *data, DWORD size, struct job_t *info)
info
->
trigger_count
=
*
(
const
USHORT
*
)(
data
+
fixed
->
trigger_offset
);
TRACE
(
"trigger_count %u
\n
"
,
info
->
trigger_count
);
triggers_size
=
size
-
fixed
->
trigger_offset
-
sizeof
(
USHORT
);
TRACE
(
"triggers_size %u
\n
"
,
triggers_size
);
TRACE
(
"triggers_size %
l
u
\n
"
,
triggers_size
);
data
+=
fixed
->
name_size_offset
+
unicode_strings_size
;
size
-=
fixed
->
name_size_offset
+
unicode_strings_size
;
...
...
@@ -467,7 +467,7 @@ static BOOL load_job_data(const char *data, DWORD size, struct job_t *info)
TRACE
(
"no space for user data
\n
"
);
return
FALSE
;
}
TRACE
(
"User Data size %#x
\n
"
,
data_size
);
TRACE
(
"User Data size %#
l
x
\n
"
,
data_size
);
size
-=
sizeof
(
USHORT
)
+
data_size
;
data
+=
sizeof
(
USHORT
)
+
data_size
;
...
...
@@ -485,13 +485,13 @@ static BOOL load_job_data(const char *data, DWORD size, struct job_t *info)
TRACE
(
"no space for reserved data
\n
"
);
return
FALSE
;
}
TRACE
(
"Reserved Data size %#x
\n
"
,
data_size
);
TRACE
(
"Reserved Data size %#
l
x
\n
"
,
data_size
);
size
-=
sizeof
(
USHORT
)
+
data_size
;
data
+=
sizeof
(
USHORT
)
+
data_size
;
/* Trigger Data */
TRACE
(
"trigger_offset %04x, triggers end at %04x
\n
"
,
fixed
->
trigger_offset
,
TRACE
(
"trigger_offset %04x, triggers end at %04
l
x
\n
"
,
fixed
->
trigger_offset
,
(
DWORD
)(
fixed
->
trigger_offset
+
sizeof
(
USHORT
)
+
info
->
trigger_count
*
sizeof
(
TASK_TRIGGER
)));
info
->
trigger_count
=
*
(
const
USHORT
*
)
data
;
...
...
@@ -525,9 +525,9 @@ static BOOL load_job_data(const char *data, DWORD size, struct job_t *info)
TRACE
(
"wEndDay = %u
\n
"
,
trigger
[
i
].
wEndDay
);
TRACE
(
"wStartHour = %u
\n
"
,
trigger
[
i
].
wStartHour
);
TRACE
(
"wStartMinute = %u
\n
"
,
trigger
[
i
].
wStartMinute
);
TRACE
(
"MinutesDuration = %u
\n
"
,
trigger
[
i
].
MinutesDuration
);
TRACE
(
"MinutesInterval = %u
\n
"
,
trigger
[
i
].
MinutesInterval
);
TRACE
(
"rgFlags = %u
\n
"
,
trigger
[
i
].
rgFlags
);
TRACE
(
"MinutesDuration = %
l
u
\n
"
,
trigger
[
i
].
MinutesDuration
);
TRACE
(
"MinutesInterval = %
l
u
\n
"
,
trigger
[
i
].
MinutesInterval
);
TRACE
(
"rgFlags = %
l
u
\n
"
,
trigger
[
i
].
rgFlags
);
TRACE
(
"TriggerType = %u
\n
"
,
trigger
[
i
].
TriggerType
);
TRACE
(
"Reserved2 = %u
\n
"
,
trigger
[
i
].
Reserved2
);
TRACE
(
"wRandomMinutesInterval = %u
\n
"
,
trigger
[
i
].
wRandomMinutesInterval
);
...
...
@@ -563,7 +563,7 @@ static BOOL load_job(const WCHAR *name, struct job_t *info)
file
=
CreateFileW
(
name
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
if
(
file
==
INVALID_HANDLE_VALUE
)
{
TRACE
(
"Failed to open %s, error %u
\n
"
,
debugstr_w
(
name
),
GetLastError
());
TRACE
(
"Failed to open %s, error %
l
u
\n
"
,
debugstr_w
(
name
),
GetLastError
());
if
(
GetLastError
()
!=
ERROR_SHARING_VIOLATION
||
try
++
>=
3
)
break
;
Sleep
(
100
);
continue
;
...
...
@@ -574,7 +574,7 @@ static BOOL load_job(const WCHAR *name, struct job_t *info)
mapping
=
CreateFileMappingW
(
file
,
NULL
,
PAGE_READONLY
,
0
,
0
,
0
);
if
(
!
mapping
)
{
TRACE
(
"Failed to create file mapping %s, error %u
\n
"
,
debugstr_w
(
name
),
GetLastError
());
TRACE
(
"Failed to create file mapping %s, error %
l
u
\n
"
,
debugstr_w
(
name
),
GetLastError
());
CloseHandle
(
file
);
break
;
}
...
...
@@ -880,7 +880,7 @@ static void update_job_status(struct job_t *job)
if
(
GetLastError
()
!=
ERROR_SHARING_VIOLATION
||
try
++
>=
3
)
{
TRACE
(
"Failed to update %s, error %u
\n
"
,
debugstr_w
(
job
->
name
),
GetLastError
());
TRACE
(
"Failed to update %s, error %
l
u
\n
"
,
debugstr_w
(
job
->
name
),
GetLastError
());
return
;
}
Sleep
(
100
);
...
...
@@ -1131,7 +1131,7 @@ DWORD __cdecl NetrJobAdd(ATSVC_HANDLE server_name, AT_INFO *info, DWORD *jobid)
if
(
GetLastError
()
!=
ERROR_FILE_EXISTS
)
{
TRACE
(
"create_job error %u
\n
"
,
GetLastError
());
TRACE
(
"create_job error %
l
u
\n
"
,
GetLastError
());
return
GetLastError
();
}
...
...
@@ -1145,7 +1145,7 @@ DWORD __cdecl NetrJobDel(ATSVC_HANDLE server_name, DWORD min_jobid, DWORD max_jo
{
DWORD
jobid
,
ret
=
APE_AT_ID_NOT_FOUND
;
TRACE
(
"%s,%
u,%
u
\n
"
,
debugstr_w
(
server_name
),
min_jobid
,
max_jobid
);
TRACE
(
"%s,%
lu,%l
u
\n
"
,
debugstr_w
(
server_name
),
min_jobid
,
max_jobid
);
EnterCriticalSection
(
&
at_job_list_section
);
...
...
@@ -1155,7 +1155,7 @@ DWORD __cdecl NetrJobDel(ATSVC_HANDLE server_name, DWORD min_jobid, DWORD max_jo
if
(
!
job
)
{
TRACE
(
"job %u not found
\n
"
,
jobid
);
TRACE
(
"job %
l
u not found
\n
"
,
jobid
);
ret
=
APE_AT_ID_NOT_FOUND
;
break
;
}
...
...
@@ -1190,7 +1190,7 @@ DWORD __cdecl NetrJobEnum(ATSVC_HANDLE server_name, AT_ENUM_CONTAINER *container
DWORD
allocated
;
struct
job_t
*
job
;
TRACE
(
"%s,%p,%u,%p,%p
\n
"
,
debugstr_w
(
server_name
),
container
,
max_length
,
total
,
resume
);
TRACE
(
"%s,%p,%
l
u,%p,%p
\n
"
,
debugstr_w
(
server_name
),
container
,
max_length
,
total
,
resume
);
*
total
=
0
;
*
resume
=
0
;
...
...
@@ -1242,7 +1242,7 @@ DWORD __cdecl NetrJobGetInfo(ATSVC_HANDLE server_name, DWORD jobid, AT_INFO **in
struct
job_t
*
job
;
DWORD
ret
=
APE_AT_ID_NOT_FOUND
;
TRACE
(
"%s,%u,%p
\n
"
,
debugstr_w
(
server_name
),
jobid
,
info
);
TRACE
(
"%s,%
l
u,%p
\n
"
,
debugstr_w
(
server_name
),
jobid
,
info
);
EnterCriticalSection
(
&
at_job_list_section
);
...
...
dlls/schedsvc/schedsvc.c
View file @
a9bb8776
...
...
@@ -170,7 +170,7 @@ HRESULT __cdecl SchRpcRegisterTask(const WCHAR *path, const WCHAR *xml, DWORD fl
DWORD
disposition
;
HRESULT
hr
;
TRACE
(
"%s,%s,%#
x,%s,%u,%
u,%p,%p,%p
\n
"
,
debugstr_w
(
path
),
debugstr_w
(
xml
),
flags
,
TRACE
(
"%s,%s,%#
lx,%s,%lu,%l
u,%p,%p,%p
\n
"
,
debugstr_w
(
path
),
debugstr_w
(
xml
),
flags
,
debugstr_w
(
sddl
),
task_logon_type
,
n_creds
,
creds
,
actual_path
,
xml_error_info
);
*
actual_path
=
NULL
;
...
...
@@ -332,7 +332,7 @@ HRESULT __cdecl SchRpcCreateFolder(const WCHAR *path, const WCHAR *sddl, DWORD f
WCHAR
*
full_name
;
HRESULT
hr
;
TRACE
(
"%s,%s,%#x
\n
"
,
debugstr_w
(
path
),
debugstr_w
(
sddl
),
flags
);
TRACE
(
"%s,%s,%#
l
x
\n
"
,
debugstr_w
(
path
),
debugstr_w
(
sddl
),
flags
);
if
(
flags
)
return
E_INVALIDARG
;
...
...
@@ -347,13 +347,13 @@ HRESULT __cdecl SchRpcCreateFolder(const WCHAR *path, const WCHAR *sddl, DWORD f
HRESULT
__cdecl
SchRpcSetSecurity
(
const
WCHAR
*
path
,
const
WCHAR
*
sddl
,
DWORD
flags
)
{
FIXME
(
"%s,%s,%#x: stub
\n
"
,
debugstr_w
(
path
),
debugstr_w
(
sddl
),
flags
);
FIXME
(
"%s,%s,%#
l
x: stub
\n
"
,
debugstr_w
(
path
),
debugstr_w
(
sddl
),
flags
);
return
E_NOTIMPL
;
}
HRESULT
__cdecl
SchRpcGetSecurity
(
const
WCHAR
*
path
,
DWORD
flags
,
WCHAR
**
sddl
)
{
FIXME
(
"%s,%#x,%p: stub
\n
"
,
debugstr_w
(
path
),
flags
,
sddl
);
FIXME
(
"%s,%#
l
x,%p: stub
\n
"
,
debugstr_w
(
path
),
flags
,
sddl
);
return
E_NOTIMPL
;
}
...
...
@@ -398,7 +398,7 @@ HRESULT __cdecl SchRpcEnumFolders(const WCHAR *path, DWORD flags, DWORD *start_i
DWORD
allocated
,
count
,
index
;
TASK_NAMES
list
;
TRACE
(
"%s,%#
x,%u,%
u,%p,%p
\n
"
,
debugstr_w
(
path
),
flags
,
*
start_index
,
n_requested
,
n_names
,
names
);
TRACE
(
"%s,%#
lx,%lu,%l
u,%p,%p
\n
"
,
debugstr_w
(
path
),
flags
,
*
start_index
,
n_requested
,
n_names
,
names
);
*
n_names
=
0
;
*
names
=
NULL
;
...
...
@@ -506,7 +506,7 @@ HRESULT __cdecl SchRpcEnumTasks(const WCHAR *path, DWORD flags, DWORD *start_ind
DWORD
allocated
,
count
,
index
;
TASK_NAMES
list
;
TRACE
(
"%s,%#
x,%u,%
u,%p,%p
\n
"
,
debugstr_w
(
path
),
flags
,
*
start_index
,
n_requested
,
n_names
,
names
);
TRACE
(
"%s,%#
lx,%lu,%l
u,%p,%p
\n
"
,
debugstr_w
(
path
),
flags
,
*
start_index
,
n_requested
,
n_names
,
names
);
*
n_names
=
0
;
*
names
=
NULL
;
...
...
@@ -604,7 +604,7 @@ HRESULT __cdecl SchRpcEnumTasks(const WCHAR *path, DWORD flags, DWORD *start_ind
HRESULT
__cdecl
SchRpcEnumInstances
(
const
WCHAR
*
path
,
DWORD
flags
,
DWORD
*
n_guids
,
GUID
**
guids
)
{
FIXME
(
"%s,%#x,%p,%p: stub
\n
"
,
debugstr_w
(
path
),
flags
,
n_guids
,
guids
);
FIXME
(
"%s,%#
l
x,%p,%p: stub
\n
"
,
debugstr_w
(
path
),
flags
,
n_guids
,
guids
);
return
E_NOTIMPL
;
}
...
...
@@ -618,20 +618,20 @@ HRESULT __cdecl SchRpcGetInstanceInfo(GUID guid, WCHAR **path, DWORD *task_state
HRESULT
__cdecl
SchRpcStopInstance
(
GUID
guid
,
DWORD
flags
)
{
FIXME
(
"%s,%#x: stub
\n
"
,
wine_dbgstr_guid
(
&
guid
),
flags
);
FIXME
(
"%s,%#
l
x: stub
\n
"
,
wine_dbgstr_guid
(
&
guid
),
flags
);
return
E_NOTIMPL
;
}
HRESULT
__cdecl
SchRpcStop
(
const
WCHAR
*
path
,
DWORD
flags
)
{
FIXME
(
"%s,%#x: stub
\n
"
,
debugstr_w
(
path
),
flags
);
FIXME
(
"%s,%#
l
x: stub
\n
"
,
debugstr_w
(
path
),
flags
);
return
E_NOTIMPL
;
}
HRESULT
__cdecl
SchRpcRun
(
const
WCHAR
*
path
,
DWORD
n_args
,
const
WCHAR
**
args
,
DWORD
flags
,
DWORD
session_id
,
const
WCHAR
*
user
,
GUID
*
guid
)
{
FIXME
(
"%s,%
u,%p,%#x,%#
x,%s,%p: stub
\n
"
,
debugstr_w
(
path
),
n_args
,
args
,
flags
,
FIXME
(
"%s,%
lu,%p,%#lx,%#l
x,%s,%p: stub
\n
"
,
debugstr_w
(
path
),
n_args
,
args
,
flags
,
session_id
,
debugstr_w
(
user
),
guid
);
return
E_NOTIMPL
;
}
...
...
@@ -641,7 +641,7 @@ HRESULT __cdecl SchRpcDelete(const WCHAR *path, DWORD flags)
WCHAR
*
full_name
;
HRESULT
hr
=
S_OK
;
TRACE
(
"%s,%#x
\n
"
,
debugstr_w
(
path
),
flags
);
TRACE
(
"%s,%#
l
x
\n
"
,
debugstr_w
(
path
),
flags
);
if
(
flags
)
return
E_INVALIDARG
;
...
...
@@ -664,14 +664,14 @@ HRESULT __cdecl SchRpcDelete(const WCHAR *path, DWORD flags)
HRESULT
__cdecl
SchRpcRename
(
const
WCHAR
*
path
,
const
WCHAR
*
name
,
DWORD
flags
)
{
FIXME
(
"%s,%s,%#x: stub
\n
"
,
debugstr_w
(
path
),
debugstr_w
(
name
),
flags
);
FIXME
(
"%s,%s,%#
l
x: stub
\n
"
,
debugstr_w
(
path
),
debugstr_w
(
name
),
flags
);
return
E_NOTIMPL
;
}
HRESULT
__cdecl
SchRpcScheduledRuntimes
(
const
WCHAR
*
path
,
SYSTEMTIME
*
start
,
SYSTEMTIME
*
end
,
DWORD
flags
,
DWORD
n_requested
,
DWORD
*
n_runtimes
,
SYSTEMTIME
**
runtimes
)
{
FIXME
(
"%s,%p,%p,%#
x,%
u,%p,%p: stub
\n
"
,
debugstr_w
(
path
),
start
,
end
,
flags
,
FIXME
(
"%s,%p,%p,%#
lx,%l
u,%p,%p: stub
\n
"
,
debugstr_w
(
path
),
start
,
end
,
flags
,
n_requested
,
n_runtimes
,
runtimes
);
return
E_NOTIMPL
;
}
...
...
@@ -687,7 +687,7 @@ HRESULT __cdecl SchRpcGetTaskInfo(const WCHAR *path, DWORD flags, DWORD *enabled
WCHAR
*
full_name
,
*
xml
;
HRESULT
hr
;
FIXME
(
"%s,%#x,%p,%p: stub
\n
"
,
debugstr_w
(
path
),
flags
,
enabled
,
task_state
);
FIXME
(
"%s,%#
l
x,%p,%p: stub
\n
"
,
debugstr_w
(
path
),
flags
,
enabled
,
task_state
);
full_name
=
get_full_name
(
path
,
NULL
);
if
(
!
full_name
)
return
E_OUTOFMEMORY
;
...
...
@@ -710,6 +710,6 @@ HRESULT __cdecl SchRpcGetNumberOfMissedRuns(const WCHAR *path, DWORD *runs)
HRESULT
__cdecl
SchRpcEnableTask
(
const
WCHAR
*
path
,
DWORD
enabled
)
{
FIXME
(
"%s,%u: stub
\n
"
,
debugstr_w
(
path
),
enabled
);
FIXME
(
"%s,%
l
u: stub
\n
"
,
debugstr_w
(
path
),
enabled
);
return
E_NOTIMPL
;
}
dlls/schedsvc/svc_main.c
View file @
a9bb8776
...
...
@@ -81,7 +81,7 @@ static DWORD WINAPI tasks_monitor_thread(void *arg)
NULL
,
OPEN_EXISTING
,
FILE_FLAG_BACKUP_SEMANTICS
|
FILE_FLAG_OVERLAPPED
,
NULL
);
if
(
htasks
==
INVALID_HANDLE_VALUE
)
{
ERR
(
"Couldn't start monitoring %s for tasks, error %u
\n
"
,
debugstr_w
(
path
),
GetLastError
());
ERR
(
"Couldn't start monitoring %s for tasks, error %
l
u
\n
"
,
debugstr_w
(
path
),
GetLastError
());
return
-
1
;
}
...
...
@@ -146,11 +146,11 @@ static DWORD WINAPI tasks_monitor_thread(void *arg)
{
if
(
msg
==
JOB_OBJECT_MSG_EXIT_PROCESS
)
{
TRACE
(
"got message: process %#
l
x has terminated
\n
"
,
pid
);
TRACE
(
"got message: process %#
I
x has terminated
\n
"
,
pid
);
update_process_status
(
pid
);
}
else
FIXME
(
"got message %#x from the job
\n
"
,
msg
);
FIXME
(
"got message %#
l
x from the job
\n
"
,
msg
);
}
continue
;
}
...
...
@@ -191,7 +191,7 @@ static DWORD WINAPI tasks_monitor_thread(void *arg)
break
;
default:
FIXME
(
"%s: action %#x not handled
\n
"
,
debugstr_w
(
info
.
data
.
FileName
),
info
.
data
.
Action
);
FIXME
(
"%s: action %#
l
x not handled
\n
"
,
debugstr_w
(
info
.
data
.
FileName
),
info
.
data
.
Action
);
break
;
}
...
...
@@ -235,7 +235,7 @@ void schedsvc_auto_start(void)
scm
=
OpenSCManagerW
(
NULL
,
NULL
,
0
);
if
(
!
scm
)
{
WARN
(
"failed to open SCM (%u)
\n
"
,
GetLastError
());
WARN
(
"failed to open SCM (%
l
u)
\n
"
,
GetLastError
());
return
;
}
...
...
@@ -261,12 +261,12 @@ void schedsvc_auto_start(void)
}
}
else
WARN
(
"failed to query service config (%u)
\n
"
,
GetLastError
());
WARN
(
"failed to query service config (%
l
u)
\n
"
,
GetLastError
());
CloseServiceHandle
(
service
);
}
else
WARN
(
"failed to open service (%u)
\n
"
,
GetLastError
());
WARN
(
"failed to open service (%
l
u)
\n
"
,
GetLastError
());
CloseServiceHandle
(
scm
);
}
...
...
@@ -289,7 +289,7 @@ static void schedsvc_update_status(DWORD state)
static
void
WINAPI
schedsvc_handler
(
DWORD
control
)
{
TRACE
(
"%#x
\n
"
,
control
);
TRACE
(
"%#
l
x
\n
"
,
control
);
switch
(
control
)
{
...
...
@@ -318,14 +318,14 @@ static RPC_STATUS RPC_init(void)
status
=
RpcServerRegisterIf
(
ITaskSchedulerService_v1_0_s_ifspec
,
NULL
,
NULL
);
if
(
status
!=
RPC_S_OK
)
{
ERR
(
"RpcServerRegisterIf error %#x
\n
"
,
status
);
ERR
(
"RpcServerRegisterIf error %#
l
x
\n
"
,
status
);
return
status
;
}
status
=
RpcServerRegisterIf
(
atsvc_v1_0_s_ifspec
,
NULL
,
NULL
);
if
(
status
!=
RPC_S_OK
)
{
ERR
(
"RpcServerRegisterIf error %#x
\n
"
,
status
);
ERR
(
"RpcServerRegisterIf error %#
l
x
\n
"
,
status
);
RpcServerUnregisterIf
(
ITaskSchedulerService_v1_0_s_ifspec
,
NULL
,
FALSE
);
return
status
;
}
...
...
@@ -333,42 +333,42 @@ static RPC_STATUS RPC_init(void)
status
=
RpcServerUseProtseqEpW
(
ncacn_npW
,
RPC_C_PROTSEQ_MAX_REQS_DEFAULT
,
endpoint_npW
,
NULL
);
if
(
status
!=
RPC_S_OK
)
{
ERR
(
"RpcServerUseProtseqEp error %#x
\n
"
,
status
);
ERR
(
"RpcServerUseProtseqEp error %#
l
x
\n
"
,
status
);
return
status
;
}
status
=
RpcServerUseProtseqEpW
(
ncalrpcW
,
RPC_C_PROTSEQ_MAX_REQS_DEFAULT
,
endpoint_lrpcW
,
NULL
);
if
(
status
!=
RPC_S_OK
)
{
ERR
(
"RpcServerUseProtseqEp error %#x
\n
"
,
status
);
ERR
(
"RpcServerUseProtseqEp error %#
l
x
\n
"
,
status
);
return
status
;
}
status
=
RpcServerInqBindings
(
&
sched_bindings
);
if
(
status
!=
RPC_S_OK
)
{
ERR
(
"RpcServerInqBindings error %#x
\n
"
,
status
);
ERR
(
"RpcServerInqBindings error %#
l
x
\n
"
,
status
);
return
status
;
}
status
=
RpcEpRegisterW
(
ITaskSchedulerService_v1_0_s_ifspec
,
sched_bindings
,
NULL
,
NULL
);
if
(
status
!=
RPC_S_OK
)
{
ERR
(
"RpcEpRegister error %#x
\n
"
,
status
);
ERR
(
"RpcEpRegister error %#
l
x
\n
"
,
status
);
return
status
;
}
status
=
RpcEpRegisterW
(
atsvc_v1_0_s_ifspec
,
sched_bindings
,
NULL
,
NULL
);
if
(
status
!=
RPC_S_OK
)
{
ERR
(
"RpcEpRegister error %#x
\n
"
,
status
);
ERR
(
"RpcEpRegister error %#
l
x
\n
"
,
status
);
return
status
;
}
status
=
RpcServerListen
(
1
,
RPC_C_LISTEN_MAX_CALLS_DEFAULT
,
TRUE
);
if
(
status
!=
RPC_S_OK
)
{
ERR
(
"RpcServerListen error %#x
\n
"
,
status
);
ERR
(
"RpcServerListen error %#
l
x
\n
"
,
status
);
return
status
;
}
return
RPC_S_OK
;
...
...
@@ -394,7 +394,7 @@ void WINAPI ServiceMain(DWORD argc, LPWSTR *argv)
schedsvc_handle
=
RegisterServiceCtrlHandlerW
(
scheduleW
,
schedsvc_handler
);
if
(
!
schedsvc_handle
)
{
ERR
(
"RegisterServiceCtrlHandler error %d
\n
"
,
GetLastError
());
ERR
(
"RegisterServiceCtrlHandler error %
l
d
\n
"
,
GetLastError
());
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