Can I programmatically check a remote computer to see if someone is already connected via Remote Desktop to this computer?

Ivan-F 1 Reputation point
2021-01-26T16:21:15.563+00:00

We have a few Windows 10 Pro computers with Remote Desktop enabled. There are also "client" machines running Windows 10 Pro and Windows 10 Home.

Is it possible to programmatically check, from a client machine, that the remote computer is already occupied by someone? That is, if another remote client is already connected to it? If so, can I do this without breaking the existing remote connection?

C++ code would be preferable, but if you know a solution in another language, please share it.

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,411 questions
Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,225 questions
Windows 10 Network
Windows 10 Network
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Network: A group of devices that communicate either wirelessly or via a physical connection.
2,266 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RLWA32 40,021 Reputation points
    2021-01-26T21:38:12.657+00:00
    0 comments No comments