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
ba84b647
Commit
ba84b647
authored
Jan 11, 2016
by
Aric Stewart
Committed by
Alexandre Julliard
Jan 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hidclass.sys: Implement HID_Device_write.
Signed-off-by:
Aric Stewart
<
aric@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
46b913df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
device.c
dlls/hidclass.sys/device.c
+17
-4
No files found.
dlls/hidclass.sys/device.c
View file @
ba84b647
...
...
@@ -607,16 +607,29 @@ NTSTATUS WINAPI HID_Device_read(DEVICE_OBJECT *device, IRP *irp)
NTSTATUS
WINAPI
HID_Device_write
(
DEVICE_OBJECT
*
device
,
IRP
*
irp
)
{
IO_STACK_LOCATION
*
irpsp
=
IoGetCurrentIrpStackLocation
(
irp
);
HID_XFER_PACKET
packet
;
NTSTATUS
rc
;
irp
->
IoStatus
.
Information
=
0
;
TRACE
(
"Buffer length %i
\n
"
,
irpsp
->
Parameters
.
Write
.
Length
);
TRACE_
(
hid_report
)(
"Device %p Buffer length %i Buffer %p
\n
"
,
device
,
irpsp
->
Parameters
.
Write
.
Length
,
irp
->
AssociatedIrp
.
SystemBuffer
);
packet
.
reportBuffer
=
irp
->
AssociatedIrp
.
SystemBuffer
;
packet
.
reportId
=
((
char
*
)
irp
->
AssociatedIrp
.
SystemBuffer
)[
0
];
packet
.
reportBufferLen
=
irpsp
->
Parameters
.
Write
.
Length
;
TRACE_
(
hid_report
)(
"(id %i, len %i buffer %p)
\n
"
,
packet
.
reportId
,
packet
.
reportBufferLen
,
packet
.
reportBuffer
);
FIXME
(
"device %p
\n
"
,
device
);
rc
=
call_minidriver
(
IOCTL_HID_WRITE_REPORT
,
device
,
NULL
,
0
,
&
packet
,
sizeof
(
packet
));
irp
->
IoStatus
.
u
.
Status
=
rc
;
if
(
irp
->
IoStatus
.
u
.
Status
==
STATUS_SUCCESS
)
irp
->
IoStatus
.
Information
=
irpsp
->
Parameters
.
Write
.
Length
;
else
irp
->
IoStatus
.
Information
=
0
;
TRACE_
(
hid_report
)(
"Result 0x%x wrote %li bytes
\n
"
,
rc
,
irp
->
IoStatus
.
Information
);
irp
->
IoStatus
.
u
.
Status
=
STATUS_SUCCESS
;
IoCompleteRequest
(
irp
,
IO_NO_INCREMENT
);
return
STATUS_SUCCESS
;
return
rc
;
}
NTSTATUS
WINAPI
HID_Device_create
(
DEVICE_OBJECT
*
device
,
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