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
cd6ee00c
Commit
cd6ee00c
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 .HW subsection in SetupDiInstallDevice().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d4c18c89
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
devinst.c
dlls/setupapi/devinst.c
+19
-2
No files found.
dlls/setupapi/devinst.c
View file @
cd6ee00c
...
...
@@ -4687,12 +4687,13 @@ BOOL WINAPI SetupDiInstallDevice(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data)
static
const
WCHAR
infpathW
[]
=
{
'I'
,
'n'
,
'f'
,
'P'
,
'a'
,
't'
,
'h'
,
0
};
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
};
WCHAR
section
[
LINE_LEN
],
section_ext
[
LINE_LEN
],
inf_path
[
MAX_PATH
],
*
extptr
,
*
filepart
;
static
const
WCHAR
dothwW
[]
=
{
'.'
,
'H'
,
'W'
,
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
;
struct
device
*
device
;
struct
driver
*
driver
;
void
*
callback_ctx
;
HKEY
driver_key
;
INFCONTEXT
ctx
;
HINF
hinf
;
LONG
l
;
...
...
@@ -4723,6 +4724,15 @@ BOOL WINAPI SetupDiInstallDevice(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data)
return
FALSE
;
}
if
((
l
=
RegCreateKeyExW
(
device
->
key
,
DeviceParameters
,
0
,
NULL
,
0
,
KEY_READ
|
KEY_WRITE
,
NULL
,
&
device_key
,
NULL
)))
{
SetLastError
(
l
);
RegCloseKey
(
driver_key
);
SetupCloseInfFile
(
hinf
);
return
FALSE
;
}
if
(
device
->
params
.
Flags
&
DI_NOFILECOPY
)
install_flags
&=
~
SPINST_FILES
;
...
...
@@ -4731,6 +4741,12 @@ BOOL WINAPI SetupDiInstallDevice(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data)
SetupInstallFromInfSectionW
(
NULL
,
hinf
,
section_ext
,
install_flags
,
driver_key
,
NULL
,
SP_COPY_NEWER_ONLY
,
SetupDefaultQueueCallbackW
,
callback_ctx
,
NULL
,
NULL
);
strcpyW
(
subsection
,
section_ext
);
strcatW
(
subsection
,
dothwW
);
SetupInstallFromInfSectionW
(
NULL
,
hinf
,
subsection
,
install_flags
,
device_key
,
NULL
,
SP_COPY_NEWER_ONLY
,
SetupDefaultQueueCallbackW
,
callback_ctx
,
NULL
,
NULL
);
SetupTermDefaultQueueCallback
(
callback_ctx
);
SetupCloseInfFile
(
hinf
);
...
...
@@ -4742,6 +4758,7 @@ BOOL WINAPI SetupDiInstallDevice(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data)
if
(
extptr
)
RegSetValueExW
(
driver_key
,
infsectionextW
,
0
,
REG_SZ
,
(
BYTE
*
)
extptr
,
strlenW
(
extptr
)
*
sizeof
(
WCHAR
));
RegCloseKey
(
device_key
);
RegCloseKey
(
driver_key
);
return
TRUE
;
}
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