Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/hidclass.sys/pnp.c | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-)
diff --git a/dlls/hidclass.sys/pnp.c b/dlls/hidclass.sys/pnp.c index 6e13596a32c..5134cb3569a 100644 --- a/dlls/hidclass.sys/pnp.c +++ b/dlls/hidclass.sys/pnp.c @@ -62,43 +62,28 @@ static minidriver *find_minidriver(DRIVER_OBJECT *driver) return NULL; }
-static NTSTATUS WINAPI internalComplete(DEVICE_OBJECT *deviceObject, IRP *irp, - void *context) -{ - HANDLE event = context; - SetEvent(event); - return STATUS_MORE_PROCESSING_REQUIRED; -} - static NTSTATUS get_device_id(DEVICE_OBJECT *device, BUS_QUERY_ID_TYPE type, WCHAR *id) { - NTSTATUS status; IO_STACK_LOCATION *irpsp; IO_STATUS_BLOCK irp_status; - HANDLE event; + KEVENT event; IRP *irp;
- irp = IoBuildSynchronousFsdRequest(IRP_MJ_PNP, device, NULL, 0, NULL, NULL, &irp_status); + KeInitializeEvent(&event, NotificationEvent, FALSE); + irp = IoBuildSynchronousFsdRequest(IRP_MJ_PNP, device, NULL, 0, NULL, &event, &irp_status); if (irp == NULL) return STATUS_NO_MEMORY;
- event = CreateEventA(NULL, FALSE, FALSE, NULL); irpsp = IoGetNextIrpStackLocation(irp); irpsp->MinorFunction = IRP_MN_QUERY_ID; irpsp->Parameters.QueryId.IdType = type;
- IoSetCompletionRoutine(irp, internalComplete, event, TRUE, TRUE, TRUE); - status = IoCallDriver(device, irp); - if (status == STATUS_PENDING) - WaitForSingleObject(event, INFINITE); + if (IoCallDriver(device, irp) == STATUS_PENDING) + KeWaitForSingleObject(&event, Executive, KernelMode, FALSE, NULL);
- lstrcpyW(id, (WCHAR *)irp->IoStatus.Information); - ExFreePool( (WCHAR *)irp->IoStatus.Information ); - status = irp->IoStatus.u.Status; - IoCompleteRequest(irp, IO_NO_INCREMENT ); - CloseHandle(event); - - return status; + wcscpy(id, (WCHAR *)irp_status.Information); + ExFreePool((WCHAR *)irp_status.Information); + return irp_status.u.Status; }
static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *bus_pdo)
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/hidclass.sys/Makefile.in | 1 - dlls/hidclass.sys/device.c | 64 ----------------------------------- dlls/hidclass.sys/hid.h | 1 - dlls/hidclass.sys/pnp.c | 21 +++++++++++- 4 files changed, 20 insertions(+), 67 deletions(-)
diff --git a/dlls/hidclass.sys/Makefile.in b/dlls/hidclass.sys/Makefile.in index 58bb2b5088f..4b1e9338eb4 100644 --- a/dlls/hidclass.sys/Makefile.in +++ b/dlls/hidclass.sys/Makefile.in @@ -1,7 +1,6 @@ MODULE = hidclass.sys IMPORTLIB = hidclass IMPORTS = hal ntoskrnl -DELAYIMPORTS = setupapi
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/hidclass.sys/device.c b/dlls/hidclass.sys/device.c index ec34b6b8068..35cc40c01ea 100644 --- a/dlls/hidclass.sys/device.c +++ b/dlls/hidclass.sys/device.c @@ -25,7 +25,6 @@ #include "hid.h" #include "winreg.h" #include "winuser.h" -#include "setupapi.h"
#include "wine/debug.h" #include "ddk/hidsdi.h" @@ -37,69 +36,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(hid); WINE_DECLARE_DEBUG_CHANNEL(hid_report);
-/* user32 reserves 1 & 2 for winemouse and winekeyboard, - * keep this in sync with user_private.h */ -#define WINE_MOUSE_HANDLE 1 -#define WINE_KEYBOARD_HANDLE 2 - -static UINT32 alloc_rawinput_handle(void) -{ - static LONG counter = WINE_KEYBOARD_HANDLE + 1; - return InterlockedIncrement(&counter); -} - -NTSTATUS HID_LinkDevice(DEVICE_OBJECT *device) -{ - WCHAR device_instance_id[MAX_DEVICE_ID_LEN]; - SP_DEVINFO_DATA Data; - HDEVINFO devinfo; - BASE_DEVICE_EXTENSION *ext; - USAGE usage, page; - - ext = device->DeviceExtension; - page = ext->u.pdo.preparsed_data->caps.UsagePage; - usage = ext->u.pdo.preparsed_data->caps.Usage; - - lstrcpyW(device_instance_id, ext->device_id); - lstrcatW(device_instance_id, L"\"); - lstrcatW(device_instance_id, ext->instance_id); - - devinfo = SetupDiCreateDeviceInfoList(&GUID_DEVCLASS_HIDCLASS, NULL); - if (devinfo == INVALID_HANDLE_VALUE) - { - FIXME( "failed to get ClassDevs %x\n", GetLastError()); - return STATUS_UNSUCCESSFUL; - } - Data.cbSize = sizeof(Data); - if (SetupDiCreateDeviceInfoW(devinfo, device_instance_id, &GUID_DEVCLASS_HIDCLASS, NULL, NULL, DICD_INHERIT_CLASSDRVS, &Data)) - { - if (!SetupDiRegisterDeviceInfo(devinfo, &Data, 0, NULL, NULL, NULL)) - { - FIXME( "failed to register device info %x\n", GetLastError()); - goto error; - } - } - else if (GetLastError() != ERROR_DEVINST_ALREADY_EXISTS) - { - FIXME( "failed to create device info %x\n", GetLastError()); - goto error; - } - SetupDiDestroyDeviceInfoList(devinfo); - - if (page == HID_USAGE_PAGE_GENERIC && usage == HID_USAGE_GENERIC_MOUSE) - ext->u.pdo.rawinput_handle = WINE_MOUSE_HANDLE; - else if (page == HID_USAGE_PAGE_GENERIC && usage == HID_USAGE_GENERIC_KEYBOARD) - ext->u.pdo.rawinput_handle = WINE_KEYBOARD_HANDLE; - else - ext->u.pdo.rawinput_handle = alloc_rawinput_handle(); - - return STATUS_SUCCESS; - -error: - SetupDiDestroyDeviceInfoList(devinfo); - return STATUS_UNSUCCESSFUL; -} - IRP *pop_irp_from_queue(BASE_DEVICE_EXTENSION *ext) { LIST_ENTRY *entry; diff --git a/dlls/hidclass.sys/hid.h b/dlls/hidclass.sys/hid.h index 2a5636121be..9e829332bdc 100644 --- a/dlls/hidclass.sys/hid.h +++ b/dlls/hidclass.sys/hid.h @@ -106,7 +106,6 @@ typedef struct _minidriver NTSTATUS call_minidriver(ULONG code, DEVICE_OBJECT *device, void *in_buff, ULONG in_size, void *out_buff, ULONG out_size) DECLSPEC_HIDDEN;
/* Internal device functions */ -NTSTATUS HID_LinkDevice(DEVICE_OBJECT *device) DECLSPEC_HIDDEN; void HID_StartDeviceThread(DEVICE_OBJECT *device) DECLSPEC_HIDDEN;
IRP *pop_irp_from_queue(BASE_DEVICE_EXTENSION *ext) DECLSPEC_HIDDEN; diff --git a/dlls/hidclass.sys/pnp.c b/dlls/hidclass.sys/pnp.c index 5134cb3569a..b9208d146e6 100644 --- a/dlls/hidclass.sys/pnp.c +++ b/dlls/hidclass.sys/pnp.c @@ -86,6 +86,17 @@ static NTSTATUS get_device_id(DEVICE_OBJECT *device, BUS_QUERY_ID_TYPE type, WCH return irp_status.u.Status; }
+/* user32 reserves 1 & 2 for winemouse and winekeyboard, + * keep this in sync with user_private.h */ +#define WINE_MOUSE_HANDLE 1 +#define WINE_KEYBOARD_HANDLE 2 + +static UINT32 alloc_rawinput_handle(void) +{ + static LONG counter = WINE_KEYBOARD_HANDLE + 1; + return InterlockedIncrement(&counter); +} + static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *bus_pdo) { WCHAR device_id[MAX_DEVICE_ID_LEN], instance_id[MAX_DEVICE_ID_LEN], pdo_name[255]; @@ -93,6 +104,7 @@ static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *b HID_DEVICE_ATTRIBUTES attr = {0}; DEVICE_OBJECT *fdo, *child_pdo; UNICODE_STRING string; + USAGE page, usage; NTSTATUS status; minidriver *minidriver; HID_DESCRIPTOR descriptor; @@ -214,7 +226,14 @@ static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *b
IoInvalidateDeviceRelations(bus_pdo, BusRelations);
- HID_LinkDevice(child_pdo); + page = pdo_ext->u.pdo.preparsed_data->caps.UsagePage; + usage = pdo_ext->u.pdo.preparsed_data->caps.Usage; + if (page == HID_USAGE_PAGE_GENERIC && usage == HID_USAGE_GENERIC_MOUSE) + pdo_ext->u.pdo.rawinput_handle = WINE_MOUSE_HANDLE; + else if (page == HID_USAGE_PAGE_GENERIC && usage == HID_USAGE_GENERIC_KEYBOARD) + pdo_ext->u.pdo.rawinput_handle = WINE_KEYBOARD_HANDLE; + else + pdo_ext->u.pdo.rawinput_handle = alloc_rawinput_handle();
pdo_ext->u.pdo.poll_interval = DEFAULT_POLL_INTERVAL;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/hidclass.sys/pnp.c | 2 +- dlls/ntoskrnl.exe/tests/driver_hid.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/hidclass.sys/pnp.c b/dlls/hidclass.sys/pnp.c index b9208d146e6..7b365d267ed 100644 --- a/dlls/hidclass.sys/pnp.c +++ b/dlls/hidclass.sys/pnp.c @@ -135,7 +135,7 @@ static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *b ext = fdo->DeviceExtension; ext->is_fdo = TRUE; ext->u.fdo.hid_ext.MiniDeviceExtension = ext + 1; - ext->u.fdo.hid_ext.PhysicalDeviceObject = fdo; + ext->u.fdo.hid_ext.PhysicalDeviceObject = bus_pdo; ext->u.fdo.hid_ext.NextDeviceObject = bus_pdo; swprintf(ext->device_id, ARRAY_SIZE(ext->device_id), L"HID\%s", wcsrchr(device_id, '\') + 1); wcscpy(ext->instance_id, instance_id); diff --git a/dlls/ntoskrnl.exe/tests/driver_hid.c b/dlls/ntoskrnl.exe/tests/driver_hid.c index 7ddf49f4dcc..92637f9d0bc 100644 --- a/dlls/ntoskrnl.exe/tests/driver_hid.c +++ b/dlls/ntoskrnl.exe/tests/driver_hid.c @@ -215,7 +215,7 @@ static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *f
/* We should be given the FDO, not the PDO. */ ok(!!ext->PhysicalDeviceObject, "expected non-NULL pdo\n"); - todo_wine ok(ext->NextDeviceObject == ext->PhysicalDeviceObject, "got pdo %p, next %p\n", + ok(ext->NextDeviceObject == ext->PhysicalDeviceObject, "got pdo %p, next %p\n", ext->PhysicalDeviceObject, ext->NextDeviceObject); todo_wine ok(ext->NextDeviceObject->AttachedDevice == fdo, "wrong attached device\n");
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=88917
Your paranoid android.
=== w864 (64 bit report) ===
ntoskrnl.exe: 0a8c:ntoskrnl: unhandled exception c0000005 at 00007FF9FBF63DAA
This is necessary to allow the Hauppauge CIR receiver driver for cx2310x drivers (hcw10cir.sys) to start.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- Tested with a Hauppauge 955Q (2040:b123), installed using WinTV 8.5. Note however that the driver still does not run with upstream Wine; it needs an additional patch to expose composite device interfaces from wineusb (or from a layered driver on top of wineusb).
dlls/hidclass.sys/pnp.c | 91 +++++++++++++++++----------- dlls/ntoskrnl.exe/tests/driver_hid.c | 3 +- 2 files changed, 57 insertions(+), 37 deletions(-)
diff --git a/dlls/hidclass.sys/pnp.c b/dlls/hidclass.sys/pnp.c index 7b365d267ed..de6f409a16b 100644 --- a/dlls/hidclass.sys/pnp.c +++ b/dlls/hidclass.sys/pnp.c @@ -99,17 +99,11 @@ static UINT32 alloc_rawinput_handle(void)
static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *bus_pdo) { - WCHAR device_id[MAX_DEVICE_ID_LEN], instance_id[MAX_DEVICE_ID_LEN], pdo_name[255]; - BASE_DEVICE_EXTENSION *ext, *pdo_ext; - HID_DEVICE_ATTRIBUTES attr = {0}; - DEVICE_OBJECT *fdo, *child_pdo; - UNICODE_STRING string; - USAGE page, usage; + WCHAR device_id[MAX_DEVICE_ID_LEN], instance_id[MAX_DEVICE_ID_LEN]; + BASE_DEVICE_EXTENSION *ext; + DEVICE_OBJECT *fdo; NTSTATUS status; minidriver *minidriver; - HID_DESCRIPTOR descriptor; - BYTE *reportDescriptor; - INT i;
if ((status = get_device_id(bus_pdo, BusQueryDeviceID, device_id))) { @@ -148,30 +142,48 @@ static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *b return status; }
+ IoAttachDeviceToDeviceStack(fdo, bus_pdo); + fdo->Flags &= ~DO_DEVICE_INITIALIZING; + + return STATUS_SUCCESS; +} + +static void create_child(minidriver *minidriver, DEVICE_OBJECT *fdo) +{ + BASE_DEVICE_EXTENSION *fdo_ext = fdo->DeviceExtension, *pdo_ext; + HID_DEVICE_ATTRIBUTES attr = {0}; + HID_DESCRIPTOR descriptor; + DEVICE_OBJECT *child_pdo; + BYTE *reportDescriptor; + UNICODE_STRING string; + WCHAR pdo_name[255]; + USAGE page, usage; + NTSTATUS status; + INT i; + status = call_minidriver(IOCTL_HID_GET_DEVICE_ATTRIBUTES, fdo, NULL, 0, &attr, sizeof(attr)); if (status != STATUS_SUCCESS) { ERR("Minidriver failed to get Attributes(%x)\n",status); - IoDeleteDevice(fdo); - return status; + return; }
- swprintf(pdo_name, ARRAY_SIZE(pdo_name), L"\Device\HID#%p&%p", driver, bus_pdo); + swprintf(pdo_name, ARRAY_SIZE(pdo_name), L"\Device\HID#%p&%p", fdo->DriverObject, + fdo_ext->u.fdo.hid_ext.PhysicalDeviceObject); RtlInitUnicodeString(&string, pdo_name); - if ((status = IoCreateDevice(driver, sizeof(*ext), &string, 0, 0, FALSE, &child_pdo))) + if ((status = IoCreateDevice(fdo->DriverObject, sizeof(*pdo_ext), &string, 0, 0, FALSE, &child_pdo))) { ERR("Failed to create child PDO, status %#x.\n", status); - IoDeleteDevice(fdo); - return status; + return; } - ext->u.fdo.child_pdo = child_pdo; + fdo_ext->u.fdo.child_pdo = child_pdo;
pdo_ext = child_pdo->DeviceExtension; pdo_ext->u.pdo.parent_fdo = fdo; InitializeListHead(&pdo_ext->u.pdo.irp_queue); KeInitializeSpinLock(&pdo_ext->u.pdo.irp_queue_lock); - wcscpy(pdo_ext->device_id, ext->device_id); - wcscpy(pdo_ext->instance_id, ext->instance_id); + wcscpy(pdo_ext->device_id, fdo_ext->device_id); + wcscpy(pdo_ext->instance_id, fdo_ext->instance_id);
pdo_ext->u.pdo.information.VendorID = attr.VendorID; pdo_ext->u.pdo.information.ProductID = attr.ProductID; @@ -183,8 +195,7 @@ static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *b { ERR("Cannot get Device Descriptor(%x)\n",status); IoDeleteDevice(child_pdo); - IoDeleteDevice(fdo); - return status; + return; } for (i = 0; i < descriptor.bNumDescriptors; i++) if (descriptor.DescriptorList[i].bReportType == HID_REPORT_DESCRIPTOR_TYPE) @@ -194,8 +205,7 @@ static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *b { ERR("No Report Descriptor found in reply\n"); IoDeleteDevice(child_pdo); - IoDeleteDevice(fdo); - return status; + return; }
reportDescriptor = HeapAlloc(GetProcessHeap(), 0, descriptor.DescriptorList[i].wReportLength); @@ -206,8 +216,7 @@ static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *b ERR("Cannot get Report Descriptor(%x)\n",status); HeapFree(GetProcessHeap(), 0, reportDescriptor); IoDeleteDevice(child_pdo); - IoDeleteDevice(fdo); - return status; + return; }
pdo_ext->u.pdo.preparsed_data = ParseDescriptor(reportDescriptor, descriptor.DescriptorList[i].wReportLength); @@ -216,15 +225,12 @@ static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *b { ERR("Cannot parse Report Descriptor\n"); IoDeleteDevice(child_pdo); - IoDeleteDevice(fdo); - return STATUS_NOT_SUPPORTED; + return; }
pdo_ext->u.pdo.information.DescriptorSize = pdo_ext->u.pdo.preparsed_data->dwSize;
- IoAttachDeviceToDeviceStack(fdo, bus_pdo); - - IoInvalidateDeviceRelations(bus_pdo, BusRelations); + IoInvalidateDeviceRelations(fdo_ext->u.fdo.hid_ext.PhysicalDeviceObject, BusRelations);
page = pdo_ext->u.pdo.preparsed_data->caps.UsagePage; usage = pdo_ext->u.pdo.preparsed_data->caps.Usage; @@ -241,9 +247,6 @@ static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *b sizeof(HID_XFER_PACKET) + pdo_ext->u.pdo.preparsed_data->caps.InputReportByteLength);
HID_StartDeviceThread(child_pdo); - - fdo->Flags &= ~DO_DEVICE_INITIALIZING; - return STATUS_SUCCESS; }
static NTSTATUS fdo_pnp(DEVICE_OBJECT *device, IRP *irp) @@ -259,6 +262,7 @@ static NTSTATUS fdo_pnp(DEVICE_OBJECT *device, IRP *irp) case IRP_MN_QUERY_DEVICE_RELATIONS: { DEVICE_RELATIONS *devices; + DEVICE_OBJECT *child;
if (stack->Parameters.QueryDeviceRelations.Type != BusRelations) return minidriver->PNPDispatch(device, irp); @@ -270,9 +274,16 @@ static NTSTATUS fdo_pnp(DEVICE_OBJECT *device, IRP *irp) return STATUS_NO_MEMORY; }
- devices->Objects[0] = ext->u.fdo.child_pdo; - call_fastcall_func1(ObfReferenceObject, ext->u.fdo.child_pdo); - devices->Count = 1; + if ((child = ext->u.fdo.child_pdo)) + { + devices->Objects[0] = ext->u.fdo.child_pdo; + call_fastcall_func1(ObfReferenceObject, ext->u.fdo.child_pdo); + devices->Count = 1; + } + else + { + devices->Count = 0; + }
irp->IoStatus.Information = (ULONG_PTR)devices; irp->IoStatus.u.Status = STATUS_SUCCESS; @@ -280,6 +291,16 @@ static NTSTATUS fdo_pnp(DEVICE_OBJECT *device, IRP *irp) return IoCallDriver(ext->u.fdo.hid_ext.NextDeviceObject, irp); }
+ case IRP_MN_START_DEVICE: + { + NTSTATUS ret; + + if ((ret = minidriver->PNPDispatch(device, irp))) + return ret; + create_child(minidriver, device); + return STATUS_SUCCESS; + } + case IRP_MN_REMOVE_DEVICE: { NTSTATUS ret; diff --git a/dlls/ntoskrnl.exe/tests/driver_hid.c b/dlls/ntoskrnl.exe/tests/driver_hid.c index 92637f9d0bc..44ec1b09526 100644 --- a/dlls/ntoskrnl.exe/tests/driver_hid.c +++ b/dlls/ntoskrnl.exe/tests/driver_hid.c @@ -111,8 +111,7 @@ static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device, IRP *irp)
if (winetest_debug > 1) trace("ioctl %#x\n", code);
- todo_wine_if (code != IOCTL_HID_READ_REPORT) - ok(got_start_device, "expected IRP_MN_START_DEVICE before any ioctls\n"); + ok(got_start_device, "expected IRP_MN_START_DEVICE before any ioctls\n");
irp->IoStatus.Information = 0;
Zebediah Figura z.figura12@gmail.com writes:
This is necessary to allow the Hauppauge CIR receiver driver for cx2310x drivers (hcw10cir.sys) to start.
Signed-off-by: Zebediah Figura z.figura12@gmail.com
Tested with a Hauppauge 955Q (2040:b123), installed using WinTV 8.5. Note however that the driver still does not run with upstream Wine; it needs an additional patch to expose composite device interfaces from wineusb (or from a layered driver on top of wineusb).
dlls/hidclass.sys/pnp.c | 91 +++++++++++++++++----------- dlls/ntoskrnl.exe/tests/driver_hid.c | 3 +- 2 files changed, 57 insertions(+), 37 deletions(-)
This breaks the tests here:
tools/runtest -q -P wine -T . -M ntoskrnl.exe -p dlls/ntoskrnl.exe/tests/ntoskrnl.exe_test.exe ntoskrnl && touch dlls/ntoskrnl.exe/tests/ntoskrnl.ok ntoskrnl.c:1696: Subtest driver ntoskrnl.c:1739: Subtest driver_netio ntoskrnl.c:1742: Subtest driver_pnp ntoskrnl.c:1745: Subtest driver_hid ntoskrnl.c:1520: Test failed: failed to get interface, error 0x103 ntoskrnl.c:1521: Test failed: wrong class {00000000-0000-0000-0000-000000000000} ntoskrnl.c:1523: Test failed: got flags 0 ntoskrnl.c:1527: Test failed: failed to get interface path, error 0x57 make: *** [Makefile:97794: dlls/ntoskrnl.exe/tests/ntoskrnl.ok] Error 4
On 4/19/21 3:12 PM, Alexandre Julliard wrote:
Zebediah Figura z.figura12@gmail.com writes:
This is necessary to allow the Hauppauge CIR receiver driver for cx2310x drivers (hcw10cir.sys) to start.
Signed-off-by: Zebediah Figura z.figura12@gmail.com
Tested with a Hauppauge 955Q (2040:b123), installed using WinTV 8.5. Note however that the driver still does not run with upstream Wine; it needs an additional patch to expose composite device interfaces from wineusb (or from a layered driver on top of wineusb).
dlls/hidclass.sys/pnp.c | 91 +++++++++++++++++----------- dlls/ntoskrnl.exe/tests/driver_hid.c | 3 +- 2 files changed, 57 insertions(+), 37 deletions(-)
This breaks the tests here:
tools/runtest -q -P wine -T . -M ntoskrnl.exe -p dlls/ntoskrnl.exe/tests/ntoskrnl.exe_test.exe ntoskrnl && touch dlls/ntoskrnl.exe/tests/ntoskrnl.ok ntoskrnl.c:1696: Subtest driver ntoskrnl.c:1739: Subtest driver_netio ntoskrnl.c:1742: Subtest driver_pnp ntoskrnl.c:1745: Subtest driver_hid ntoskrnl.c:1520: Test failed: failed to get interface, error 0x103 ntoskrnl.c:1521: Test failed: wrong class {00000000-0000-0000-0000-000000000000} ntoskrnl.c:1523: Test failed: got flags 0 ntoskrnl.c:1527: Test failed: failed to get interface path, error 0x57 make: *** [Makefile:97794: dlls/ntoskrnl.exe/tests/ntoskrnl.ok] Error 4
Ouch. It seems I nearly broke all wine HID devices completely. On the plus side, the third-party driver I was trying to fix still works.