[PATCH v5 2/2] hidclass.sys: use IoRegisterDeviceInterface

Zebediah Figura z.figura12 at gmail.com
Fri Oct 5 14:53:03 CDT 2018


On 05/10/18 08:09, Aric Stewart wrote:
>      devinfo = SetupDiGetClassDevsW(&GUID_DEVCLASS_HIDCLASS, NULL, NULL, DIGCF_DEVICEINTERFACE);
>      if (!devinfo)
> @@ -138,13 +112,22 @@ NTSTATUS HID_LinkDevice(DEVICE_OBJECT *device)
>          FIXME( "failed to Register Device Info %x\n", GetLastError());
>          goto error;
>      }
> -    if (!SetupDiCreateDeviceInterfaceW( devinfo, &Data,  &hidGuid, NULL, 0, NULL))
> +    SetupDiDestroyDeviceInfoList(devinfo);

IoRegisterDeviceInterface() also calls SetupDiCreateDeviceInfo(), so do
we need to make any setupapi calls here at all? I see the flag
DICD_INHERIT_CLASSDRVS differs, but we don't implement that, and I'm not
entirely sure from the documentation what it's supposed to do, or
whether or not it's correct here or in IoRegisterDeviceInterface().



More information about the wine-devel mailing list