2

I am trying to prevent a USB HID Digitizer device ( touchscreen ) from being claimed by Windows 10 as an active HID device so that I can open the device using C# to access it directly through code.

There are 3 goals:

  • Prevent Windows from reacting to touch activity
  • Read the native touch resolution for the device ( 2048 x 2048 for example )
  • Read HID reports from the device to get touch activity and NATIVE touch coordinates - no coordinate conversions.

Accessing a HID device from C# and reading the reports is easy enough, but I can't figure out how to keep Windows from claiming and opening the device as a Digitizer.

Does anyone have any ideas for how to prevent Windows from opening a HID Digitizer and claiming it ?

Anything such as WMI manipulation, Registry Key changes, disabling Windows features, Windows Message intercepts, security options, or 3rd party libraries or applications that can force close a HID device would work.

Disabling the device in the Device Manager is not an option, since the device cannot be accessed by c# after that.

Thanks for any suggestions !

user1689175
  • 767
  • 10
  • 18
  • WHat have you tried so far? Docs for native Win32 are here https://learn.microsoft.com/en-us/windows-hardware/drivers/hid/introduction-to-hid-concepts you would need PInvoke to call them. We need to see what you have tried and what's failing: [so] doesn't really do vague "any ideas" questions – Charlieface Aug 18 '22 at 23:46

1 Answers1

0

I cannot be 100% sure because I'm not a specialist in Windows kernel but I do not believe you can separate HID input from Windows and still obtain it otherwise through usual APIs. Your only option is using lightweight VM with Linux (can be very small) or Windows and write custom software for it which will send the HID input over network.

Or you could use open source KVM and develop something on top of it: https://github.com/debauchee/barrier

Euri Pinhollow
  • 332
  • 2
  • 17