From ab3b9bd84db3b942ea7ce1e85ac6dd12087f2596 Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Fri, 12 Aug 2016 08:18:56 -0500 Subject: [PATCH] hidclass.sys: Call IoAttachDeviceToDeviceStack when creating HID device. Signed-off-by: Aric Stewart Signed-off-by: Alexandre Julliard --- dlls/hidclass.sys/device.c | 2 ++ include/ddk/wdm.h | 1 + 2 files changed, 3 insertions(+) diff --git a/dlls/hidclass.sys/device.c b/dlls/hidclass.sys/device.c index b137c9b1dcb..b90e701c81c 100644 --- a/dlls/hidclass.sys/device.c +++ b/dlls/hidclass.sys/device.c @@ -75,6 +75,8 @@ NTSTATUS HID_CreateDevice(DEVICE_OBJECT *native_device, HID_MINIDRIVER_REGISTRAT lstrcpyW(ext->device_name, dev_name); ext->link_name = NULL; + IoAttachDeviceToDeviceStack(*device, native_device); + return S_OK; } diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index 5eda82d6246..68694afec0c 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1213,6 +1213,7 @@ NTSTATUS WINAPI IoAllocateDriverObjectExtension(PDRIVER_OBJECT,PVOID,ULONG,PVOI PVOID WINAPI IoAllocateErrorLogEntry(PVOID,UCHAR); PIRP WINAPI IoAllocateIrp(CCHAR,BOOLEAN); PMDL WINAPI IoAllocateMdl(PVOID,ULONG,BOOLEAN,BOOLEAN,IRP*); +PDEVICE_OBJECT WINAPI IoAttachDeviceToDeviceStack(PDEVICE_OBJECT,PDEVICE_OBJECT); PIRP WINAPI IoBuildDeviceIoControlRequest(ULONG,DEVICE_OBJECT*,PVOID,ULONG,PVOID,ULONG,BOOLEAN,PKEVENT,IO_STATUS_BLOCK*); PIRP WINAPI IoBuildSynchronousFsdRequest(ULONG,DEVICE_OBJECT*,PVOID,ULONG,PLARGE_INTEGER,PKEVENT,IO_STATUS_BLOCK*); NTSTATUS WINAPI IoCallDriver(DEVICE_OBJECT*,IRP*);