question

TomLee-6909 avatar image
0 Votes"
TomLee-6909 asked AryaDing-MSFT commented

Desktop bridge app can't access hid device from its UWP app

Hi!

Our desktop bridge app have embedded with wpf and uwp app in the same package, both of them will access our hid device with different interface.
We packaged them by using "Windows Application Packaging Project".

With Windows 19H2, the API "HidDevice.FromIdAsync" will return null, but with Windows 20H2, it will successful return HidDevice for usage.
With Windows 19H2, by using "DeviceAccessInformation.CreateFromId(deviceInfo.Id).CurrentStatus", it returned status "DeviceAccessStatus.DeniedBySystem".
But after the same system upgrade to 20H2, it will returned status "DeviceAccessStatus.Allowed".

By the way, we also tested with pure UWP app to access the same hid device, both OS version will successes get the HidDevice without error.

We would like to support as much version as possible. Is this some kind of limitation for 19H2? We did not find any relevant documents to explain this phenomenon. Please give some help, thanks.



windows-uwp
· 10
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

anonymous user-6909 Could you please provide us a sample by OneDrive or GitHub? I will appreciate it if you could provide steps to reproduce this issue.

0 Votes 0 ·

Here is the sample app for you to reproduce this issue. For reference, we enumerated custom USB device whose USB device descriptor has two HID interface descriptors. The device watcher will found following device information for app:
Device information=> Id: \\?\HID#VID_0A48&PID_5678&MI_00#8&a7a39da&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
Device information=> Id: \\?\HID#VID_0A48&PID_5678&MI_01#8&1daa5618&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}

Please let me known if you need more information.

0 Votes 0 ·

anonymous user-6909 What hid device did you test?

0 Votes 0 ·
Show more comments

0 Answers