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
6e7ca583
Commit
6e7ca583
authored
Aug 18, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Aug 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebus.sys: Pass HID_XFER_PACKET and IO_STATUS_BLOCK to callbacks.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ee5cde83
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
114 additions
and
107 deletions
+114
-107
bus.h
dlls/winebus.sys/bus.h
+4
-3
bus_iohid.c
dlls/winebus.sys/bus_iohid.c
+22
-19
bus_sdl.c
dlls/winebus.sys/bus_sdl.c
+15
-14
bus_udev.c
dlls/winebus.sys/bus_udev.c
+46
-43
main.c
dlls/winebus.sys/main.c
+27
-28
No files found.
dlls/winebus.sys/bus.h
View file @
6e7ca583
...
...
@@ -22,6 +22,7 @@
#include <winbase.h>
#include <winternl.h>
#include <ddk/wdm.h>
#include <ddk/hidclass.h>
#include <hidusage.h>
typedef
int
(
*
enum_func
)(
DEVICE_OBJECT
*
device
,
void
*
context
);
...
...
@@ -42,9 +43,9 @@ typedef struct
NTSTATUS
(
*
start_device
)(
DEVICE_OBJECT
*
device
);
NTSTATUS
(
*
get_reportdescriptor
)(
DEVICE_OBJECT
*
device
,
BYTE
*
buffer
,
DWORD
length
,
DWORD
*
out_length
);
NTSTATUS
(
*
get_string
)(
DEVICE_OBJECT
*
device
,
DWORD
index
,
WCHAR
*
buffer
,
DWORD
length
);
NTSTATUS
(
*
set_output_report
)(
DEVICE_OBJECT
*
device
,
UCHAR
id
,
BYTE
*
report
,
DWORD
length
,
ULONG_PTR
*
written
);
NTSTATUS
(
*
get_feature_report
)(
DEVICE_OBJECT
*
device
,
UCHAR
id
,
BYTE
*
report
,
DWORD
length
,
ULONG_PTR
*
read
);
NTSTATUS
(
*
set_feature_report
)(
DEVICE_OBJECT
*
device
,
UCHAR
id
,
BYTE
*
report
,
DWORD
length
,
ULONG_PTR
*
written
);
void
(
*
set_output_report
)(
DEVICE_OBJECT
*
device
,
HID_XFER_PACKET
*
packet
,
IO_STATUS_BLOCK
*
io
);
void
(
*
get_feature_report
)(
DEVICE_OBJECT
*
device
,
HID_XFER_PACKET
*
packet
,
IO_STATUS_BLOCK
*
io
);
void
(
*
set_feature_report
)(
DEVICE_OBJECT
*
device
,
HID_XFER_PACKET
*
packet
,
IO_STATUS_BLOCK
*
io
);
}
platform_vtbl
;
void
*
get_platform_private
(
DEVICE_OBJECT
*
device
)
DECLSPEC_HIDDEN
;
...
...
dlls/winebus.sys/bus_iohid.c
View file @
6e7ca583
...
...
@@ -213,57 +213,60 @@ static NTSTATUS get_string(DEVICE_OBJECT *device, DWORD index, WCHAR *buffer, DW
return
STATUS_SUCCESS
;
}
static
NTSTATUS
set_output_report
(
DEVICE_OBJECT
*
device
,
UCHAR
id
,
BYTE
*
report
,
DWORD
length
,
ULONG_PTR
*
written
)
static
void
set_output_report
(
DEVICE_OBJECT
*
device
,
HID_XFER_PACKET
*
packet
,
IO_STATUS_BLOCK
*
io
)
{
IOReturn
result
;
struct
platform_private
*
private
=
impl_from_DEVICE_OBJECT
(
device
);
result
=
IOHIDDeviceSetReport
(
private
->
device
,
kIOHIDReportTypeOutput
,
id
,
report
,
length
);
result
=
IOHIDDeviceSetReport
(
private
->
device
,
kIOHIDReportTypeOutput
,
packet
->
reportId
,
packet
->
reportBuffer
,
packet
->
reportBufferLen
);
if
(
result
==
kIOReturnSuccess
)
{
*
written
=
length
;
return
STATUS_SUCCESS
;
io
->
Information
=
packet
->
reportBufferLen
;
io
->
Status
=
STATUS_SUCCESS
;
}
else
{
*
writte
n
=
0
;
return
STATUS_UNSUCCESSFUL
;
io
->
Informatio
n
=
0
;
io
->
Status
=
STATUS_UNSUCCESSFUL
;
}
}
static
NTSTATUS
get_feature_report
(
DEVICE_OBJECT
*
device
,
UCHAR
id
,
BYTE
*
report
,
DWORD
length
,
ULONG_PTR
*
read
)
static
void
get_feature_report
(
DEVICE_OBJECT
*
device
,
HID_XFER_PACKET
*
packet
,
IO_STATUS_BLOCK
*
io
)
{
IOReturn
ret
;
CFIndex
report_length
=
length
;
CFIndex
report_length
=
packet
->
reportBufferLen
;
struct
platform_private
*
private
=
impl_from_DEVICE_OBJECT
(
device
);
ret
=
IOHIDDeviceGetReport
(
private
->
device
,
kIOHIDReportTypeFeature
,
id
,
report
,
&
report_length
);
ret
=
IOHIDDeviceGetReport
(
private
->
device
,
kIOHIDReportTypeFeature
,
packet
->
reportId
,
packet
->
reportBuffer
,
&
report_length
);
if
(
ret
==
kIOReturnSuccess
)
{
*
read
=
report_length
;
return
STATUS_SUCCESS
;
io
->
Information
=
report_length
;
io
->
Status
=
STATUS_SUCCESS
;
}
else
{
*
read
=
0
;
return
STATUS_UNSUCCESSFUL
;
io
->
Information
=
0
;
io
->
Status
=
STATUS_UNSUCCESSFUL
;
}
}
static
NTSTATUS
set_feature_report
(
DEVICE_OBJECT
*
device
,
UCHAR
id
,
BYTE
*
report
,
DWORD
length
,
ULONG_PTR
*
written
)
static
void
set_feature_report
(
DEVICE_OBJECT
*
device
,
HID_XFER_PACKET
*
packet
,
IO_STATUS_BLOCK
*
io
)
{
IOReturn
result
;
struct
platform_private
*
private
=
impl_from_DEVICE_OBJECT
(
device
);
result
=
IOHIDDeviceSetReport
(
private
->
device
,
kIOHIDReportTypeFeature
,
id
,
report
,
length
);
result
=
IOHIDDeviceSetReport
(
private
->
device
,
kIOHIDReportTypeFeature
,
packet
->
reportId
,
packet
->
reportBuffer
,
packet
->
reportBufferLen
);
if
(
result
==
kIOReturnSuccess
)
{
*
written
=
length
;
return
STATUS_SUCCESS
;
io
->
Information
=
packet
->
reportBufferLen
;
io
->
Status
=
STATUS_SUCCESS
;
}
else
{
*
writte
n
=
0
;
return
STATUS_UNSUCCESSFUL
;
io
->
Informatio
n
=
0
;
io
->
Status
=
STATUS_UNSUCCESSFUL
;
}
}
...
...
dlls/winebus.sys/bus_sdl.c
View file @
6e7ca583
...
...
@@ -536,14 +536,14 @@ static NTSTATUS get_string(DEVICE_OBJECT *device, DWORD index, WCHAR *buffer, DW
return
STATUS_SUCCESS
;
}
static
NTSTATUS
set_output_report
(
DEVICE_OBJECT
*
device
,
UCHAR
id
,
BYTE
*
report
,
DWORD
length
,
ULONG_PTR
*
written
)
static
void
set_output_report
(
DEVICE_OBJECT
*
device
,
HID_XFER_PACKET
*
packet
,
IO_STATUS_BLOCK
*
io
)
{
struct
platform_private
*
ext
=
impl_from_DEVICE_OBJECT
(
device
);
if
(
ext
->
sdl_haptic
&&
i
d
==
0
)
if
(
ext
->
sdl_haptic
&&
packet
->
reportI
d
==
0
)
{
WORD
left
=
report
[
2
]
*
128
;
WORD
right
=
report
[
3
]
*
128
;
WORD
left
=
packet
->
reportBuffer
[
2
]
*
128
;
WORD
right
=
packet
->
reportBuffer
[
3
]
*
128
;
if
(
ext
->
haptic_effect_id
>=
0
)
{
...
...
@@ -572,26 +572,27 @@ static NTSTATUS set_output_report(DEVICE_OBJECT *device, UCHAR id, BYTE *report,
pSDL_HapticRumblePlay
(
ext
->
sdl_haptic
,
i
,
-
1
);
}
}
*
written
=
length
;
return
STATUS_SUCCESS
;
io
->
Information
=
packet
->
reportBufferLen
;
io
->
Status
=
STATUS_SUCCESS
;
}
else
{
*
writte
n
=
0
;
return
STATUS_NOT_IMPLEMENTED
;
io
->
Informatio
n
=
0
;
io
->
Status
=
STATUS_NOT_IMPLEMENTED
;
}
}
static
NTSTATUS
get_feature_report
(
DEVICE_OBJECT
*
device
,
UCHAR
id
,
BYTE
*
report
,
DWORD
length
,
ULONG_PTR
*
read
)
static
void
get_feature_report
(
DEVICE_OBJECT
*
device
,
HID_XFER_PACKET
*
packet
,
IO_STATUS_BLOCK
*
io
)
{
*
read
=
0
;
return
STATUS_NOT_IMPLEMENTED
;
io
->
Information
=
0
;
io
->
Status
=
STATUS_NOT_IMPLEMENTED
;
}
static
NTSTATUS
set_feature_report
(
DEVICE_OBJECT
*
device
,
UCHAR
id
,
BYTE
*
report
,
DWORD
length
,
ULONG_PTR
*
written
)
static
void
set_feature_report
(
DEVICE_OBJECT
*
device
,
HID_XFER_PACKET
*
packet
,
IO_STATUS_BLOCK
*
io
)
{
*
writte
n
=
0
;
return
STATUS_NOT_IMPLEMENTED
;
io
->
Informatio
n
=
0
;
io
->
Status
=
STATUS_NOT_IMPLEMENTED
;
}
static
const
platform_vtbl
sdl_vtbl
=
...
...
dlls/winebus.sys/bus_udev.c
View file @
6e7ca583
...
...
@@ -716,100 +716,103 @@ static DWORD CALLBACK device_report_thread(void *args)
return
0
;
}
static
NTSTATUS
hidraw_set_output_report
(
DEVICE_OBJECT
*
device
,
UCHAR
id
,
BYTE
*
report
,
DWORD
length
,
ULONG_PTR
*
written
)
static
void
hidraw_set_output_report
(
DEVICE_OBJECT
*
device
,
HID_XFER_PACKET
*
packet
,
IO_STATUS_BLOCK
*
io
)
{
struct
platform_private
*
ext
=
impl_from_DEVICE_OBJECT
(
device
);
ULONG
length
=
packet
->
reportBufferLen
;
BYTE
buffer
[
8192
];
int
count
=
0
;
if
((
buffer
[
0
]
=
i
d
))
count
=
write
(
ext
->
device_fd
,
report
,
length
);
if
((
buffer
[
0
]
=
packet
->
reportI
d
))
count
=
write
(
ext
->
device_fd
,
packet
->
reportBuffer
,
length
);
else
if
(
length
>
sizeof
(
buffer
)
-
1
)
ERR_
(
hid_report
)(
"id %d length %u >= 8192, cannot write
\n
"
,
i
d
,
length
);
ERR_
(
hid_report
)(
"id %d length %u >= 8192, cannot write
\n
"
,
packet
->
reportI
d
,
length
);
else
{
memcpy
(
buffer
+
1
,
report
,
length
);
memcpy
(
buffer
+
1
,
packet
->
reportBuffer
,
length
);
count
=
write
(
ext
->
device_fd
,
buffer
,
length
+
1
);
}
if
(
count
>
0
)
{
*
writte
n
=
count
;
return
STATUS_SUCCESS
;
io
->
Informatio
n
=
count
;
io
->
Status
=
STATUS_SUCCESS
;
}
else
{
ERR_
(
hid_report
)(
"id %d write failed error: %d %s
\n
"
,
i
d
,
errno
,
strerror
(
errno
));
*
writte
n
=
0
;
return
STATUS_UNSUCCESSFUL
;
ERR_
(
hid_report
)(
"id %d write failed error: %d %s
\n
"
,
packet
->
reportI
d
,
errno
,
strerror
(
errno
));
io
->
Informatio
n
=
0
;
io
->
Status
=
STATUS_UNSUCCESSFUL
;
}
}
static
NTSTATUS
hidraw_get_feature_report
(
DEVICE_OBJECT
*
device
,
UCHAR
id
,
BYTE
*
report
,
DWORD
length
,
ULONG_PTR
*
read
)
static
void
hidraw_get_feature_report
(
DEVICE_OBJECT
*
device
,
HID_XFER_PACKET
*
packet
,
IO_STATUS_BLOCK
*
io
)
{
#if defined(HAVE_LINUX_HIDRAW_H) && defined(HIDIOCGFEATURE)
struct
platform_private
*
ext
=
impl_from_DEVICE_OBJECT
(
device
);
ULONG
length
=
packet
->
reportBufferLen
;
BYTE
buffer
[
8192
];
int
count
=
0
;
if
((
buffer
[
0
]
=
i
d
)
&&
length
<=
0x1fff
)
count
=
ioctl
(
ext
->
device_fd
,
HIDIOCGFEATURE
(
length
),
report
);
if
((
buffer
[
0
]
=
packet
->
reportI
d
)
&&
length
<=
0x1fff
)
count
=
ioctl
(
ext
->
device_fd
,
HIDIOCGFEATURE
(
length
),
packet
->
reportBuffer
);
else
if
(
length
>
sizeof
(
buffer
)
-
1
)
ERR_
(
hid_report
)(
"id %d length %u >= 8192, cannot read
\n
"
,
i
d
,
length
);
ERR_
(
hid_report
)(
"id %d length %u >= 8192, cannot read
\n
"
,
packet
->
reportI
d
,
length
);
else
{
count
=
ioctl
(
ext
->
device_fd
,
HIDIOCGFEATURE
(
length
+
1
),
buffer
);
memcpy
(
report
,
buffer
+
1
,
length
);
memcpy
(
packet
->
reportBuffer
,
buffer
+
1
,
length
);
}
if
(
count
>
0
)
{
*
read
=
count
;
return
STATUS_SUCCESS
;
io
->
Information
=
count
;
io
->
Status
=
STATUS_SUCCESS
;
}
else
{
ERR_
(
hid_report
)(
"id %d read failed, error: %d %s
\n
"
,
i
d
,
errno
,
strerror
(
errno
));
*
read
=
0
;
return
STATUS_UNSUCCESSFUL
;
ERR_
(
hid_report
)(
"id %d read failed, error: %d %s
\n
"
,
packet
->
reportI
d
,
errno
,
strerror
(
errno
));
io
->
Information
=
0
;
io
->
Status
=
STATUS_UNSUCCESSFUL
;
}
#else
*
read
=
0
;
return
STATUS_NOT_IMPLEMENTED
;
io
->
Information
=
0
;
io
->
Status
=
STATUS_NOT_IMPLEMENTED
;
#endif
}
static
NTSTATUS
hidraw_set_feature_report
(
DEVICE_OBJECT
*
device
,
UCHAR
id
,
BYTE
*
report
,
DWORD
length
,
ULONG_PTR
*
written
)
static
void
hidraw_set_feature_report
(
DEVICE_OBJECT
*
device
,
HID_XFER_PACKET
*
packet
,
IO_STATUS_BLOCK
*
io
)
{
#if defined(HAVE_LINUX_HIDRAW_H) && defined(HIDIOCSFEATURE)
struct
platform_private
*
ext
=
impl_from_DEVICE_OBJECT
(
device
);
ULONG
length
=
packet
->
reportBufferLen
;
BYTE
buffer
[
8192
];
int
count
=
0
;
if
((
buffer
[
0
]
=
i
d
)
&&
length
<=
0x1fff
)
count
=
ioctl
(
ext
->
device_fd
,
HIDIOCSFEATURE
(
length
),
report
);
if
((
buffer
[
0
]
=
packet
->
reportI
d
)
&&
length
<=
0x1fff
)
count
=
ioctl
(
ext
->
device_fd
,
HIDIOCSFEATURE
(
length
),
packet
->
reportBuffer
);
else
if
(
length
>
sizeof
(
buffer
)
-
1
)
ERR_
(
hid_report
)(
"id %d length %u >= 8192, cannot write
\n
"
,
i
d
,
length
);
ERR_
(
hid_report
)(
"id %d length %u >= 8192, cannot write
\n
"
,
packet
->
reportI
d
,
length
);
else
{
memcpy
(
buffer
+
1
,
report
,
length
);
memcpy
(
buffer
+
1
,
packet
->
reportBuffer
,
length
);
count
=
ioctl
(
ext
->
device_fd
,
HIDIOCSFEATURE
(
length
+
1
),
buffer
);
}
if
(
count
>
0
)
{
*
writte
n
=
count
;
return
STATUS_SUCCESS
;
io
->
Informatio
n
=
count
;
io
->
Status
=
STATUS_SUCCESS
;
}
else
{
ERR_
(
hid_report
)(
"id %d write failed, error: %d %s
\n
"
,
i
d
,
errno
,
strerror
(
errno
));
*
writte
n
=
0
;
return
STATUS_UNSUCCESSFUL
;
ERR_
(
hid_report
)(
"id %d write failed, error: %d %s
\n
"
,
packet
->
reportI
d
,
errno
,
strerror
(
errno
));
io
->
Informatio
n
=
0
;
io
->
Status
=
STATUS_UNSUCCESSFUL
;
}
#else
*
writte
n
=
0
;
return
STATUS_NOT_IMPLEMENTED
;
io
->
Informatio
n
=
0
;
io
->
Status
=
STATUS_NOT_IMPLEMENTED
;
#endif
}
...
...
@@ -949,22 +952,22 @@ static DWORD CALLBACK lnxev_device_report_thread(void *args)
return
0
;
}
static
NTSTATUS
lnxev_set_output_report
(
DEVICE_OBJECT
*
device
,
UCHAR
id
,
BYTE
*
report
,
DWORD
length
,
ULONG_PTR
*
written
)
static
void
lnxev_set_output_report
(
DEVICE_OBJECT
*
device
,
HID_XFER_PACKET
*
packet
,
IO_STATUS_BLOCK
*
io
)
{
*
writte
n
=
0
;
return
STATUS_NOT_IMPLEMENTED
;
io
->
Informatio
n
=
0
;
io
->
Status
=
STATUS_NOT_IMPLEMENTED
;
}
static
NTSTATUS
lnxev_get_feature_report
(
DEVICE_OBJECT
*
device
,
UCHAR
id
,
BYTE
*
report
,
DWORD
length
,
ULONG_PTR
*
read
)
static
void
lnxev_get_feature_report
(
DEVICE_OBJECT
*
device
,
HID_XFER_PACKET
*
packet
,
IO_STATUS_BLOCK
*
io
)
{
*
read
=
0
;
return
STATUS_NOT_IMPLEMENTED
;
io
->
Information
=
0
;
io
->
Status
=
STATUS_NOT_IMPLEMENTED
;
}
static
NTSTATUS
lnxev_set_feature_report
(
DEVICE_OBJECT
*
device
,
UCHAR
id
,
BYTE
*
report
,
DWORD
length
,
ULONG_PTR
*
written
)
static
void
lnxev_set_feature_report
(
DEVICE_OBJECT
*
device
,
HID_XFER_PACKET
*
packet
,
IO_STATUS_BLOCK
*
io
)
{
*
writte
n
=
0
;
return
STATUS_NOT_IMPLEMENTED
;
io
->
Informatio
n
=
0
;
io
->
Status
=
STATUS_NOT_IMPLEMENTED
;
}
static
const
platform_vtbl
lnxev_vtbl
=
{
...
...
dlls/winebus.sys/main.c
View file @
6e7ca583
...
...
@@ -502,22 +502,25 @@ static NTSTATUS mouse_get_string(DEVICE_OBJECT *device, DWORD index, WCHAR *buff
return
STATUS_SUCCESS
;
}
static
NTSTATUS
mouse_set_output_report
(
DEVICE_OBJECT
*
device
,
UCHAR
id
,
BYTE
*
report
,
DWORD
length
,
ULONG_PTR
*
ret_length
)
static
void
mouse_set_output_report
(
DEVICE_OBJECT
*
device
,
HID_XFER_PACKET
*
packet
,
IO_STATUS_BLOCK
*
io
)
{
FIXME
(
"id %u, stub!
\n
"
,
id
);
return
STATUS_NOT_IMPLEMENTED
;
FIXME
(
"id %u, stub!
\n
"
,
packet
->
reportId
);
io
->
Information
=
0
;
io
->
Status
=
STATUS_NOT_IMPLEMENTED
;
}
static
NTSTATUS
mouse_get_feature_report
(
DEVICE_OBJECT
*
device
,
UCHAR
id
,
BYTE
*
report
,
DWORD
length
,
ULONG_PTR
*
ret_length
)
static
void
mouse_get_feature_report
(
DEVICE_OBJECT
*
device
,
HID_XFER_PACKET
*
packet
,
IO_STATUS_BLOCK
*
io
)
{
FIXME
(
"id %u, stub!
\n
"
,
id
);
return
STATUS_NOT_IMPLEMENTED
;
FIXME
(
"id %u, stub!
\n
"
,
packet
->
reportId
);
io
->
Information
=
0
;
io
->
Status
=
STATUS_NOT_IMPLEMENTED
;
}
static
NTSTATUS
mouse_set_feature_report
(
DEVICE_OBJECT
*
device
,
UCHAR
id
,
BYTE
*
report
,
DWORD
length
,
ULONG_PTR
*
ret_length
)
static
void
mouse_set_feature_report
(
DEVICE_OBJECT
*
device
,
HID_XFER_PACKET
*
packet
,
IO_STATUS_BLOCK
*
io
)
{
FIXME
(
"id %u, stub!
\n
"
,
id
);
return
STATUS_NOT_IMPLEMENTED
;
FIXME
(
"id %u, stub!
\n
"
,
packet
->
reportId
);
io
->
Information
=
0
;
io
->
Status
=
STATUS_NOT_IMPLEMENTED
;
}
static
const
platform_vtbl
mouse_vtbl
=
...
...
@@ -576,22 +579,25 @@ static NTSTATUS keyboard_get_string(DEVICE_OBJECT *device, DWORD index, WCHAR *b
return
STATUS_SUCCESS
;
}
static
NTSTATUS
keyboard_set_output_report
(
DEVICE_OBJECT
*
device
,
UCHAR
id
,
BYTE
*
report
,
DWORD
length
,
ULONG_PTR
*
ret_length
)
static
void
keyboard_set_output_report
(
DEVICE_OBJECT
*
device
,
HID_XFER_PACKET
*
packet
,
IO_STATUS_BLOCK
*
io
)
{
FIXME
(
"id %u, stub!
\n
"
,
id
);
return
STATUS_NOT_IMPLEMENTED
;
FIXME
(
"id %u, stub!
\n
"
,
packet
->
reportId
);
io
->
Information
=
0
;
io
->
Status
=
STATUS_NOT_IMPLEMENTED
;
}
static
NTSTATUS
keyboard_get_feature_report
(
DEVICE_OBJECT
*
device
,
UCHAR
id
,
BYTE
*
report
,
DWORD
length
,
ULONG_PTR
*
ret_length
)
static
void
keyboard_get_feature_report
(
DEVICE_OBJECT
*
device
,
HID_XFER_PACKET
*
packet
,
IO_STATUS_BLOCK
*
io
)
{
FIXME
(
"id %u, stub!
\n
"
,
id
);
return
STATUS_NOT_IMPLEMENTED
;
FIXME
(
"id %u, stub!
\n
"
,
packet
->
reportId
);
io
->
Information
=
0
;
io
->
Status
=
STATUS_NOT_IMPLEMENTED
;
}
static
NTSTATUS
keyboard_set_feature_report
(
DEVICE_OBJECT
*
device
,
UCHAR
id
,
BYTE
*
report
,
DWORD
length
,
ULONG_PTR
*
ret_length
)
static
void
keyboard_set_feature_report
(
DEVICE_OBJECT
*
device
,
HID_XFER_PACKET
*
packet
,
IO_STATUS_BLOCK
*
io
)
{
FIXME
(
"id %u, stub!
\n
"
,
id
);
return
STATUS_NOT_IMPLEMENTED
;
FIXME
(
"id %u, stub!
\n
"
,
packet
->
reportId
);
io
->
Information
=
0
;
io
->
Status
=
STATUS_NOT_IMPLEMENTED
;
}
static
const
platform_vtbl
keyboard_vtbl
=
...
...
@@ -939,28 +945,21 @@ static NTSTATUS WINAPI hid_internal_dispatch(DEVICE_OBJECT *device, IRP *irp)
{
HID_XFER_PACKET
*
packet
=
(
HID_XFER_PACKET
*
)(
irp
->
UserBuffer
);
TRACE_
(
hid_report
)(
"IOCTL_HID_WRITE_REPORT / IOCTL_HID_SET_OUTPUT_REPORT
\n
"
);
irp
->
IoStatus
.
Status
=
ext
->
vtbl
->
set_output_report
(
device
,
packet
->
reportId
,
packet
->
reportBuffer
,
packet
->
reportBufferLen
,
&
irp
->
IoStatus
.
Information
);
ext
->
vtbl
->
set_output_report
(
device
,
packet
,
&
irp
->
IoStatus
);
break
;
}
case
IOCTL_HID_GET_FEATURE
:
{
HID_XFER_PACKET
*
packet
=
(
HID_XFER_PACKET
*
)(
irp
->
UserBuffer
);
TRACE_
(
hid_report
)(
"IOCTL_HID_GET_FEATURE
\n
"
);
irp
->
IoStatus
.
Status
=
ext
->
vtbl
->
get_feature_report
(
device
,
packet
->
reportId
,
packet
->
reportBuffer
,
packet
->
reportBufferLen
,
&
irp
->
IoStatus
.
Information
);
packet
->
reportBufferLen
=
irp
->
IoStatus
.
Information
;
ext
->
vtbl
->
get_feature_report
(
device
,
packet
,
&
irp
->
IoStatus
);
break
;
}
case
IOCTL_HID_SET_FEATURE
:
{
HID_XFER_PACKET
*
packet
=
(
HID_XFER_PACKET
*
)(
irp
->
UserBuffer
);
TRACE_
(
hid_report
)(
"IOCTL_HID_SET_FEATURE
\n
"
);
irp
->
IoStatus
.
Status
=
ext
->
vtbl
->
set_feature_report
(
device
,
packet
->
reportId
,
packet
->
reportBuffer
,
packet
->
reportBufferLen
,
&
irp
->
IoStatus
.
Information
);
ext
->
vtbl
->
set_feature_report
(
device
,
packet
,
&
irp
->
IoStatus
);
break
;
}
default:
...
...
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