Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
bfb7fe4b
Commit
bfb7fe4b
authored
Jul 12, 2022
by
Claire Girka
Committed by
Alexandre Julliard
Jul 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hidclass: Expose ContainerID from underlying driver.
parent
8ed6b160
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
hid.h
dlls/hidclass.sys/hid.h
+1
-0
pnp.c
dlls/hidclass.sys/pnp.c
+16
-1
No files found.
dlls/hidclass.sys/hid.h
View file @
bfb7fe4b
...
@@ -81,6 +81,7 @@ typedef struct _BASE_DEVICE_EXTENSION
...
@@ -81,6 +81,7 @@ typedef struct _BASE_DEVICE_EXTENSION
* for convenience. */
* for convenience. */
WCHAR
device_id
[
MAX_DEVICE_ID_LEN
];
WCHAR
device_id
[
MAX_DEVICE_ID_LEN
];
WCHAR
instance_id
[
MAX_DEVICE_ID_LEN
];
WCHAR
instance_id
[
MAX_DEVICE_ID_LEN
];
WCHAR
container_id
[
MAX_GUID_STRING_LEN
];
const
GUID
*
class_guid
;
const
GUID
*
class_guid
;
BOOL
is_fdo
;
BOOL
is_fdo
;
...
...
dlls/hidclass.sys/pnp.c
View file @
bfb7fe4b
...
@@ -173,6 +173,9 @@ static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *b
...
@@ -173,6 +173,9 @@ static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *b
swprintf
(
ext
->
device_id
,
ARRAY_SIZE
(
ext
->
device_id
),
L"HID
\\
%s"
,
wcsrchr
(
device_id
,
'\\'
)
+
1
);
swprintf
(
ext
->
device_id
,
ARRAY_SIZE
(
ext
->
device_id
),
L"HID
\\
%s"
,
wcsrchr
(
device_id
,
'\\'
)
+
1
);
wcscpy
(
ext
->
instance_id
,
instance_id
);
wcscpy
(
ext
->
instance_id
,
instance_id
);
if
(
get_device_id
(
bus_pdo
,
BusQueryContainerID
,
ext
->
container_id
))
ext
->
container_id
[
0
]
=
0
;
is_xinput_class
=
!
wcsncmp
(
device_id
,
L"WINEXINPUT
\\
"
,
7
)
&&
wcsstr
(
device_id
,
L"&XI_"
)
!=
NULL
;
is_xinput_class
=
!
wcsncmp
(
device_id
,
L"WINEXINPUT
\\
"
,
7
)
&&
wcsstr
(
device_id
,
L"&XI_"
)
!=
NULL
;
if
(
is_xinput_class
)
ext
->
class_guid
=
&
GUID_DEVINTERFACE_WINEXINPUT
;
if
(
is_xinput_class
)
ext
->
class_guid
=
&
GUID_DEVINTERFACE_WINEXINPUT
;
else
ext
->
class_guid
=
&
GUID_DEVINTERFACE_HID
;
else
ext
->
class_guid
=
&
GUID_DEVINTERFACE_HID
;
...
@@ -229,6 +232,7 @@ static void create_child(minidriver *minidriver, DEVICE_OBJECT *fdo)
...
@@ -229,6 +232,7 @@ static void create_child(minidriver *minidriver, DEVICE_OBJECT *fdo)
KeInitializeSpinLock
(
&
pdo_ext
->
u
.
pdo
.
queues_lock
);
KeInitializeSpinLock
(
&
pdo_ext
->
u
.
pdo
.
queues_lock
);
wcscpy
(
pdo_ext
->
device_id
,
fdo_ext
->
device_id
);
wcscpy
(
pdo_ext
->
device_id
,
fdo_ext
->
device_id
);
wcscpy
(
pdo_ext
->
instance_id
,
fdo_ext
->
instance_id
);
wcscpy
(
pdo_ext
->
instance_id
,
fdo_ext
->
instance_id
);
wcscpy
(
pdo_ext
->
container_id
,
fdo_ext
->
container_id
);
pdo_ext
->
class_guid
=
fdo_ext
->
class_guid
;
pdo_ext
->
class_guid
=
fdo_ext
->
class_guid
;
pdo_ext
->
u
.
pdo
.
information
.
VendorID
=
attr
.
VendorID
;
pdo_ext
->
u
.
pdo
.
information
.
VendorID
=
attr
.
VendorID
;
...
@@ -416,8 +420,19 @@ static NTSTATUS pdo_pnp(DEVICE_OBJECT *device, IRP *irp)
...
@@ -416,8 +420,19 @@ static NTSTATUS pdo_pnp(DEVICE_OBJECT *device, IRP *irp)
irp
->
IoStatus
.
Information
=
(
ULONG_PTR
)
id
;
irp
->
IoStatus
.
Information
=
(
ULONG_PTR
)
id
;
status
=
STATUS_SUCCESS
;
status
=
STATUS_SUCCESS
;
break
;
break
;
case
BusQueryContainerID
:
case
BusQueryContainerID
:
if
(
ext
->
container_id
[
0
])
{
lstrcpyW
(
id
,
ext
->
container_id
);
irp
->
IoStatus
.
Information
=
(
ULONG_PTR
)
id
;
status
=
STATUS_SUCCESS
;
}
else
{
ExFreePool
(
id
);
}
break
;
case
BusQueryDeviceSerialNumber
:
case
BusQueryDeviceSerialNumber
:
FIXME
(
"unimplemented id type %#x
\n
"
,
irpsp
->
Parameters
.
QueryId
.
IdType
);
FIXME
(
"unimplemented id type %#x
\n
"
,
irpsp
->
Parameters
.
QueryId
.
IdType
);
ExFreePool
(
id
);
ExFreePool
(
id
);
...
...
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