How do I get GetRawInputDeviceInfo to work in a RDP session?

Norman Viljoen 1 Reputation point


Why does GetRawInputDeviceInfo not work in an application running in a RDP session? Here the RDP session is Windows Server 2022. When the application runs on the client GetRawInputDeviceInfo correctly returns the devices but doesn't when running on the RDP session. Is this a bug in GetRawInputDeviceInfo?


Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,616 questions
Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,397 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Karlie Weng 16,351 Reputation points Microsoft Vendor


    I can see this api is used to check input device(winuser.h), it is advisable to check the redirection of your device.

    You can check these settings in your group policy:

    1. Open it by running "gpedit.msc"
    2. Find the relative folder

    Computer configuration - > Administrative templates -> Windows component ->Remote desktop services - > Remote desktop session host -> Device and Resource Redirection

    1. Check the options.