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
f801ac97
Commit
f801ac97
authored
Nov 16, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Nov 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl: Set SPDRP_CONFIGFLAGS in install_device_driver().
parent
b682102d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
pnp.c
dlls/ntoskrnl.exe/pnp.c
+9
-0
ntoskrnl.c
dlls/ntoskrnl.exe/tests/ntoskrnl.c
+3
-6
No files found.
dlls/ntoskrnl.exe/pnp.c
View file @
f801ac97
...
...
@@ -256,6 +256,7 @@ static BOOL install_device_driver( DEVICE_OBJECT *device, HDEVINFO set, SP_DEVIN
DIF_INSTALLDEVICE
,
DIF_NEWDEVICEWIZARD_FINISHINSTALL
,
};
static
const
DWORD
config_flags
=
0
;
NTSTATUS
status
;
unsigned
int
i
;
...
...
@@ -281,6 +282,14 @@ static BOOL install_device_driver( DEVICE_OBJECT *device, HDEVINFO set, SP_DEVIN
sizeof_multiszW
(
ids
)
*
sizeof
(
WCHAR
)
);
ExFreePool
(
ids
);
/* Set the config flags. setupapi won't do this for us if we couldn't find
* a driver to install, but raw devices should still have this key
* populated. */
if
(
!
SetupDiSetDeviceRegistryPropertyW
(
set
,
sp_device
,
SPDRP_CONFIGFLAGS
,
(
BYTE
*
)
&
config_flags
,
sizeof
(
config_flags
)
))
ERR
(
"Failed to set config flags, error %#lx.
\n
"
,
GetLastError
());
if
(
!
SetupDiBuildDriverInfoList
(
set
,
sp_device
,
SPDIT_COMPATDRIVER
))
{
ERR
(
"Failed to build compatible driver list, error %#lx.
\n
"
,
GetLastError
());
...
...
dlls/ntoskrnl.exe/tests/ntoskrnl.c
View file @
f801ac97
...
...
@@ -1633,12 +1633,9 @@ static void test_pnp_devices(void)
ret
=
SetupDiGetDeviceRegistryPropertyA
(
set
,
&
device
,
SPDRP_CONFIGFLAGS
,
&
type
,
(
BYTE
*
)
&
dword
,
sizeof
(
dword
),
NULL
);
todo_wine
ok
(
ret
,
"got error %#lx
\n
"
,
GetLastError
());
if
(
ret
)
{
ok
(
!
dword
,
"got flags %#lx
\n
"
,
dword
);
ok
(
type
==
REG_DWORD
,
"got type %lu
\n
"
,
type
);
}
ok
(
ret
,
"got error %#lx
\n
"
,
GetLastError
());
ok
(
!
dword
,
"got flags %#lx
\n
"
,
dword
);
ok
(
type
==
REG_DWORD
,
"got type %lu
\n
"
,
type
);
ret
=
SetupDiGetDeviceRegistryPropertyA
(
set
,
&
device
,
SPDRP_DEVTYPE
,
&
type
,
(
BYTE
*
)
&
dword
,
sizeof
(
dword
),
NULL
);
...
...
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