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
b2adecd5
Commit
b2adecd5
authored
May 24, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
May 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Process the .Services subsection in SetupDiInstallDevice().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cd6ee00c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
devinst.c
dlls/setupapi/devinst.c
+22
-0
No files found.
dlls/setupapi/devinst.c
View file @
b2adecd5
...
...
@@ -4688,6 +4688,8 @@ BOOL WINAPI SetupDiInstallDevice(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data)
static
const
WCHAR
infsectionW
[]
=
{
'I'
,
'n'
,
'f'
,
'S'
,
'e'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
infsectionextW
[]
=
{
'I'
,
'n'
,
'f'
,
'S'
,
'e'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
'E'
,
'x'
,
't'
,
0
};
static
const
WCHAR
dothwW
[]
=
{
'.'
,
'H'
,
'W'
,
0
};
static
const
WCHAR
dotservicesW
[]
=
{
'.'
,
'S'
,
'e'
,
'r'
,
'v'
,
'i'
,
'c'
,
'e'
,
's'
,
0
};
static
const
WCHAR
addserviceW
[]
=
{
'A'
,
'd'
,
'd'
,
'S'
,
'e'
,
'r'
,
'v'
,
'i'
,
'c'
,
'e'
,
0
};
WCHAR
section
[
LINE_LEN
],
section_ext
[
LINE_LEN
],
subsection
[
LINE_LEN
],
inf_path
[
MAX_PATH
],
*
extptr
,
*
filepart
;
UINT
install_flags
=
SPINST_ALL
;
HKEY
driver_key
,
device_key
;
...
...
@@ -4747,6 +4749,26 @@ BOOL WINAPI SetupDiInstallDevice(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data)
SetupInstallFromInfSectionW
(
NULL
,
hinf
,
subsection
,
install_flags
,
device_key
,
NULL
,
SP_COPY_NEWER_ONLY
,
SetupDefaultQueueCallbackW
,
callback_ctx
,
NULL
,
NULL
);
strcpyW
(
subsection
,
section_ext
);
strcatW
(
subsection
,
dotservicesW
);
SetupInstallServicesFromInfSectionW
(
hinf
,
subsection
,
0
);
if
(
SetupFindFirstLineW
(
hinf
,
subsection
,
addserviceW
,
&
ctx
))
{
do
{
INT
flags
;
if
(
SetupGetIntField
(
&
ctx
,
2
,
&
flags
)
&&
(
flags
&
SPSVCINST_ASSOCSERVICE
))
{
WCHAR
svc_name
[
LINE_LEN
];
if
(
SetupGetStringFieldW
(
&
ctx
,
1
,
svc_name
,
ARRAY_SIZE
(
svc_name
),
NULL
)
&&
svc_name
[
0
])
RegSetValueExW
(
device
->
key
,
Service
,
0
,
REG_SZ
,
(
BYTE
*
)
svc_name
,
strlenW
(
svc_name
)
*
sizeof
(
WCHAR
));
break
;
}
}
while
(
SetupFindNextMatchLineW
(
&
ctx
,
addserviceW
,
&
ctx
));
}
SetupTermDefaultQueueCallback
(
callback_ctx
);
SetupCloseInfFile
(
hinf
);
...
...
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