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
01315d52
Commit
01315d52
authored
Apr 16, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineusb.sys: Implement hardware IDs.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a66d44b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
wineusb.c
dlls/wineusb.sys/wineusb.c
+18
-0
No files found.
dlls/wineusb.sys/wineusb.c
View file @
01315d52
...
@@ -288,6 +288,19 @@ static void get_device_id(const struct usb_device *device, WCHAR *buffer)
...
@@ -288,6 +288,19 @@ static void get_device_id(const struct usb_device *device, WCHAR *buffer)
sprintfW
(
buffer
,
formatW
,
desc
.
idVendor
,
desc
.
idProduct
);
sprintfW
(
buffer
,
formatW
,
desc
.
idVendor
,
desc
.
idProduct
);
}
}
static
void
get_hardware_ids
(
const
struct
usb_device
*
device
,
WCHAR
*
buffer
)
{
static
const
WCHAR
formatW
[]
=
{
'U'
,
'S'
,
'B'
,
'\\'
,
'V'
,
'I'
,
'D'
,
'_'
,
'%'
,
'0'
,
'4'
,
'X'
,
'&'
,
'P'
,
'I'
,
'D'
,
'_'
,
'%'
,
'0'
,
'4'
,
'X'
,
'&'
,
'R'
,
'E'
,
'V'
,
'_'
,
'%'
,
'0'
,
'4'
,
'X'
,
0
};
struct
libusb_device_descriptor
desc
;
libusb_get_device_descriptor
(
device
->
libusb_device
,
&
desc
);
buffer
+=
sprintfW
(
buffer
,
formatW
,
desc
.
idVendor
,
desc
.
idProduct
,
desc
.
bcdDevice
)
+
1
;
get_device_id
(
device
,
buffer
);
buffer
+=
strlenW
(
buffer
)
+
1
;
*
buffer
=
0
;
}
static
NTSTATUS
query_id
(
const
struct
usb_device
*
device
,
IRP
*
irp
,
BUS_QUERY_ID_TYPE
type
)
static
NTSTATUS
query_id
(
const
struct
usb_device
*
device
,
IRP
*
irp
,
BUS_QUERY_ID_TYPE
type
)
{
{
WCHAR
*
id
=
NULL
;
WCHAR
*
id
=
NULL
;
...
@@ -307,6 +320,11 @@ static NTSTATUS query_id(const struct usb_device *device, IRP *irp, BUS_QUERY_ID
...
@@ -307,6 +320,11 @@ static NTSTATUS query_id(const struct usb_device *device, IRP *irp, BUS_QUERY_ID
}
}
break
;
break
;
case
BusQueryHardwareIDs
:
if
((
id
=
ExAllocatePool
(
PagedPool
,
(
28
+
37
+
1
)
*
sizeof
(
WCHAR
))))
get_hardware_ids
(
device
,
id
);
break
;
default:
default:
FIXME
(
"Unhandled ID query type %#x.
\n
"
,
type
);
FIXME
(
"Unhandled ID query type %#x.
\n
"
,
type
);
return
irp
->
IoStatus
.
Status
;
return
irp
->
IoStatus
.
Status
;
...
...
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