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
f6291664
Commit
f6291664
authored
Nov 03, 2020
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
svchost: Inline a simple string.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7ceb23ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
svchost.c
programs/svchost/svchost.c
+3
-5
No files found.
programs/svchost/svchost.c
View file @
f6291664
...
...
@@ -37,8 +37,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(svchost);
static
const
WCHAR
service_reg_path
[]
=
L"System
\\
CurrentControlSet
\\
Services"
;
static
const
WCHAR
svchost_path
[]
=
L"Software
\\
Microsoft
\\
Windows NT
\\
CurrentVersion
\\
Svchost"
;
static
const
CHAR
service_main
[]
=
"ServiceMain"
;
/* Allocate and initialize a WSTR containing the queried value */
static
LPWSTR
GetRegValue
(
HKEY
service_key
,
const
WCHAR
*
value_name
)
{
...
...
@@ -162,14 +160,14 @@ static BOOL AddServiceElem(LPWSTR service_name,
}
/* Look for alternate to default ServiceMain entry point */
ret
=
RegQueryValueExA
(
service_hkey
,
service_main
,
NULL
,
NULL
,
NULL
,
&
reg_size
);
ret
=
RegQueryValueExA
(
service_hkey
,
"ServiceMain"
,
NULL
,
NULL
,
NULL
,
&
reg_size
);
if
(
ret
==
ERROR_SUCCESS
)
{
/* Add space for potentially missing NULL terminator, allocate, and
* fill with the registry value */
size
=
reg_size
+
1
;
dll_service_main
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
ret
=
RegQueryValueExA
(
service_hkey
,
service_main
,
NULL
,
NULL
,
ret
=
RegQueryValueExA
(
service_hkey
,
"ServiceMain"
,
NULL
,
NULL
,
(
LPBYTE
)
dll_service_main
,
&
reg_size
);
if
(
ret
!=
ERROR_SUCCESS
)
{
...
...
@@ -196,7 +194,7 @@ static BOOL AddServiceElem(LPWSTR service_name,
else
{
service_main_func
=
(
LPSERVICE_MAIN_FUNCTIONW
)
GetProcAddress
(
library
,
service_main
);
(
LPSERVICE_MAIN_FUNCTIONW
)
GetProcAddress
(
library
,
"ServiceMain"
);
}
if
(
!
service_main_func
)
{
...
...
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