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
0f80d4b6
Commit
0f80d4b6
authored
Feb 27, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 27, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: Make RPC interface compatible with native.
parent
7520297a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
9 deletions
+57
-9
service.c
dlls/advapi32/service.c
+57
-9
svcctl.idl
include/wine/svcctl.idl
+0
-0
rpc.c
programs/services/rpc.c
+0
-0
No files found.
dlls/advapi32/service.c
View file @
0f80d4b6
...
...
@@ -150,8 +150,7 @@ static inline DWORD multisz_cb(LPCWSTR wmultisz)
/******************************************************************************
* RPC connection with services.exe
*/
DECLSPEC_HIDDEN
handle_t
__RPC_USER
MACHINE_HANDLEW_bind
(
MACHINE_HANDLEW
MachineName
)
static
handle_t
rpc_wstr_bind
(
RPC_WSTR
str
)
{
WCHAR
transport
[]
=
SVCCTL_TRANSPORT
;
WCHAR
endpoint
[]
=
SVCCTL_ENDPOINT
;
...
...
@@ -159,7 +158,7 @@ DECLSPEC_HIDDEN handle_t __RPC_USER MACHINE_HANDLEW_bind(MACHINE_HANDLEW Machine
RPC_STATUS
status
;
handle_t
rpc_handle
;
status
=
RpcStringBindingComposeW
(
NULL
,
transport
,
(
RPC_WSTR
)
MachineName
,
endpoint
,
NULL
,
&
binding_str
);
status
=
RpcStringBindingComposeW
(
NULL
,
transport
,
str
,
endpoint
,
NULL
,
&
binding_str
);
if
(
status
!=
RPC_S_OK
)
{
ERR
(
"RpcStringBindingComposeW failed (%d)
\n
"
,
(
DWORD
)
status
);
...
...
@@ -178,11 +177,63 @@ DECLSPEC_HIDDEN handle_t __RPC_USER MACHINE_HANDLEW_bind(MACHINE_HANDLEW Machine
return
rpc_handle
;
}
static
handle_t
rpc_cstr_bind
(
RPC_CSTR
str
)
{
RPC_CSTR
transport
=
(
RPC_CSTR
)
SVCCTL_TRANSPORTA
;
RPC_CSTR
endpoint
=
(
RPC_CSTR
)
SVCCTL_ENDPOINTA
;
RPC_CSTR
binding_str
;
RPC_STATUS
status
;
handle_t
rpc_handle
;
status
=
RpcStringBindingComposeA
(
NULL
,
transport
,
str
,
endpoint
,
NULL
,
&
binding_str
);
if
(
status
!=
RPC_S_OK
)
{
ERR
(
"RpcStringBindingComposeW failed (%d)
\n
"
,
(
DWORD
)
status
);
return
NULL
;
}
status
=
RpcBindingFromStringBindingA
(
binding_str
,
&
rpc_handle
);
RpcStringFreeA
(
&
binding_str
);
if
(
status
!=
RPC_S_OK
)
{
ERR
(
"Couldn't connect to services.exe: error code %u
\n
"
,
(
DWORD
)
status
);
return
NULL
;
}
return
rpc_handle
;
}
DECLSPEC_HIDDEN
handle_t
__RPC_USER
MACHINE_HANDLEA_bind
(
MACHINE_HANDLEA
MachineName
)
{
return
rpc_cstr_bind
((
RPC_CSTR
)
MachineName
);
}
DECLSPEC_HIDDEN
void
__RPC_USER
MACHINE_HANDLEA_unbind
(
MACHINE_HANDLEA
MachineName
,
handle_t
h
)
{
RpcBindingFree
(
&
h
);
}
DECLSPEC_HIDDEN
handle_t
__RPC_USER
MACHINE_HANDLEW_bind
(
MACHINE_HANDLEW
MachineName
)
{
return
rpc_wstr_bind
((
RPC_WSTR
)
MachineName
);
}
DECLSPEC_HIDDEN
void
__RPC_USER
MACHINE_HANDLEW_unbind
(
MACHINE_HANDLEW
MachineName
,
handle_t
h
)
{
RpcBindingFree
(
&
h
);
}
DECLSPEC_HIDDEN
handle_t
__RPC_USER
SVCCTL_HANDLEW_bind
(
SVCCTL_HANDLEW
MachineName
)
{
return
rpc_wstr_bind
((
RPC_WSTR
)
MachineName
);
}
DECLSPEC_HIDDEN
void
__RPC_USER
SVCCTL_HANDLEW_unbind
(
SVCCTL_HANDLEW
MachineName
,
handle_t
h
)
{
RpcBindingFree
(
&
h
);
}
static
LONG
WINAPI
rpc_filter
(
EXCEPTION_POINTERS
*
eptr
)
{
return
I_RpcExceptionFilter
(
eptr
->
ExceptionRecord
->
ExceptionCode
);
...
...
@@ -1387,7 +1438,7 @@ QueryServiceConfigW( SC_HANDLE hService,
__TRY
{
err
=
svcctl_QueryServiceConfigW
(
hService
,
&
config
);
err
=
svcctl_QueryServiceConfigW
(
hService
,
&
config
,
cbBufSize
,
pcbBytesNeeded
);
}
__EXCEPT
(
rpc_filter
)
{
...
...
@@ -1745,9 +1796,6 @@ EnumServicesStatusExW( SC_HANDLE hmngr, SC_ENUM_TYPE level, DWORD type, DWORD st
TRACE
(
"%p %u 0x%x 0x%x %p %u %p %p %p %s
\n
"
,
hmngr
,
level
,
type
,
state
,
buffer
,
size
,
needed
,
returned
,
resume_handle
,
debugstr_w
(
group
));
if
(
resume_handle
)
FIXME
(
"resume handle not supported
\n
"
);
if
(
level
!=
SC_ENUM_PROCESS_INFO
)
{
SetLastError
(
ERROR_INVALID_LEVEL
);
...
...
@@ -1768,8 +1816,8 @@ EnumServicesStatusExW( SC_HANDLE hmngr, SC_ENUM_TYPE level, DWORD type, DWORD st
__TRY
{
err
=
svcctl_EnumServicesStatusExW
(
hmngr
,
type
,
state
,
buffer
,
size
,
needed
,
returned
,
group
);
err
=
svcctl_EnumServicesStatusExW
(
hmngr
,
SC_ENUM_PROCESS_INFO
,
type
,
state
,
buffer
,
size
,
needed
,
returned
,
resume_handle
,
group
);
}
__EXCEPT
(
rpc_filter
)
{
...
...
include/wine/svcctl.idl
View file @
0f80d4b6
This diff is collapsed.
Click to expand it.
programs/services/rpc.c
View file @
0f80d4b6
This diff is collapsed.
Click to expand it.
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