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
db3e5922
Commit
db3e5922
authored
Oct 05, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hidclass.sys: Pass output buffer directly in handle_minidriver_string.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0fc31aaf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
17 deletions
+6
-17
device.c
dlls/hidclass.sys/device.c
+6
-17
No files found.
dlls/hidclass.sys/device.c
View file @
db3e5922
...
...
@@ -404,25 +404,14 @@ static void handle_IOCTL_HID_GET_COLLECTION_DESCRIPTOR( IRP *irp, BASE_DEVICE_EX
}
}
static
void
handle_minidriver_string
(
BASE_DEVICE_EXTENSION
*
ext
,
IRP
*
irp
,
SHORT
index
)
static
void
handle_minidriver_string
(
BASE_DEVICE_EXTENSION
*
ext
,
IRP
*
irp
,
ULONG
index
)
{
IO_STACK_LOCATION
*
irpsp
=
IoGetCurrentIrpStackLocation
(
irp
);
WCHAR
buffer
[
127
];
ULONG
InputBuffer
;
InputBuffer
=
MAKELONG
(
index
,
0
);
call_minidriver
(
IOCTL_HID_GET_STRING
,
ext
->
u
.
pdo
.
parent_fdo
,
ULongToPtr
(
InputBuffer
),
sizeof
(
InputBuffer
),
buffer
,
sizeof
(
buffer
),
&
irp
->
IoStatus
);
IO_STACK_LOCATION
*
stack
=
IoGetCurrentIrpStackLocation
(
irp
);
WCHAR
*
output_buf
=
MmGetSystemAddressForMdlSafe
(
irp
->
MdlAddress
,
NormalPagePriority
);
ULONG
output_len
=
stack
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
;
if
(
irp
->
IoStatus
.
Status
==
STATUS_SUCCESS
)
{
WCHAR
*
out_buffer
=
MmGetSystemAddressForMdlSafe
(
irp
->
MdlAddress
,
NormalPagePriority
);
int
length
=
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
/
sizeof
(
WCHAR
);
TRACE
(
"got string %s from minidriver
\n
"
,
debugstr_w
(
buffer
));
lstrcpynW
(
out_buffer
,
buffer
,
length
);
irp
->
IoStatus
.
Information
=
(
lstrlenW
(
buffer
)
+
1
)
*
sizeof
(
WCHAR
);
}
call_minidriver
(
IOCTL_HID_GET_STRING
,
ext
->
u
.
pdo
.
parent_fdo
,
ULongToPtr
(
index
),
sizeof
(
index
),
output_buf
,
output_len
,
&
irp
->
IoStatus
);
}
static
void
hid_device_xfer_report
(
BASE_DEVICE_EXTENSION
*
ext
,
ULONG
code
,
IRP
*
irp
)
...
...
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