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
3c186a65
Commit
3c186a65
authored
Feb 25, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 25, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: Make ChangeServiceConfig2W() rpc call compatible with native one.
parent
08900265
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
20 deletions
+46
-20
service.c
dlls/advapi32/service.c
+5
-1
svcctl.idl
include/wine/svcctl.idl
+31
-9
rpc.c
programs/services/rpc.c
+10
-10
No files found.
dlls/advapi32/service.c
View file @
3c186a65
...
...
@@ -2155,7 +2155,11 @@ BOOL WINAPI ChangeServiceConfig2W( SC_HANDLE hService, DWORD dwInfoLevel,
__TRY
{
err
=
svcctl_ChangeServiceConfig2W
(
hService
,
dwInfoLevel
,
lpInfo
);
SC_RPC_CONFIG_INFOW
info
;
info
.
dwInfoLevel
=
dwInfoLevel
;
info
.
descr
=
lpInfo
;
err
=
svcctl_ChangeServiceConfig2W
(
hService
,
info
);
}
__EXCEPT
(
rpc_filter
)
{
...
...
include/wine/svcctl.idl
View file @
3c186a65
...
...
@@ -114,6 +114,18 @@ typedef struct _SERVICE_FAILURE_ACTIONSW {
[
size_is
(
cActions
)
]
SC_ACTION
*
lpsaActions
;
}
SERVICE_FAILURE_ACTIONSW
,
*
LPSERVICE_FAILURE_ACTIONSW
;
typedef
struct
_SERVICE_DELAYED_AUTO_START_INFO
{
BOOL
fDelayedAutostart
;
}
SERVICE_DELAYED_AUTO_START_INFO
;
typedef
struct
_SERVICE_FAILURE_ACTIONS_FLAG
{
BOOL
fFailureActionsOnNonCrashFailures
;
}
SERVICE_FAILURE_ACTIONS_FLAG
;
typedef
struct
_SERVICE_SID_INFO
{
DWORD
dwServiceSidType
;
}
SERVICE_SID_INFO
;
typedef
struct
_SERVICE_PRESHUTDOWN_INFO
{
DWORD
dwPreshutdownTimeout
;
}
SERVICE_PRESHUTDOWN_INFO
,
*
LPSERVICE_PRESHUTDOWN_INFO
;
...
...
@@ -134,12 +146,23 @@ typedef struct _ENUM_SERVICE_STATUSW {
cpp_quote
(
"#endif"
)
typedef
[
switch_type
(
DWORD
)
]
union
{
[
case
(
SERVICE_CONFIG_DESCRIPTION
)
]
SERVICE_DESCRIPTIONW
descr
;
[
case
(
SERVICE_CONFIG_FAILURE_ACTIONS
)
]
SERVICE_FAILURE_ACTIONSW
actions
;
[
case
(
SERVICE_CONFIG_PRESHUTDOWN_INFO
)
]
SERVICE_PRESHUTDOWN_INFO
preshutdown
;
}
SERVICE_CONFIG2W
;
typedef
struct
_SERVICE_RPC_REQUIRED_PRIVILEGES_INFO
{
DWORD
cbRequiredPrivileges
;
[
size_is
(
cbRequiredPrivileges
)
]
BYTE
*
pRequiredPrivileges
;
}
SERVICE_RPC_REQUIRED_PRIVILEGES_INFO
;
typedef
struct
_SC_RPC_CONFIG_INFOW
{
DWORD
dwInfoLevel
;
[
switch_is
(
dwInfoLevel
)
]
union
{
[
case
(
SERVICE_CONFIG_DESCRIPTION
)
]
SERVICE_DESCRIPTIONW
*
descr
;
[
case
(
SERVICE_CONFIG_FAILURE_ACTIONS
)
]
SERVICE_FAILURE_ACTIONSW
*
actions
;
[
case
(
SERVICE_CONFIG_DELAYED_AUTO_START_INFO
)
]
SERVICE_DELAYED_AUTO_START_INFO
*
delayedstart
;
[
case
(
SERVICE_CONFIG_FAILURE_ACTIONS_FLAG
)
]
SERVICE_FAILURE_ACTIONS_FLAG
*
actionsflag
;
[
case
(
SERVICE_CONFIG_SERVICE_SID_INFO
)
]
SERVICE_SID_INFO
*
sid
;
[
case
(
SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO
)
]
SERVICE_RPC_REQUIRED_PRIVILEGES_INFO
*
privinfo
;
[
case
(
SERVICE_CONFIG_PRESHUTDOWN_INFO
)
]
SERVICE_PRESHUTDOWN_INFO
*
preshutdown
;
}
;
}
SC_RPC_CONFIG_INFOW
;
/*
Compatible
with
Windows
function
0
x00
*/
DWORD
svcctl_CloseServiceHandle
(
...
...
@@ -331,11 +354,10 @@ typedef [switch_type(DWORD)] union
/*
Not
compatible
with
Windows
function
0
x24
*/
DWORD
svcctl_ChangeServiceConfig2A
(/*
FIXME
*/)
;
/*
Untested
with
Windows
function
0
x25
*/
/*
Compatible
with
Windows
function
0
x25
*/
DWORD
svcctl_ChangeServiceConfig2W
(
[
in
]
SC_RPC_HANDLE
hService
,
[
in
]
DWORD
InfoLevel
,
[
in
,
switch_is
(
InfoLevel
)
]
SERVICE_CONFIG2W
*
config
)
;
[
in
]
SC_RPC_CONFIG_INFOW
config
)
;
/*
Not
compatible
with
Windows
function
0
x26
*/
DWORD
svcctl_QueryServiceConfig2A
(/*
FIXME
*/)
;
...
...
programs/services/rpc.c
View file @
3c186a65
...
...
@@ -755,7 +755,7 @@ DWORD __cdecl svcctl_SetServiceStatus(
return
ERROR_SUCCESS
;
}
DWORD
__cdecl
svcctl_ChangeServiceConfig2W
(
SC_RPC_HANDLE
hService
,
DWORD
level
,
SERVICE_CONFIG2W
*
config
)
DWORD
__cdecl
svcctl_ChangeServiceConfig2W
(
SC_RPC_HANDLE
hService
,
SC_RPC_CONFIG_INFOW
config
)
{
struct
sc_service_handle
*
service
;
DWORD
err
;
...
...
@@ -763,15 +763,15 @@ DWORD __cdecl svcctl_ChangeServiceConfig2W( SC_RPC_HANDLE hService, DWORD level,
if
((
err
=
validate_service_handle
(
hService
,
SERVICE_CHANGE_CONFIG
,
&
service
))
!=
0
)
return
err
;
switch
(
l
evel
)
switch
(
config
.
dwInfoL
evel
)
{
case
SERVICE_CONFIG_DESCRIPTION
:
{
WCHAR
*
descr
=
NULL
;
if
(
config
->
descr
.
lpDescription
[
0
])
if
(
config
.
descr
->
lpDescription
[
0
])
{
if
(
!
(
descr
=
strdupW
(
config
->
descr
.
lpDescription
)))
if
(
!
(
descr
=
strdupW
(
config
.
descr
->
lpDescription
)))
return
ERROR_NOT_ENOUGH_MEMORY
;
}
...
...
@@ -785,20 +785,20 @@ DWORD __cdecl svcctl_ChangeServiceConfig2W( SC_RPC_HANDLE hService, DWORD level,
break
;
case
SERVICE_CONFIG_FAILURE_ACTIONS
:
WINE_FIXME
(
"SERVICE_CONFIG_FAILURE_ACTIONS not implemented: period %u msg %s cmd %s
\n
"
,
config
->
actions
.
dwResetPeriod
,
wine_dbgstr_w
(
config
->
actions
.
lpRebootMsg
),
wine_dbgstr_w
(
config
->
actions
.
lpCommand
)
);
config
.
actions
->
dwResetPeriod
,
wine_dbgstr_w
(
config
.
actions
->
lpRebootMsg
),
wine_dbgstr_w
(
config
.
actions
->
lpCommand
)
);
break
;
case
SERVICE_CONFIG_PRESHUTDOWN_INFO
:
WINE_TRACE
(
"changing service %p preshutdown timeout to %d
\n
"
,
service
,
config
->
preshutdown
.
dwPreshutdownTimeout
);
service
,
config
.
preshutdown
->
dwPreshutdownTimeout
);
service_lock_exclusive
(
service
->
service_entry
);
service
->
service_entry
->
preshutdown_timeout
=
config
->
preshutdown
.
dwPreshutdownTimeout
;
service
->
service_entry
->
preshutdown_timeout
=
config
.
preshutdown
->
dwPreshutdownTimeout
;
save_service_config
(
service
->
service_entry
);
service_unlock
(
service
->
service_entry
);
break
;
default:
WINE_FIXME
(
"level %u not implemented
\n
"
,
l
evel
);
WINE_FIXME
(
"level %u not implemented
\n
"
,
config
.
dwInfoL
evel
);
err
=
ERROR_INVALID_LEVEL
;
break
;
}
...
...
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