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
5f2b96b8
Commit
5f2b96b8
authored
Aug 10, 2016
by
Sebastian Lackner
Committed by
Alexandre Julliard
Aug 10, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: Preparation to allow arbitrary data in service RPC messages.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b6a505f9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
svcctl.idl
include/wine/svcctl.idl
+1
-1
rpc.c
programs/services/rpc.c
+2
-2
services.c
programs/services/services.c
+3
-3
No files found.
include/wine/svcctl.idl
View file @
5f2b96b8
...
...
@@ -46,7 +46,7 @@ typedef struct service_start_info_t
DWORD
total_size
; /* total request size */
DWORD
name_size
; /* size of name in data buffer */
DWORD
control
; /* control code */
WCHAR
data
[
1
]
;
BYTE
data
[
1
]
;
}
service_start_info
;
[
...
...
programs/services/rpc.c
View file @
5f2b96b8
...
...
@@ -1046,14 +1046,14 @@ static BOOL process_send_control(struct process_entry *process, const WCHAR *nam
BOOL
r
;
/* calculate how much space we need to send the startup info */
len
=
strlenW
(
name
)
+
1
;
len
=
(
strlenW
(
name
)
+
1
)
*
sizeof
(
WCHAR
)
;
ssi
=
HeapAlloc
(
GetProcessHeap
(),
0
,
FIELD_OFFSET
(
service_start_info
,
data
[
len
]));
ssi
->
cmd
=
WINESERV_SENDCONTROL
;
ssi
->
control
=
dwControl
;
ssi
->
total_size
=
FIELD_OFFSET
(
service_start_info
,
data
[
len
]);
ssi
->
name_size
=
strlenW
(
name
)
+
1
;
strcpyW
(
ssi
->
data
,
name
);
strcpyW
(
(
WCHAR
*
)
ssi
->
data
,
name
);
r
=
process_send_command
(
process
,
ssi
,
ssi
->
total_size
,
result
);
HeapFree
(
GetProcessHeap
(),
0
,
ssi
);
...
...
programs/services/services.c
View file @
5f2b96b8
...
...
@@ -861,17 +861,17 @@ static BOOL process_send_start_message(struct process_entry *process, const WCHA
len
=
strlenW
(
name
)
+
1
;
for
(
i
=
0
;
i
<
argc
;
i
++
)
len
+=
strlenW
(
argv
[
i
])
+
1
;
len
++
;
len
=
(
len
+
1
)
*
sizeof
(
WCHAR
)
;
ssi
=
HeapAlloc
(
GetProcessHeap
(),
0
,
FIELD_OFFSET
(
service_start_info
,
data
[
len
]));
ssi
->
cmd
=
WINESERV_STARTINFO
;
ssi
->
control
=
0
;
ssi
->
total_size
=
FIELD_OFFSET
(
service_start_info
,
data
[
len
]);
ssi
->
name_size
=
strlenW
(
name
)
+
1
;
strcpyW
(
ssi
->
data
,
name
);
strcpyW
(
(
WCHAR
*
)
ssi
->
data
,
name
);
/* copy service args into a single buffer*/
p
=
&
ssi
->
data
[
ssi
->
name_size
];
p
=
(
WCHAR
*
)
&
ssi
->
data
[
ssi
->
name_size
*
sizeof
(
WCHAR
)
];
for
(
i
=
0
;
i
<
argc
;
i
++
)
{
strcpyW
(
p
,
argv
[
i
]);
...
...
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