Commit 3532d666 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

hidclass.sys: Assign rawinput handles through device properties.

parent 50210ea2
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <stdarg.h> #include <stdarg.h>
#define NONAMELESSUNION #define NONAMELESSUNION
#define NONAMELESSSTRUCT #define NONAMELESSSTRUCT
#include "initguid.h"
#include "hid.h" #include "hid.h"
#include "winreg.h" #include "winreg.h"
#include "winuser.h" #include "winuser.h"
...@@ -30,9 +29,6 @@ ...@@ -30,9 +29,6 @@
#include "ddk/hidsdi.h" #include "ddk/hidsdi.h"
#include "ddk/hidtypes.h" #include "ddk/hidtypes.h"
#include "ddk/wdm.h" #include "ddk/wdm.h"
#include "devguid.h"
#include "ntddmou.h"
#include "ntddkbd.h"
WINE_DEFAULT_DEBUG_CHANNEL(hid); WINE_DEFAULT_DEBUG_CHANNEL(hid);
WINE_DECLARE_DEBUG_CHANNEL(hid_report); WINE_DECLARE_DEBUG_CHANNEL(hid_report);
......
...@@ -21,7 +21,10 @@ ...@@ -21,7 +21,10 @@
#define NONAMELESSUNION #define NONAMELESSUNION
#include <unistd.h> #include <unistd.h>
#include <stdarg.h> #include <stdarg.h>
#include "initguid.h"
#include "hid.h" #include "hid.h"
#include "devguid.h"
#include "devpkey.h"
#include "ntddmou.h" #include "ntddmou.h"
#include "ntddkbd.h" #include "ntddkbd.h"
#include "ddk/hidtypes.h" #include "ddk/hidtypes.h"
...@@ -33,6 +36,8 @@ ...@@ -33,6 +36,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(hid); WINE_DEFAULT_DEBUG_CHANNEL(hid);
DEFINE_DEVPROPKEY(DEVPROPKEY_HID_HANDLE, 0xbc62e415, 0xf4fe, 0x405c, 0x8e, 0xda, 0x63, 0x6f, 0xb5, 0x9f, 0x08, 0x98, 2);
#if defined(__i386__) && !defined(_WIN32) #if defined(__i386__) && !defined(_WIN32)
extern void * WINAPI wrap_fastcall_func1( void *func, const void *a ); extern void * WINAPI wrap_fastcall_func1( void *func, const void *a );
...@@ -231,8 +236,6 @@ static void create_child(minidriver *minidriver, DEVICE_OBJECT *fdo) ...@@ -231,8 +236,6 @@ static void create_child(minidriver *minidriver, DEVICE_OBJECT *fdo)
pdo_ext->u.pdo.information.DescriptorSize = pdo_ext->u.pdo.preparsed_data->dwSize; pdo_ext->u.pdo.information.DescriptorSize = pdo_ext->u.pdo.preparsed_data->dwSize;
IoInvalidateDeviceRelations(fdo_ext->u.fdo.hid_ext.PhysicalDeviceObject, BusRelations);
page = pdo_ext->u.pdo.preparsed_data->caps.UsagePage; page = pdo_ext->u.pdo.preparsed_data->caps.UsagePage;
usage = pdo_ext->u.pdo.preparsed_data->caps.Usage; usage = pdo_ext->u.pdo.preparsed_data->caps.Usage;
if (page == HID_USAGE_PAGE_GENERIC && usage == HID_USAGE_GENERIC_MOUSE) if (page == HID_USAGE_PAGE_GENERIC && usage == HID_USAGE_GENERIC_MOUSE)
...@@ -242,6 +245,17 @@ static void create_child(minidriver *minidriver, DEVICE_OBJECT *fdo) ...@@ -242,6 +245,17 @@ static void create_child(minidriver *minidriver, DEVICE_OBJECT *fdo)
else else
pdo_ext->u.pdo.rawinput_handle = alloc_rawinput_handle(); pdo_ext->u.pdo.rawinput_handle = alloc_rawinput_handle();
if ((status = IoSetDevicePropertyData(child_pdo, &DEVPROPKEY_HID_HANDLE, LOCALE_NEUTRAL,
PLUGPLAY_PROPERTY_PERSISTENT, DEVPROP_TYPE_UINT32,
sizeof(pdo_ext->u.pdo.rawinput_handle), &pdo_ext->u.pdo.rawinput_handle)))
{
ERR("Failed to set device handle property, status %x\n", status);
IoDeleteDevice(child_pdo);
return;
}
IoInvalidateDeviceRelations(fdo_ext->u.fdo.hid_ext.PhysicalDeviceObject, BusRelations);
pdo_ext->u.pdo.poll_interval = DEFAULT_POLL_INTERVAL; pdo_ext->u.pdo.poll_interval = DEFAULT_POLL_INTERVAL;
pdo_ext->u.pdo.ring_buffer = RingBuffer_Create( pdo_ext->u.pdo.ring_buffer = RingBuffer_Create(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment