From: Aric Stewart Subject: (retry) hidclass.sys: make sure we pass in the index not a pointer to the index Message-Id: <55F97F6D.1010603@codeweavers.com> Date: Wed, 16 Sep 2015 09:40:45 -0500 --- dlls/hidclass.sys/device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/hidclass.sys/device.c b/dlls/hidclass.sys/device.c index 46bd010..b0982f0 100644 --- a/dlls/hidclass.sys/device.c +++ b/dlls/hidclass.sys/device.c @@ -233,13 +233,15 @@ static NTSTATUS handle_IOCTL_HID_GET_COLLECTION_DESCRIPTOR(IRP *irp, BASE_DEVICE return STATUS_SUCCESS; } -static NTSTATUS handle_minidriver_string(DEVICE_OBJECT *device, IRP *irp, DWORD index) +static NTSTATUS handle_minidriver_string(DEVICE_OBJECT *device, IRP *irp, SHORT index) { IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation( irp ); WCHAR buffer[127]; NTSTATUS status; + ULONG InputBuffer; - status = call_minidriver(IOCTL_HID_GET_STRING, device, &index, sizeof(index), buffer, sizeof(buffer)); + InputBuffer = MAKELONG(index, 0); + status = call_minidriver(IOCTL_HID_GET_STRING, device, ULongToPtr(InputBuffer), sizeof(InputBuffer), buffer, sizeof(buffer)); if (status == STATUS_SUCCESS) {