From 0e64d4711a345f08d192c8acfcf1944e6ee237cc Mon Sep 17 00:00:00 2001 From: Adrian vovk Date: Thu, 1 Aug 2024 00:35:29 -0700 Subject: [PATCH] Work around missing HID stuff and IOCTLS See also: https://github.com/microsoft/windows-drivers-rs/issues/185#issuecomment-2237748327 --- crates/wdk-sys/src/input.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/crates/wdk-sys/src/input.h b/crates/wdk-sys/src/input.h index dec71ce3..dcca8832 100644 --- a/crates/wdk-sys/src/input.h +++ b/crates/wdk-sys/src/input.h @@ -70,3 +70,23 @@ typedef union _KIDTENTRY64 #include #endif // defined(KMDF_VERSION_MAJOR) || defined(UMDF_VERSION_MAJOR) + +#include <..\km\hidport.h> +#include +#include + +const ULONG FIXED_IOCTL_HID_GET_DEVICE_DESCRIPTOR = IOCTL_HID_GET_DEVICE_DESCRIPTOR; +const ULONG FIXED_IOCTL_HID_GET_DEVICE_ATTRIBUTES = IOCTL_HID_GET_DEVICE_ATTRIBUTES; +const ULONG FIXED_IOCTL_HID_GET_REPORT_DESCRIPTOR = IOCTL_HID_GET_REPORT_DESCRIPTOR; +const ULONG FIXED_IOCTL_HID_READ_REPORT = IOCTL_HID_READ_REPORT; +const ULONG FIXED_IOCTL_HID_WRITE_REPORT = IOCTL_HID_WRITE_REPORT; +const ULONG FIXED_IOCTL_UMDF_HID_GET_FEATURE = IOCTL_UMDF_HID_GET_FEATURE; +const ULONG FIXED_IOCTL_UMDF_HID_SET_FEATURE = IOCTL_UMDF_HID_SET_FEATURE; +const ULONG FIXED_IOCTL_UMDF_HID_GET_INPUT_REPORT = IOCTL_UMDF_HID_GET_INPUT_REPORT; +const ULONG FIXED_IOCTL_UMDF_HID_SET_OUTPUT_REPORT = IOCTL_UMDF_HID_SET_OUTPUT_REPORT; +const ULONG FIXED_IOCTL_HID_GET_STRING = IOCTL_HID_GET_STRING; +const ULONG FIXED_IOCTL_HID_GET_INDEXED_STRING = IOCTL_HID_GET_INDEXED_STRING; +const ULONG FIXED_IOCTL_HID_SEND_IDLE_NOTIFICATION_REQUEST = IOCTL_HID_SEND_IDLE_NOTIFICATION_REQUEST; +const ULONG FIXED_IOCTL_HID_ACTIVATE_DEVICE = IOCTL_HID_ACTIVATE_DEVICE; +const ULONG FIXED_IOCTL_HID_DEACTIVATE_DEVICE = IOCTL_HID_DEACTIVATE_DEVICE; +const ULONG FIXED_IOCTL_GET_PHYSICAL_DESCRIPTOR = IOCTL_GET_PHYSICAL_DESCRIPTOR; \ No newline at end of file