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
288a6625
Commit
288a6625
authored
Nov 18, 2019
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Nov 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Set device SPDRP_CLASS registry property in create_device().
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
014f6153
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
devinst.c
dlls/setupapi/devinst.c
+9
-1
devinst.c
dlls/setupapi/tests/devinst.c
+4
-4
No files found.
dlls/setupapi/devinst.c
View file @
288a6625
...
...
@@ -751,7 +751,9 @@ static struct device *create_device(struct DeviceInfoSet *set,
{
const
DWORD
one
=
1
;
struct
device
*
device
;
WCHAR
guidstr
[
39
];
WCHAR
guidstr
[
MAX_GUID_STRING_LEN
];
WCHAR
class_name
[
MAX_CLASS_NAME_LEN
];
DWORD
size
;
TRACE
(
"%p, %s, %s, %d
\n
"
,
set
,
debugstr_guid
(
class
),
debugstr_w
(
instanceid
),
phantom
);
...
...
@@ -796,6 +798,12 @@ static struct device *create_device(struct DeviceInfoSet *set,
SETUPDI_SetDeviceRegistryPropertyW
(
device
,
SPDRP_CLASSGUID
,
(
const
BYTE
*
)
guidstr
,
sizeof
(
guidstr
));
if
(
SetupDiClassNameFromGuidW
(
class
,
class_name
,
ARRAY_SIZE
(
class_name
),
NULL
))
{
size
=
(
lstrlenW
(
class_name
)
+
1
)
*
sizeof
(
WCHAR
);
SETUPDI_SetDeviceRegistryPropertyW
(
device
,
SPDRP_CLASS
,
(
const
BYTE
*
)
class_name
,
size
);
}
TRACE
(
"Created new device %p.
\n
"
,
device
);
return
device
;
}
...
...
dlls/setupapi/tests/devinst.c
View file @
288a6625
...
...
@@ -1643,8 +1643,8 @@ todo_wine {
/* Have SPDRP_CLASS property */
memset
(
buf
,
0
,
sizeof
(
buf
));
ret
=
SetupDiGetDeviceRegistryPropertyA
(
set
,
&
device
,
SPDRP_CLASS
,
NULL
,
(
BYTE
*
)
buf
,
sizeof
(
buf
),
NULL
);
todo_wine
ok
(
ret
,
"Failed to get property, error %#x.
\n
"
,
GetLastError
());
todo_wine
ok
(
!
lstrcmpA
(
buf
,
"Display"
),
"Got unexpected value %s.
\n
"
,
buf
);
ok
(
ret
,
"Failed to get property, error %#x.
\n
"
,
GetLastError
());
ok
(
!
lstrcmpA
(
buf
,
"Display"
),
"Got unexpected value %s.
\n
"
,
buf
);
SetupDiDestroyDeviceInfoList
(
set
);
}
...
...
@@ -1803,8 +1803,8 @@ todo_wine {
/* Have SPDRP_CLASS property */
memset
(
buf
,
0
,
sizeof
(
buf
));
ret
=
SetupDiGetDeviceRegistryPropertyW
(
set
,
&
device
,
SPDRP_CLASS
,
NULL
,
(
BYTE
*
)
buf
,
sizeof
(
buf
),
NULL
);
todo_wine
ok
(
ret
,
"Failed to get property, error %#x.
\n
"
,
GetLastError
());
todo_wine
ok
(
!
lstrcmpW
(
buf
,
L"Display"
),
"Got unexpected value %s.
\n
"
,
wine_dbgstr_w
(
buf
));
ok
(
ret
,
"Failed to get property, error %#x.
\n
"
,
GetLastError
());
ok
(
!
lstrcmpW
(
buf
,
L"Display"
),
"Got unexpected value %s.
\n
"
,
wine_dbgstr_w
(
buf
));
SetupDiDestroyDeviceInfoList
(
set
);
}
...
...
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