Win11 - User32.GetRawInputData fails to read data since 24H2

Vít H 0 Reputation points
2025-01-28T16:38:45.1933333+00:00

Background:

We are using HwndHost class to host child window inside WPF application. From WndProc method we are forwarding input messages (WM_INPUT) to child process/window using User32.SendMessage. The child process/window WndProc method then receives the message and reads from it using User32.GetRawInputData.

I can confirm it works fine in Win10 and Win11 23H2.

Since 24H2 the GetRawInputData method from user32.dll is not able to read data(lParam) from forwarded WM_INPUT message from parent window/process.

returned result is -1 and lastWin32Error is set to 6 - invalid handle.

Short repro sample app

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,093 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,823 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,666 questions
{count} votes

Your answer

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