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
64c09819
Commit
64c09819
authored
Mar 15, 2019
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Mar 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Set phantom value after device creation.
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
35673c7e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
devinst.c
dlls/setupapi/devinst.c
+4
-0
devinst.c
dlls/setupapi/tests/devinst.c
+3
-3
No files found.
dlls/setupapi/devinst.c
View file @
64c09819
...
...
@@ -723,6 +723,7 @@ static void delete_device(struct device *device)
static
struct
device
*
SETUPDI_CreateDeviceInfo
(
struct
DeviceInfoSet
*
set
,
const
GUID
*
class
,
const
WCHAR
*
instanceid
,
BOOL
phantom
)
{
const
DWORD
one
=
1
;
struct
device
*
device
;
WCHAR
guidstr
[
39
];
...
...
@@ -752,6 +753,9 @@ static struct device *SETUPDI_CreateDeviceInfo(struct DeviceInfoSet *set,
device
->
removed
=
FALSE
;
list_add_tail
(
&
set
->
devices
,
&
device
->
entry
);
if
(
phantom
)
RegSetValueExW
(
device
->
key
,
Phantom
,
0
,
REG_DWORD
,
(
const
BYTE
*
)
&
one
,
sizeof
(
one
));
SETUPDI_GuidToString
(
class
,
guidstr
);
SETUPDI_SetDeviceRegistryPropertyW
(
device
,
SPDRP_CLASSGUID
,
(
const
BYTE
*
)
guidstr
,
sizeof
(
guidstr
));
...
...
dlls/setupapi/tests/devinst.c
View file @
64c09819
...
...
@@ -778,9 +778,9 @@ static void test_register_device_info(void)
RegOpenKeyA
(
HKEY_LOCAL_MACHINE
,
"SYSTEM
\\
CurrentControlSet
\\
Enum
\\
ROOT
\\
LEGACY_BOGUS
\\
0000"
,
&
hkey
);
size
=
sizeof
(
phantom
);
ls
=
RegQueryValueExA
(
hkey
,
"Phantom"
,
NULL
,
&
type
,
(
BYTE
*
)
&
phantom
,
&
size
);
todo_wine
ok
(
ls
==
ERROR_SUCCESS
,
"Got wrong error code %#x
\n
"
,
ls
);
todo_wine
ok
(
phantom
==
1
,
"Got wrong phantom value %d
\n
"
,
phantom
);
todo_wine
ok
(
type
==
REG_DWORD
,
"Got wrong phantom type %#x
\n
"
,
type
);
ok
(
ls
==
ERROR_SUCCESS
,
"Got wrong error code %#x
\n
"
,
ls
);
ok
(
phantom
==
1
,
"Got wrong phantom value %d
\n
"
,
phantom
);
ok
(
type
==
REG_DWORD
,
"Got wrong phantom type %#x
\n
"
,
type
);
ok
(
size
==
sizeof
(
phantom
),
"Got wrong phantom size %d
\n
"
,
size
);
ret
=
SetupDiRegisterDeviceInfo
(
set
,
&
device
,
0
,
NULL
,
NULL
,
NULL
);
ok
(
ret
,
"Failed to register device, error %#x.
\n
"
,
GetLastError
());
...
...
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