C# Help (Raw Input)

itdimk ^^ 1 Reputation point
2022-11-14T09:54:43.667+00:00

Hi!
A function "RegisterRawInputDevices(RawInputDeviceRegistration[] pRawInputDevices, uint uiNumDevices, uint cbSize)" from user32.dll blocks the main GUI thread.
Is there a way to keep GUI active?

Repo is here: https://github.com/itdimk/NativeWindowPlay

There's a function "Register Devices" inside class "MacroRecorder".
Internally, it calls RawInputDevice.RegisterDevice which calls RegisterRawInputDevices from user32.dll.
Problem is, after that call GUI got completely blocked.

I tried to call it in a new thread but it doesnt help :c

Developer technologies | Windows Presentation Foundation
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.