[PATCH v2] HID: Handle failure to create device by trying to open it instead

Aric Stewart aric at codeweavers.com
Wed Mar 20 08:40:04 CDT 2019



On 3/20/19 7:48 AM, Ztirfe Elgnid wrote:
> 
> On Mar 20, 2019, at 7:26 AM, Aric Stewart <aric at codeweavers.com> wrote:
>>
>>
>> v2: With input from Huw Davies
>>
>> Signed-off-by: Aric Stewart <aric at codeweavers.com>
>> ---
>> dlls/hidclass.sys/device.c | 11 +++++------
>> dlls/winebus.sys/main.c    | 12 +++++++++---
>> 2 files changed, 14 insertions(+), 9 deletions(-)
>>
>>
>> <v2-0001-HID-Handle-failure-to-create-device-by-trying-to-op.txt>
>>
> 
> Why is this necessary? All we do in both winebus and hidclass is register the device, and if SetupDiOpenDeviceInfo() succeeds then the device was already registered. And we don't depend in either case on the setupapi routines succeeding.
> 


Ok sorry, so for a less off handed response.  I was finding that devices where not showing up. When I tried to call SetupDIOpenDeviceInfo I would get ERROR_DEVINST_ALREADY_EXISTS,  however because the code did not stop when the devices where later trying to be accessed (and I fixed things up to move on even on that failure) then I would get ERROR_NO_SUCH_DEVINST errors later.

I did not dig beyond that.

-aric



More information about the wine-devel mailing list